I had created a custom entity derived from AcDbEntity in unmanaged C++ using ObjectARX 2007 wizard. I also created a suitable ARX application to draw the custom entity in AutoCAD, just to serve as a proof that my DBX part is coded fully and working fine.
Then I created a managed C++ wrapper for the above said custom entity using mixed mode code. This also went flawless.
Then I created a managed C# application in which I will use this custom entity, through the wrapper and post it to AutoCAD’s database. This too went flawless.
The dependency relationship is like this:
C# UI depends on wrapper. Wrapper depends on DBX.
But my problem is this: I want to have a mechanism that will help me to throw a user friendly message when the dependent module is not loaded. This mechanism is required in the managed application end, to check whether the wrapper is loaded or not. I had successfully done this. The mechanism is also required in the wrapper to handle the exception when the required DBX is not loaded. I am unable to successfully trap this exception.
In the class of acrxEntryPoint.cpp in wrapper I have the InitAppMsg handler: