I'm trying to use this sequence of VB-API calls to read the contents of a web-page where Login is requirted.(
InternetOpen,InternetConnect,HttpOpenRequest,HttpSendRequest) And then InternetReadFile to save the Page on local machine.

InternetConnect works fine with URL which are not protected by Password, but when I try to access some URL where UserId and Password is required it gives me problem.
When I do HttpSendRequest , it returns Err.LastDllError=12007(Server name could not be resolved)

Here is the code I'm using:

hOpen = InternetOpen("httpGetFile", INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)
hConnect = InternetConnect(hOpen, sUrl, INTERNET_DEFAULT_HTTPS_PORT, sUID, sPWD, INTERNET_SERVICE_HTTP, 0, 0)
hRequest = HttpOpenRequest(hConnect, "GET", sURL1, "HTTP/1.0", vbNullString, vbNullString, INTERNET_FLAG_SECURE, 0)
bRes = HttpSendRequest(hRequest, vbNullString, 0, vbNullString, 0)

Pl. suggest...
THANKS.