Hello everyone !
Happy to join you boys and girls
I have a C++ (Win32) question for you:
I'm trying to download GIF file from URL and use InternetOpenUrl(); function. After this function call there are no errors and look's it's all OK, but returned handle is NULL. I pass InternetOpen() retuned handle to this function. InternetOpen() handle is also OK, but as I said [i]InternetOpenUrl() returns handle NULL. Have you any ideas on it ? Please help me solve this problem. Thank you.
Here is some code:
Code:
hRootHandle = InternetOpen(
"GIFLinker",
INTERNET_OPEN_TYPE_PRECONFIG ,
NULL,NULL,
INTERNET_FLAG_ASYNC);
hUrlDump = InternetOpenUrl(
hRootHandle,
"http://www.algirdas.com/fimg/online-merchants-index.gif",
NULL, NULL, INTERNET_FLAG_RAW_DATA, 0);
while (GetLastError() == ERROR_IO_PENDING) {
sprintf(szURL, "Waiting... (%d)",GetLastError());
SetDlgItemText(prcContext->hWindow, prcContext->nResource, szURL);
}
// After this code execution:
// hRootHandle = 0x00cc0004
// hUrlDump = NULL (0x00000000)
// GetLastError() = 0 (no errors)