FTP with Harbour / MSVC / FWH issues
Posted: Tue Jun 19, 2018 11:56 pm
I am running a program built with xHarbour / FWH that must do FTP processes. It works perfectly. I am using the .dll WININET and calling the functions:
INTERNETOPEN
INETCLOSEHANDLE
FTPGETFILE
FTPPUTFILE
INTERNETCONNECT
However, when I build using Harbour / MSVC / FWH, it appears to not recognize the WININET.dll because it gives me unidentified externals when trying to do run a successful build
These are all redefined as follows:
iDLL is defined:
PRIVATE iDLL := LoadLibrary( "wininet.dll" )
As I said, this code is fine with xHarbour, but not Harbour. I've tried other approaches but all are problematic. Any ideas on this one ?
INTERNETOPEN
INETCLOSEHANDLE
FTPGETFILE
FTPPUTFILE
INTERNETCONNECT
However, when I build using Harbour / MSVC / FWH, it appears to not recognize the WININET.dll because it gives me unidentified externals when trying to do run a successful build
These are all redefined as follows:
Code: Select all
DLL32 FUNCTION InternetOpen( cAgent AS LPSTR, nAccessType AS DWORD, cProxyName AS LPSTR, cProxyBypass AS LPSTR, nFlags ;
AS DWORD ) AS LONG PASCAL FROM "InternetOpenA" LIB iDLL
DLL32 FUNCTION INETCLOSEHANDLE( hInternet AS LONG ) AS BOOL;
PASCAL FROM "InternetCloseHandle" LIB iDLL
DLL32 FUNCTION FTPGETFILE( hConnect AS LONG, cRemoteFile AS LPSTR, cNewFile AS LPSTR, nFailIfExists AS LONG, ;
nFlagsAndAttribs AS DWORD, nFlags AS DWORD, @nContext AS PTR ) AS BOOL PASCAL FROM "FtpGetFileA" LIB iDLL
DLL32 FUNCTION FtpPutFile( hFTP AS LONG, cFileName AS LPSTR, cDestFile AS LPSTR,;
n1 AS LONG, n2 AS LONG ) AS BOOL PASCAL ;
FROM "FtpPutFileA" LIB iDLL
DLL32 FUNCTION InternetConnect( hSession AS LONG, cHost AS LPSTR, nPort AS LONG,;
cUserName AS LPSTR, cPassword AS LPSTR, n4 AS LONG, n5 AS LONG,;
n6 AS LONG ) AS LONG PASCAL ;
FROM "InternetConnectA" LIB iDLL
PRIVATE iDLL := LoadLibrary( "wininet.dll" )
As I said, this code is fine with xHarbour, but not Harbour. I've tried other approaches but all are problematic. Any ideas on this one ?