Board index » delphi » Cannot Register Com Object from delphi 4

Cannot Register Com Object from delphi 4

I am trying to register a com object that descends from from
TAutoObject (supports IDispatch).

When I try to register the class I get the following errors

runtime Error 217 ate 0000D0A5

Initialization of the dynamic link library c:\xxx.dll failed.  The
process is terminatnig abnormally.

Could not load c:\xxx.dll.  The OLE control may possibly require support
libraies that are not on the current search path or are not present on
your system.

Any ideas?

If this same class decsnds from TComObject and uses the
TComObjectFactory everything is works fine.

Thanks,
Brian

 

Re:Cannot Register Com Object from delphi 4


Hello,

If the interface you declared in the type library for one of your COM
objects (the one where TComObject works) is an IUnknown descendant, try
changing it to IDispatch AND use TAutoObject with it.

have fun
--
Binh Ly
Brickhouse Data Systems, Inc
http://www.brickhouse.com

Quote
Brian Leonard wrote in message <36E83C03.691F2...@softcom.net>...

>I am trying to register a com object that descends from from
>TAutoObject (supports IDispatch).

>When I try to register the class I get the following errors

>runtime Error 217 ate 0000D0A5

>Initialization of the dynamic link library c:\xxx.dll failed.  The
>process is terminatnig abnormally.

>Could not load c:\xxx.dll.  The OLE control may possibly require support
>libraies that are not on the current search path or are not present on
>your system.

>Any ideas?

>If this same class decsnds from TComObject and uses the
>TComObjectFactory everything is works fine.

>Thanks,
>Brian

Re:Cannot Register Com Object from delphi 4


Hi Brian,

    I got this error when I tried to use the coclass in the client/or
another coclass of an other module because
of the following circumstances:

1. The initialization part of the coclass unit will instantiate the
TAutoObjectFactory with
    a parameter named comserver (which comes from comserv.pas)
    This is the Delphi comclass-manager in every module which will hold all
factories fround in the
    DLL, OCX, EXE
2. The manager itself will ask every factory to read the typelib
    BUT: the name of the typelib will be 'GetModuleFileName' so it is the
name of the client or another comserver.

That's the problem (for me)

So I've written a descand of the comclass-mangager which will read the right
typelib and everthing works fine for me.
Tell me if that solves you problem or if  you need more information about
this.

greeetings from Cologne
    Chris

Brian Leonard schrieb:

Quote
> I am trying to register a com object that descends from from
> TAutoObject (supports IDispatch).

> When I try to register the class I get the following errors

> runtime Error 217 ate 0000D0A5

> Initialization of the dynamic link library c:\xxx.dll failed.  The
> process is terminatnig abnormally.

> Could not load c:\xxx.dll.  The OLE control may possibly require support
> libraies that are not on the current search path or are not present on
> your system.

> Any ideas?

> If this same class decsnds from TComObject and uses the
> TComObjectFactory everything is works fine.

> Thanks,
> Brian

Other Threads