Click to See Complete Forum and Search --> : A little help to decide


rasikrodri
May 27th, 2009, 02:40 AM
Hi,

I am writing a program that needs to manipulate Animation Master's models(an 3d animation program).
Hash Inc have available an sdk for developing plug ins using C++. But they have an ActiveX that exposes all the sdk libruary, it's called WebHAMR.

I really need to do what I need to do fast, and because of this I am using C# Express 2008.
I really don't want to do it in C++



This is what I do:

I add WebHAMR as a Reference, And it works fine if I just place a WebHAMR control on a form and load a 3d model.

The problem I am having is that if I create an object using the library exposed by WebHAMR, I get the following error:

Retrieving the COM class factory for component with CLSID {2FDB515C-EA6A-4B4A-8300-A0446FEB7F78} failed due to the following error: 80040154.


I really need help, I am limited on time.
Thanks

rasikrodri
May 27th, 2009, 03:06 PM
Actually The 3d app also has a ActiveX controll file which exposes all the 3d app's clases. And I could write a small C++ pluging to pass a 3d model instance to my app.

But I am having a problem. If I try to create an object from it I get an error message
If I leave the object null everything is okay, but if I initialize it the I get the error.
Example:

HAMR_HCP cp; //This actually works
HAMR_HCP cp = new HAMR_HCP();//This returns an error

This is the error:
Retrieving the COM class factory for component with CLSID {2FDB51E4-EA6A-4B4A-8300-A0446FEB7F78} failed due to the following error: 80040154.

I have searched a lot for a solution to what may be happening. In some places say that that com object has to be registered with the machine I am using. In others that in the project Properties I have to make sure to change Platform= from "Any CPU" to "x86".

I have done both and still I get the error message.


Please help, I really need to make this work

BigEd781
May 27th, 2009, 03:21 PM
Does your COM component require any other components to be registered/exist on the system? That can cause this error as well if one or more of them are missing.

rasikrodri
May 27th, 2009, 07:56 PM
I think not. But I am trying to confirm that with the creators of the ActiveX.

darwen
May 28th, 2009, 08:26 AM
You have registered the COM (activeX) dll haven't you ? I.e. you've run


regsvr32 <COM dllname>.dll


from the command line.

Darwen.

rasikrodri
May 28th, 2009, 12:31 PM
I have tried registering the ActiveX 3 time already and it does not fixes it.
To clarify the ActiveX is an *.ocx file, not a dll.

By adding it to my project as a Reference, C# created a dll "Interop.WebHAMRLib.dll", did you mean to register this one, but I already tried and it is not possible.

darwen
May 28th, 2009, 04:11 PM
OK - next question. Are you an administrator on the machine you are using ?

You can't register ActiveX (COM) dlls unless you are have administrator permissions.

The problem appears to be that your active X control isn't registered properly - hence the 0x80040154 error code.

Darwen.

rasikrodri
May 28th, 2009, 08:29 PM
Yes I am the administrator. My account type is set to administrator.

I want to add that following some instructions, to fix my problem, in another website, apart from registering the ActiveX it also said that you could find the CLSID that the error message was giving if you run regedit you showld find that CLSID. I did not find the one in the message CLSID {2FDB51E4-EA6A-4B4A-8300-A0446FEB7F78}

dglienna
May 28th, 2009, 08:32 PM
Any with CLSID {...}

rasikrodri
May 28th, 2009, 08:50 PM
dglienna Any with CLSID {...}

I am sorry, I did not understand what you meant.

dglienna
May 29th, 2009, 12:09 AM
any error line with the CSLID{} string in it

rasikrodri
May 29th, 2009, 01:56 AM
I am sorry I am not understanding to what you are reffering:
If I found others in the regitry with an CLSID?
If I am having the same error when doing other things with the ActiveX?


I have to say that I don't know to much about the registry.


But I ran regedit and I found the ActiveX, and it has a different CLSID

Any this error happens only when initializing any class or interface exposed by the ActiveX


Thanks

rasikrodri
June 8th, 2009, 06:53 PM
Thanks everyone.

I ended up using the C++ SDK.

Thanks