<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : AfxGetInstanceHandle() fails</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Skin Framework : AfxGetInstanceHandle() fails]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 20:47:24 +0000</pubDate>
  <lastBuildDate>Tue, 30 Oct 2007 12:57:37 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=8603</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[AfxGetInstanceHandle() fails : I am accessing the SkinFramework...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8603&amp;PID=27891&amp;title=afxgetinstancehandle-fails#27891</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3436">dhansen</a><br /><strong>Subject:</strong> 8603<br /><strong>Posted:</strong> 30 October 2007 at 12:57pm<br /><br />I am accessing the SkinFramework dll from another MFC dll. When I call LoadSkin() I get an assert because AfxGetInstanceHandle() fails. If I put&nbsp; 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.<br><br>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.<br><br><br>]]>
   </description>
   <pubDate>Tue, 30 Oct 2007 12:57:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8603&amp;PID=27891&amp;title=afxgetinstancehandle-fails#27891</guid>
  </item> 
 </channel>
</rss>