I am able to make use of the FtpSetCurrentDirectory function of the WinINet.dll file in VFP. However, from VB.NET, that particular function returns an error.
This is the initialization:
Private Declare Function FtpSetCurrentDirectory Lib "WinINet.dll" _
(ByVal nFtpSession As Integer, ByVal cDirectory As String) As Integer
This is where the error occurs:
If FtpSetCurrentDirectory(nFTPSession, "/" + cRemoteDirectory) = 0 Then
lError = True
cError = oApp.StrTran(cTheFTPDirectoryDoesNotExist, "##cRemoteDirectory##", cRemoteDirectory)
Close()
Exit Try
End If
The error message is:
"Unable to find an entry point named 'FtpSetCurrentDirecotry' in DLL 'WinINet.dll'."
There must be something I am missing here. This is accessing the same file as from VFP. I just don't understand why in VB.NET I cannot make use of it.