ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

APPLOAD Order - What is supposed to happen? What actions should I take?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Kyudos
463 Views, 2 Replies

APPLOAD Order - What is supposed to happen? What actions should I take?

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):

 

  • APPLOAD Arx, open document - this is standard and works correctly
  • Open document, attempt APPLOAD - I get an access violation error. Now, even If I close my document I can't APPLOAD my ARX - I get an INTERNAL ERROR - Attempt to register class 'myclass' twice.
  • APPLOAD Arx, open document - fine. Unload ARX, apparently fine. Now try to APPLOAD again - FATAL ERROR (this occurs on the actual APPLOAD command, not when trying to load my 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?

 

 

2 REPLIES 2
Message 2 of 3
Kyudos
in reply to: Kyudos

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...

Message 3 of 3
Kyudos
in reply to: Kyudos

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!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost