AfxGetInstanceHandle() fails |
Post Reply |
Author | |
dhansen
Newbie Joined: 30 October 2007 Status: Offline Points: 1 |
Post Options
Thanks(0)
Posted: 30 October 2007 at 12:57pm |
I am accessing the SkinFramework dll from another MFC dll. When I call LoadSkin() I get an assert because AfxGetInstanceHandle() fails. If I put AFX_MANAGE_STATE(AfxGetStaticModuleState()) at the top of the method that calls LoadSkin() the assert goes away, but will retrieve the handle to my module rather than the SkinFramework dll.
This seems like a serious issue because the code is trying to apply the API hook when windows API functions are called within various modules in the process except for the SkinFramework.dll. SkinFrameWork will never retrieve the correct module handle because there is no call to AFX_MANAGE_STATE in the skin framework code. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |