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

COM Obects in Arx Application - Class Not Registered

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
504 Views, 4 Replies

COM Obects in Arx Application - Class Not Registered

I have a COM object which I am trying to instantiate within the Arx application (Initialization) but get the _com_error 'Class Not Registered'. I have tested this com object in a test "Console" application and it works just fine. I have checked the registry for the class registration and it is there. Is there anyone out there who has attempted to use com objects within the arx environment that could possibly provide some input on possible causes for this problem.

 

Thanks

 

Mike Bujak

4 REPLIES 4
Message 2 of 5
owenwengerd
in reply to: Anonymous

The error means something is not registered, or not registered correctly. You say you checked the registry, but what did you check? Did you look at the correct architecture (32-bit vs. 64-bit)? How are you creating the object? Have you called CoInitialize first? Does your COM module load? If so, have you debugged the module to see where the error occurs? Just some thoughts.

--

Owen Wengerd

ManuSoft

 

--
Owen Wengerd
ManuSoft
Message 3 of 5
Anonymous
in reply to: owenwengerd

You say you checked the registry, but what did you check?

1) Just checked the registry to ensure that the class ID for the COM object was there.

 

Did you look at the correct architecture (32-bit vs. 64-bit)?

2) Well I thought you were on to something when you asked about the 32 vs 64 bit architecture. The Arx is built for 64 bit Autocad using the 64 bit inc/lib files. I checked and ensured that I built the COM library for 64 bit. I ensured to use the 64 bit version of 'regasm' with the /tlb option to make sure the type library is generated from the same dll. I still end up with class not registered.

 

How are you creating the object?

ns::MyObjPtr ptr(__uudiof(ns::MyObj));

 

 Have you called CoInitialize first?

Yes, right before the statement shown above.

 

Does your COM module load?

If so, have you debugged the module to see where the error occurs?

The COM module is a COM Callable Wrapper for a .NET assembly....I have successfully called it from a test project.

 

Any other suggestions, pretty soon I am going to owe the company I work for a new laptop.

 

Thanks for the previous feedback, hopefully you have other suggestions?

 

Mike B

Message 4 of 5
owenwengerd
in reply to: Anonymous

For starters, try using plain Windows API functions to create the object, and make sure it's looking for the CLSID you think it's looking for. Use Process Monitor to see if you can spot the point where it fails.

--

Owen Wengerd

ManuSoft

 

--
Owen Wengerd
ManuSoft
Message 5 of 5
Anonymous
in reply to: owenwengerd

/codebase was missing in the regasm command line.

 

Thanks for you suggestions.

 

Mike

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

Post to forums  

Autodesk Design & Make Report

”Boost