I have some problems loading / unloading my ARX app with one of my documents open (i.e., a doc containing my custom objects from the ARX):
Should I be able to APPLOAD / UNLOAD my ARX while my document is open? If this is meant to be possible, what am I neglecting to do that causes a crash?
Solved! Go to Solution.
Solved by Kyudos. Go to Solution.
I decided to reduce the scope for problems by refusing to unload if any of my application's documents are open, I also found some errors in my On_kUnloadAppMsg function.
However, after I unload my ARX, ACAD crashes in AfxFindResourceHandle when I try to do almost anything. My ARX is a CAcExtensionModule that loads it's own resource-only resource DLL. The crash looks like it's in the loop that searches for external resources, which hints that perhaps my unloaded DLL is still registered in the resource chain.
How do I cleanly unload my ARX to avoid this?
EDIT:
So that crash looks like a red herring - I can actually ignore it and ACAD seems fine...
I now prevent loading / unloading if my documents are open and every thing seems fine.
Wish I'd known about acrxLockApplication and acrxUnlockApplication to begin with though!