Connecting to FTP server using WinInet

S

Shweta

Hi,
I am trying to connect to esatblish FTP connection using WinInet
APIs.I am on LAN connecting via proxy to internet.

First call InternetOpen() is fine, however the call to
InternetConnect() return error 'The server name could not be
resolved'.I have tried accessing the same site through IE and it works
fine.Also the proxy server 'sproxyname' is correct.
The code snippet is as shown below,

HINTERNET hSession;
hSession = InternetOpen("Microsoft Internet Explorer",
INTERNET_OPEN_TYPE_PROXY ,sproxyname, NULL, INTERNET_FLAG_ASYNC);
if (hSession)
{
HINTERNET hService;
hService = InternetConnect(hSession, "ftp.microsoft.com",
INTERNET_DEFAULT_FTP_PORT, NULL, NULL,
INTERNET_SERVICE_FTP, 0, 0);
}
Please if anybody can help me out in this.

Thanks in advance.
 
L

lallous

Shweta said:
Hi,
I am trying to connect to esatblish FTP connection using WinInet
APIs.I am on LAN connecting via proxy to internet.

First call InternetOpen() is fine, however the call to
InternetConnect() return error 'The server name could not be
resolved'.I have tried accessing the same site through IE and it works
fine.Also the proxy server 'sproxyname' is correct.
The code snippet is as shown below,

HINTERNET hSession;
hSession = InternetOpen("Microsoft Internet Explorer",
INTERNET_OPEN_TYPE_PROXY ,sproxyname, NULL, INTERNET_FLAG_ASYNC);
if (hSession)
{
HINTERNET hService;
hService = InternetConnect(hSession, "ftp.microsoft.com",
INTERNET_DEFAULT_FTP_PORT, NULL, NULL,
INTERNET_SERVICE_FTP, 0, 0);
}
Please if anybody can help me out in this.

Thanks in advance.
Wrong news group, try microsoft.public.win32.programmer.networks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top