hSession = InternetOpen((LPCWSTR)"MSDN SurfBear",
PRE_CONFIG_INTERNET_ACCESS,
NULL,
INTERNET_INVALID_PORT_NUMBER,
0) ;
test = GetLastError();
// Connect to www.microsoft.com.
hConnect = InternetConnect(hSession, (LPCWSTR)"www.microsoft.com",
INTERNET_INVALID_PORT_NUMBER,
NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0);
test = GetLastError();
// Request the file /MSDN/MSDNINFO/ from the server.
hHttpFile = HttpOpenRequest(hConnect,
(LPCTSTR)"GET",
(LPCTSTR)"/MSDN/MSDNINFO/",
HTTP_VERSION,
NULL,
0,
//INTERNET_FLAG_DONT_CACHE,
INTERNET_FLAG_SECURE ,
0) ;
// Send the request.
bSendRequest = HttpSendRequest(hHttpFile, NULL, 0, 0, 0);
test = GetLastError();
bQuery = HttpQueryInfo(hHttpFile,
HTTP_QUERY_CONTENT_LENGTH,
bufQuery,
&dwLengthBufQuery,0) ;
test = GetLastError();
But HttpSendRequest is giving an error 12007.
I tried deactivating firewall also , but still the same problem
Please let me know if anyone have a solution to this problem?
Thanks ,
Arun