Hi I'm working on some legacy开发者_如何学Go code - ATL ActiveX used as "installer" downloads files from the server for later installation. There is a "progress bar window" that works fine. The problem is when I start another instance of the ActiveX in the same process (Windows XP IE7), the progress bar is not installed for the second instance.
::CreateWindowEx(0L, PROGRESS_CLASS, EMPTY_STRING, WS_CHILD | WS_VISIBLE, X, (2*Y)-m_nProgHeight, nWidth - 2*X, m_nProgHeight, m_hWnd, NULL, _Module.GetModuleInstance(), NULL);
So I'm getting error 1407 CLASS_NOT_REGISTERED. The only place where I find some code related to the registration is in DLLMain (this is also my concern)) For attach case:
WNDCLASS wc;
memset(&wc,0,sizeof(wc));
::GetClassInfo(hInstance, "#32770", &wc);
wc.lpszClassName = "XXXXXWindow";
RegisterClass(&wc);
Thank you
OK, what I found is: - When IE started it loads two comctl32.dll - version 5.xxx and version 6.xxxxx. Some how after the first instance of activeX finished it's run (deployment) I see that only version 6.xxxx of comctl32.dll left loaded. Adding InitCommonControlsEx() did not helped, since for the second run the dll was already unloaded, that actually caused the crash of IE.
When I added explicitly LoadLibrary(comctl32.dll) it solved the issue.
If anyone knows what could cause the unload of version 5.xxxx please comment here.
Thank you.
加载中,请稍侯......
精彩评论