rhgaracci
asked on
ActiveX Control using MFC Extension DLL
I created an ActiveX Control using the ActiveX Control wizard. The control uses a MFC Extension DLL that works with .EXE applications just fine, and has been deployed at customer sites for several months.
The Extension DLL contains several classes that have member functions that return CStrings from the DLLs local stringtable resources. It uses the CString::LoadString() function. This works fine with the .EXE applications, but the ActiveX control does not find the strings in its search through its CDynLinkLibrary chain.
The Extension DLL framework was built by the Extension DLL wizard. I am using VC++ 5.0
It appears that the ActiveX Control OCX is implemented like an Extension DLL and "wires" itself into the chain.
My question is: Why don't the DLL functions find their own resources AND what can be done to correct this?
Modifying the Extension DLL, except to try some things out for debugging, is not a viable option.
Thank you
The Extension DLL contains several classes that have member functions that return CStrings from the DLLs local stringtable resources. It uses the CString::LoadString() function. This works fine with the .EXE applications, but the ActiveX control does not find the strings in its search through its CDynLinkLibrary chain.
The Extension DLL framework was built by the Extension DLL wizard. I am using VC++ 5.0
It appears that the ActiveX Control OCX is implemented like an Extension DLL and "wires" itself into the chain.
My question is: Why don't the DLL functions find their own resources AND what can be done to correct this?
Modifying the Extension DLL, except to try some things out for debugging, is not a viable option.
Thank you
ASKER
Actually, I figured out the correct answer. I found the solution in Knowledge Base Article Q154126. I modified my extension dll to use the two-step initialization as described in the article (search for words "more recommended" for a description) and called the exported initialization function in the ActiveX control app initialization. This put the extension dll properly in the chain.
Thanks for the reply anyway.
No further responses are requested.
Thanks for the reply anyway.
No further responses are requested.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
To allow control to load string from another dll you must supply handle of this DLL for example add hidden property and set it with the handle.