Re: VS2010&OLE32.dll access violation problem with COM
Well, it doesn't matter, had you or had not. What matters is to call CoUnintialize only after all smartpointers left their scopes, or were nullified to the moment otherwise. You make sure this is done and see if the problem has gone.
Re: VS2010&OLE32.dll access violation problem with COM
Okay. The problem mentioned by Arjay relates to having non released COM interfaces while CoInitialize gets called. Now it's up to you to get what kind of smart pointers it's about.
Re: VS2010&OLE32.dll access violation problem with COM
Thanks.
I'm using many CComQIPtr(s) and released all of them before CoUninitialize and checked timing of release, therefor I couldn't resolve this issue. Why?
Re: VS2010&OLE32.dll access violation problem with COM
I've known the delay load of DLL but have not known the delay load around COM and CComPtr(or CComQIPtr). What is that ?
I haven't using delay loaded DLL(s).
Additionally, I've using Skype4COM.dll by '#import' pragma to communicate with the SkypeAPI and running the initialization process like below on the beginning of a worker thread
Re: VS2010&OLE32.dll access violation problem with COM
Originally Posted by lightshield
I've known the delay load of DLL but have not known the delay load around COM and CComPtr(or CComQIPtr). What is that ?
I haven't using delay loaded DLL(s).
Additionally, I've using Skype4COM.dll by '#import' pragma to communicate with the SkypeAPI and running the initialization process like below on the beginning of a worker thread
Re: VS2010&OLE32.dll access violation problem with COM
Originally Posted by lightshield
The above code is just the initializing part. CoUninitialize is used in my program.
Look, you've got a problem that we suspect is due to the scoping of the COM smart pointers getting released after your call to CoUninitialize. Of course, we don't know for sure until we see your code.
So can we just save time here and have you post the complete code from CoInitialize to CoUninitialize?
Re: VS2010&OLE32.dll access violation problem with COM
My worker thread routine is as below.
Code:
class Worker{
Worker(){}
void operator()(void)
{
CoInitialize(NULL);
// init skype api dll
while(true){
// skype api procedures using Skype4COM.dll
}
CoUninitialize();
}
};
This is a worker thread and this thread will only uses skype-api's produced by Skype's DLL.
BUT I've unloading Skype-DLL on the main thread. This procedure maybe the cause of this problem. I'll try to remove this procedure to detect an affected part of my sources.
Sorry Igor, I might have using delayed load.
Last edited by lightshield; August 20th, 2011 at 03:59 PM.
Bookmarks