Will interop solve this problem?`

  • Thread starter Thread starter Gary
  • Start date Start date
G

Gary

I am getting the following errors.

Retrieving the COM class factory for component with CLSID
{0CD44B28-F861-11D0-9B45-006097B00E23} failed due to the following
error: 80040154."

The code that is generating the error is: act.CAIBaseView objBaseView =

new act.CAIBaseView();

However the following code works fine: act.CActAppObj objACT = new
act.CActAppObj();

I am referencing act.dll which gives me access to the act. namespace.

If I use p'invoke to reference the .dll instead will this help me?

I've been stuck on this for about 2 months.
 
Gary said:
I am getting the following errors.

Retrieving the COM class factory for component with CLSID
{0CD44B28-F861-11D0-9B45-006097B00E23} failed due to the following
error: 80040154."

The code that is generating the error is: act.CAIBaseView objBaseView =

new act.CAIBaseView();

However the following code works fine: act.CActAppObj objACT = new
act.CActAppObj();

I am referencing act.dll which gives me access to the act. namespace.

If I use p'invoke to reference the .dll instead will this help me?

I've been stuck on this for about 2 months.


Don't know about atc.dll, but if it's a COM server dll, it won help you to call it through
PInvoke.
What you should do is make sure the dll is correctly registered (regsvr32 act.dll) and that
the typelib is correctly imported in your project, that is, you need to make sure you have
generated a suitable interop assembly from this act.dll (or it's typelib).
Before using this in a project you need to consult the docs that comes with the server
(act.dll), and when you have problems like this you should run ildasm on the interop
assembly to see whether all methods are correctly imported and whether they have the
signature you are expecting.

Willy.
 
Thankyou this is the best advice i've had in months.
I've done what you've suggested already upto the ildasm advice.

I am going to try ildasm now (which i haven't used before) and see if i
can get any further.

if there is a problem highlighted by ildasm, how do i rectify it?

Thanks
 
Gary said:
Thankyou this is the best advice i've had in months.
I've done what you've suggested already upto the ildasm advice.

I am going to try ildasm now (which i haven't used before) and see if i
can get any further.

if there is a problem highlighted by ildasm, how do i rectify it?

Ildasm will at least reveal the names of the COM interfaces and the "synthesized" names of
their classes. Once you have found the offending class interface, you can check it's name
and compare its guid with the name used in your program and the clsid in the error message.
Note that a class creation can also fail because it's trying to create another (contained)
COM class which is not registered (or not available).

Willy.
 
Back
Top