Private Declare Function FtpGetCurrentDirectory Lib "wininet.dll" Alias "FtpGetCurrentDirectoryA" (ByVal hFtpSession As Integer, ByVal lpszCurrentDirectory As Sring, ByVal lpdwCurrentDirectory As Integer) As Boolean
Start New Function
Dim INn, INc
Dim RC As Boolean
INn = InternetOpen("FTP Control", 1, vbNullString, vbNullString, 0)
INc = InternetConnect(INn, " 21, "username", "password", 1, 0, 0)
sCurrDir = Space(255)
nCurrDir = Len(sCurrDir)
RC = FtpGetCurrentDirectory(INn, sCurrDir, nCurrDir)
This gives an Object reference not set to an instance of an object error, although FtpGetFile works Ok
Any assistance greatly appreciated
Start New Function
Dim INn, INc
Dim RC As Boolean
INn = InternetOpen("FTP Control", 1, vbNullString, vbNullString, 0)
INc = InternetConnect(INn, " 21, "username", "password", 1, 0, 0)
sCurrDir = Space(255)
nCurrDir = Len(sCurrDir)
RC = FtpGetCurrentDirectory(INn, sCurrDir, nCurrDir)
This gives an Object reference not set to an instance of an object error, although FtpGetFile works Ok
Any assistance greatly appreciated