The following is a function meant to load a webpage into the buffer. It works fine except if url is not a valid url, or even if it just times out OpenURL does not return. Instead an exception is thrown in kernel32.dll. This isn't acceptable behavoir for my app. However the function works perfectly if it find a valid url. Does anybody have any ideas? Any thoughts would be greatly appreciated. Thanx!
int LoadURL(const char* url,char* buffer,int bufferSize)
int lenIntoBuf = 0;
urlHandle = is.OpenURL(url);
if (urlHandle == NULL)
while (urlHandle->ReadString(tmpBuffer,1000) &&
lenIntoBuf < bufferSize)
lenIntoBuf += strlen(tmpBuffer);