activex + dll problem
-
Hello! I'm trying to create a MFC dll that makes use of MS WebBrowser activeX component. Another application loads the library runtime and calls certain function that creates a dialog box with an explorer control. When creating the dialog box, however, the initialization of browser control fails, reporting CoCreateInstance of OLE control {8856F961-340A-11D0-A96B-00C04FD705A2} failed. >>> Result code: 0x800401f0 >>> Is the control is properly registered? Warning: CreateDlgControls failed during dialog init. In the dll initialization, I call AfxEnableControlContainer(). If I build an EXE that creates a simple dialog with explorer control, it runs just fine, but if I try to use it in a DLL, things don't work out. Any ideas how to make it work?
-
Hello! I'm trying to create a MFC dll that makes use of MS WebBrowser activeX component. Another application loads the library runtime and calls certain function that creates a dialog box with an explorer control. When creating the dialog box, however, the initialization of browser control fails, reporting CoCreateInstance of OLE control {8856F961-340A-11D0-A96B-00C04FD705A2} failed. >>> Result code: 0x800401f0 >>> Is the control is properly registered? Warning: CreateDlgControls failed during dialog init. In the dll initialization, I call AfxEnableControlContainer(). If I build an EXE that creates a simple dialog with explorer control, it runs just fine, but if I try to use it in a DLL, things don't work out. Any ideas how to make it work?
I'm not an MFC newbie and I'm still having the same exact problem with a different ActiveX control. I've been told that you also need to make a call to AfxOleInit() in the DLL initialization, but I've done that and it hasn't helped me a bit. Nobody so far has been able to help me solve this problem and it's really becoming frustrating. Let me know if you find a solution.