Hello!

For two days now, Iam strugling with some dificulties using
CInternetSession.OpenURL() function. Iam writing simple code for separate
thread function such as:

while(true)
{
CInternetSession csiSession;
CStdioFile* MyFile = csiSession.OpenURL(_T("http://www.someurl.com"));

// working on retrieved data

MyFile->Close();
delete MyFile;
}

Iam using VC2k5 and while building solution Ive received warning:
First-chance exception at 0x7c90eb74 in Project1.exe: 0xC0000008: An
invalid handle was specified.

Warning is poiting to "OpenURL", but I don't have any clue what cause it.
Also Ive changed compiler to VC6 and tried same code again, and came with
similar "Invalid handle" message.

The VC2k5 Allows to click "Ignore" and proceed with app. Ive observed that
app is running "normal" except memory leak at "OpenURL" method.

Ive already searched web for solution but came out (almost) empty.
Could someone help me with this issue? TIA.

--
SOCAR