Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - AfxGetInstanceHandle() fails
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

AfxGetInstanceHandle() fails

 Post Reply Post Reply
Author
Message
dhansen View Drop Down
Newbie
Newbie


Joined: 30 October 2007
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote dhansen Quote  Post ReplyReply Direct Link To This Post Topic: AfxGetInstanceHandle() fails
    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.


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.