I have problem with a MultiThreaded program
I have created simple Dialog based Win32 app.
It does connect to an an URL using WinInet APIs.
And extracts the web page and pass the extracted raw content to
MSHTML (IE’s HTML parser) for obtaining specific content using IMarkUpServices interface & IHTMDocument2.
Now I have created 2 threads(worker threads) in addition to WinMain.
IntialThread- In this thread which created under WM_INIT_DIALOG, will create instances of above HTMLInterfaces
I am creating instances and calling CoInitlaize, everything in ThreadProc. Once processing is done it is sents a message to Main Dialog to show the status.
I am using a IE 6 headers and Platform SDK (latest) to compile.
It throws error URLmon.dll (Acces Violation Error ) as soon as Thread finishes.
I am cleanly releasing all interfaces and there are no string overruns for memory leaks inside the Thread code.
I am running under debug mode from VC IDE, logged in as ordinary user , on Windows XP to a domain controlled by Win2k.
Another strange thing happens when I execute the same by logging in as Administrator to the local machine
It does not give this error and program executes perfectly.
Second Thread – This thread starts at the Click of button and functionality is same as the above thread. So I create the same HTML instances under this thread also. It gives COM error class already exists (for IHTMLDocuement2) even though I am creating the Instance using CoGetClass object and then CreateInstance and its entirely a different pointer to that interface.
I am calling CoIntialize(NULL) in this thread also.
I have IE6 on this m/c and cleared the History from IE and deleted temp files also.
But this problem is still unresolved and can you give me any hints on this.
I have created simple Dialog based Win32 app.
It does connect to an an URL using WinInet APIs.
And extracts the web page and pass the extracted raw content to
MSHTML (IE’s HTML parser) for obtaining specific content using IMarkUpServices interface & IHTMDocument2.
Now I have created 2 threads(worker threads) in addition to WinMain.
IntialThread- In this thread which created under WM_INIT_DIALOG, will create instances of above HTMLInterfaces
I am creating instances and calling CoInitlaize, everything in ThreadProc. Once processing is done it is sents a message to Main Dialog to show the status.
I am using a IE 6 headers and Platform SDK (latest) to compile.
It throws error URLmon.dll (Acces Violation Error ) as soon as Thread finishes.
I am cleanly releasing all interfaces and there are no string overruns for memory leaks inside the Thread code.
I am running under debug mode from VC IDE, logged in as ordinary user , on Windows XP to a domain controlled by Win2k.
Another strange thing happens when I execute the same by logging in as Administrator to the local machine
It does not give this error and program executes perfectly.
Second Thread – This thread starts at the Click of button and functionality is same as the above thread. So I create the same HTML instances under this thread also. It gives COM error class already exists (for IHTMLDocuement2) even though I am creating the Instance using CoGetClass object and then CreateInstance and its entirely a different pointer to that interface.
I am calling CoIntialize(NULL) in this thread also.
I have IE6 on this m/c and cleared the History from IE and deleted temp files also.
But this problem is still unresolved and can you give me any hints on this.