R
Ron
Hello,
Is it required to use
Imports System.Runtime.InteropServices
to run C++ API code? I ask because I thought I read
somewhere that this was required. If it is not required
would it interfere if I added it? I experimented with a
simple API
Public Declare Sub Sleep Lib "kernel32" _
(ByVal dwMilliseconds As Long)
which ran fine with/without the Imports statement above.
I am migrating a vb6 project to vb.net, and this project
used a lot of API's from wininet.dll, specifically the
following Ftp API's (which I understand Ftp will be
integrated into VS2005) for interfacing between a windows
workstations and a mainframe computer. Any suggestions
are appreciated on using these API's in vb.net for my
migration project.
-------------------------------------------------------
Public Declare Function FtpPutFile Lib "wininet.dll" _
Alias "FtpPutFileA" (ByVal hFtpSession As Long, ByVal _
lpszLocalFile As String, ByVal lpszRemoteFile As String, _
ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean
-------------------------------------------------------
Public Declare Function FtpDeleteFile Lib "wininet.dll" _
Alias "FtpDeleteFileA" (ByVal hFtpSession As Long, _
ByVal lpszFileName As String) As Boolean
--------------------------------------------------------
Public Declare Function FtpGetFile Lib "wininet.dll" _
Alias "FtpGetFileA" (ByVal hFtpSession As Long, _
ByVal lpszRemoteFile As String, ByVal lpszNewFile _
As String, ByVal fFailIfExists As Boolean, ByVal _
dwFlagsAndAttributes As Long, _
ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean
--------------------------------------------------------
Public Declare Function FtpCommand Lib "wininet.dll" _
Alias "FtpCommandA" (ByVal hConnect As Long, ByVal _
fExpectResponse As Boolean, ByVal dwFlags As Long, _
ByVal lpszCommand As String, ByVal dwContext As Long, _
ByRef response_handle As Long) As Boolean
Is it required to use
Imports System.Runtime.InteropServices
to run C++ API code? I ask because I thought I read
somewhere that this was required. If it is not required
would it interfere if I added it? I experimented with a
simple API
Public Declare Sub Sleep Lib "kernel32" _
(ByVal dwMilliseconds As Long)
which ran fine with/without the Imports statement above.
I am migrating a vb6 project to vb.net, and this project
used a lot of API's from wininet.dll, specifically the
following Ftp API's (which I understand Ftp will be
integrated into VS2005) for interfacing between a windows
workstations and a mainframe computer. Any suggestions
are appreciated on using these API's in vb.net for my
migration project.
-------------------------------------------------------
Public Declare Function FtpPutFile Lib "wininet.dll" _
Alias "FtpPutFileA" (ByVal hFtpSession As Long, ByVal _
lpszLocalFile As String, ByVal lpszRemoteFile As String, _
ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean
-------------------------------------------------------
Public Declare Function FtpDeleteFile Lib "wininet.dll" _
Alias "FtpDeleteFileA" (ByVal hFtpSession As Long, _
ByVal lpszFileName As String) As Boolean
--------------------------------------------------------
Public Declare Function FtpGetFile Lib "wininet.dll" _
Alias "FtpGetFileA" (ByVal hFtpSession As Long, _
ByVal lpszRemoteFile As String, ByVal lpszNewFile _
As String, ByVal fFailIfExists As Boolean, ByVal _
dwFlagsAndAttributes As Long, _
ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean
--------------------------------------------------------
Public Declare Function FtpCommand Lib "wininet.dll" _
Alias "FtpCommandA" (ByVal hConnect As Long, ByVal _
fExpectResponse As Boolean, ByVal dwFlags As Long, _
ByVal lpszCommand As String, ByVal dwContext As Long, _
ByRef response_handle As Long) As Boolean