Hello All,
I gather from reading online that changing Long declarations to LongPtr is not correct in some situations. Can someone help me with the following declarations:
Thank you,
David
I gather from reading online that changing Long declarations to LongPtr is not correct in some situations. Can someone help me with the following declarations:
VBA Code:
Private Declare Function InternetCloseHandle Lib "wininet.dll" _
(ByVal hInet As LongPtr) As Integer
Private Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" _
(ByVal hInternetSession As LongPtr, ByVal sServerName As String, _
ByVal nServerPort As Integer, _
ByVal sUserName As String, ByVal sPassword As String, ByVal lService As LongPtr, _
ByVal lFlags As LongPtr, ByVal lContext As LongPtr) As LongPtr
Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" _
(ByVal sAgent As String, ByVal lAccessType As LongPtr, ByVal sProxyName As String, _
ByVal sProxyBypass As String, ByVal lFlags As LongPtr) As LongPtr
Private Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias _
"FtpSetCurrentDirectoryA" (ByVal hFtpSession As LongPtr, _
ByVal lpszDirectory As String) As Boolean
Private Declare Function FtpDeleteFile Lib "wininet.dll" Alias "FtpDeleteFileA" _
(ByVal hConnect As LongPtr, ByVal lpszRemoteFile As String) As Boolean
Private Declare Function FtpGetFile Lib "wininet.dll" Alias "FtpGetFileA" _
(ByVal hConnect As LongPtr, ByVal lpszRemoteFile As String, _
ByVal lpszNewFile As String, ByVal fFailIfExists As LongPtr, _
ByVal dwFlagsAndAttributes As LongPtr, ByVal dwFlags As LongPtr, _
ByRef dwContext As LongPtr) As Boolean
Private Declare Function FtpPutFile Lib "wininet.dll" Alias _
"FtpPutFileA" (ByVal hConnect As LongPtr, ByVal lpszLocalFile As String, _
ByVal lpszNewRemoteFile As String, ByVal dwFlags As LongPtr, _
ByVal dwContext As LongPtr) As Boolean
Thank you,
David