In Migration to 2018 COM Wrapper does not work

In Migration to 2018 COM Wrapper does not work

Anonymous
Not applicable
1,810 Views
5 Replies
Message 1 of 6

In Migration to 2018 COM Wrapper does not work

Anonymous
Not applicable

Dear Community,

I have migrated my ObjectARX app to 2018, and everything works fine, other than the COM Wrapper for the Properties palette. When I select a custom object, it does not catch if any object is selected.

I was careful to change the include files and libraries from 21 to 22, update the references, and so on.

When I load the COM Wrapper ARX file manually, it loads and does not show any error.

So I am stuck and ran out of any idea how to proceed to find the problem. I would appreciate your insights.

0 Likes
1,811 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

I found a log file, InfoCenter.log, in which whenever I load my application it says:

6/13/2017 7:56:51 PM: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {CEE92F99-D9C7-4E46-9AB7-E3F705B9A543} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
   at Autodesk.Private.InfoCenter.CommunicationCenter.InitCommCenter()
6/13/2017 7:56:51 PM: Error executing network check
6/13/2017 7:56:51 PM: Retrieving the COM class factory for component with CLSID {9E928A7C-095E-4F44-81C5-D4F14F4F0265} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
6/13/2017 7:57:08 PM: Configuration Read from: C:\Users\Massoud\AppData\Local\Autodesk\AutoCAD 2018\R22.0\enu\Support\infocenter.xml
6/13/2017 7:57:11 PM: ICommunicationCenterConnector.SubAwareServiceUrl does not contain valid URL.
 Attempting to load from registry

 

I checked the registry and I could not find that CLSID, and definitely it's not one of my projects' UUIDs.

Did any of you have seen this before? or if you know how to proceed to solve it?

thanks

0 Likes
Message 3 of 6

moogalm
Autodesk Support
Autodesk Support

Can you please share non-confidential sample project, I have a look at it.

0 Likes
Message 4 of 6

OysteinW
Advocate
Advocate

Try running AutoCAD as administrator (or disable UAC) 

 

If the COM Wrapper is correctly built, it should be able to self-register when running as admin.

This is not the case when running in normal mode even if your user is local admin. You'll probably see the message "Failed to register COM server" on the command line. And this is because UAC prevents the AutoCAD to alter HKEY_LOCAL_MACHINE and HKEY_CLASSES_ROOT in the registry. 

But next time you run AutoCAD, normal mode suffices as the module then has been registered.

 

What we do, is to have all the registry keys necessary for the COM Wrapper to function properly included in our Installshield installer for our applications. Then we don't have to require the user to run AutoCAD as admin once for the properties to work. 

 

 

One way to see which keys and values to set, is to export the registry before self-registering the modules, and than export the registry after, and do a compare using Regshot or some other tool. 

 

 

0 Likes
Message 5 of 6

Anonymous
Not applicable

I had the same issue, calling a classname was not possible until I have changed my R value to 22.0 in the .rgs 

 

HKLM
{
	NoRemove SOFTWARE
	{
		NoRemove Autodesk
		{
			NoRemove ObjectDBX
			{
				NoRemove R22.0
				{
					NoRemove ActiveXCLSID
					{
						val YourObject = s '{xxxxxx-xxxxx-xxxxxx-xxxxxx-xxxxxxxx}'
					}
				}
			}
		}
	}
}

 

Check that your C++ code is registering to the correct version of autocad.

0 Likes
Message 6 of 6

nick83
Advocate
Advocate

check IDL file. mb you forgot to change importlib("axdb22enu.tlb")

 

if the problem is in permissions, Alexander Rivilis have told me how to register DBX for a current user without any permissions. so, i can share it Smiley Happy

1. totally remove HKLM from your wrapper RGS file. 

2. use this code to register a dbx.