c***@post.harvard.edu
2005-10-14 19:06:27 UTC
I am using VC 6.0. I want to use FtpCommand. I have an old version of
Wininet.h and Wininet.lib. When I tried to upgrade wininet.h to a
version that contains FtpCommand I got a lot of compile errors. So I
just included the declaration of FtpCommand from the .h file:
BOOL WINAPI FtpCommandA(
IN HINTERNET hConnect,
IN BOOL fExpectResponse,
IN DWORD dwFlags,
IN LPCSTR lpszCommand,
IN DWORD * dwContext,
OUT HINTERNET *phFtpCommand OPTIONAL
);
BOOL WINAPI FtpCommandW(
IN HINTERNET hConnect,
IN BOOL fExpectResponse,
IN DWORD dwFlags,
IN LPCWSTR lpszCommand,
IN DWORD * dwContext,
OUT HINTERNET *phFtpCommand OPTIONAL
);
#ifdef UNICODE
#define FtpCommand FtpCommandW
#else
#define FtpCommand FtpCommandA
#endif
The program compiles but then I get an unresolved external
FTPFuncs.obj : error LNK2001: unresolved external symbol "int __stdcall
FtpCommandA(void *,int,unsigned long,char const *,unsigned long *,void
* *)" (?FtpCommandA@@***@Z)
Debug/QLSCM_CMMS.exe : fatal error LNK1120: 1 unresolved externals
I am using a wininet.lib file with date 3/26/2003.
What could be causing the link to fail? (Yes I am linking with
wininet.lib and there is only one version on my PC.)
Wininet.h and Wininet.lib. When I tried to upgrade wininet.h to a
version that contains FtpCommand I got a lot of compile errors. So I
just included the declaration of FtpCommand from the .h file:
BOOL WINAPI FtpCommandA(
IN HINTERNET hConnect,
IN BOOL fExpectResponse,
IN DWORD dwFlags,
IN LPCSTR lpszCommand,
IN DWORD * dwContext,
OUT HINTERNET *phFtpCommand OPTIONAL
);
BOOL WINAPI FtpCommandW(
IN HINTERNET hConnect,
IN BOOL fExpectResponse,
IN DWORD dwFlags,
IN LPCWSTR lpszCommand,
IN DWORD * dwContext,
OUT HINTERNET *phFtpCommand OPTIONAL
);
#ifdef UNICODE
#define FtpCommand FtpCommandW
#else
#define FtpCommand FtpCommandA
#endif
The program compiles but then I get an unresolved external
FTPFuncs.obj : error LNK2001: unresolved external symbol "int __stdcall
FtpCommandA(void *,int,unsigned long,char const *,unsigned long *,void
* *)" (?FtpCommandA@@***@Z)
Debug/QLSCM_CMMS.exe : fatal error LNK1120: 1 unresolved externals
I am using a wininet.lib file with date 3/26/2003.
What could be causing the link to fail? (Yes I am linking with
wininet.lib and there is only one version on my PC.)