Newsgroups : Microsoft : microsoft.public.inetsdk.programming.wininet : 2005 Oct : FtpCommand unresolved symbol

www.cryer.info
Managed Newsgroup Archive

FtpCommand unresolved symbol

Subject:FtpCommand unresolved symbol
Posted by:charles_weav..@post.harvard.edu
Date:14 Oct 2005 12:06:27

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@@YGHPAXHKPBDPAKPAPAX@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.)

Replies:

www.cryer.info
Managed Newsgroup Archive