Resource management is an important consideration when designing an ObjectARX application that uses an MFC library shared with AutoCAD and other applications.
You must insert your module state (using CDynLinkLibrary) into the chain that MFC examines when it performs operations such as locating a resource. However, it is strongly recommended that you explicitly manage your application's resources so that they will not conflict with other resources from AutoCAD or other ObjectARX applications.
When calling AutoCAD API functions or invoking AutoCAD commands that need AutoCAD's resources, such as acedGetFileD(), be sure to set the resource back to AutoCAD before making the function call. Restore your application's resource afterwards. Use acedGetAcadResourceInstance() to get AutoCAD's resource handle.