Peter Laman wrote:
> I need to fix a bug in a Delphi 6 application, which uses a home-made COM
> server DLL (Automation server). In order to fix the bug, I must add a new
> interface to the TLB of the server DLL and have one of the CoClasses
> support
> the interface.
>
> The drawback of this is, that the customers now need to register the COM
> server again on each workstation... or don't they? The problem is, that
> due
> to security issues, often only an administrator can make entries in the
> HKCR
> or HKLM roots of the registry and so the customer's IT department won't
> like
> this fix.
>
> Now my question is, whether they really have to explicitly register this
> COM
> server again. I didn't change the TLB version number, so the Library ID as
> well as all the CLSID's are in place already. I only added a new interface
> to the TLB, but to use that, the application simply calls QueryInterface
> and
> I don't see why a new registration is needed. The COM server is only
> intended to be used by my own application and not by, say VBA (I don't
> even
> know if this remark is even relevant).

It's quite relevant. It tells me that you didn't even need to register it
or use a type library at all. Registration is used so that a program can
give the OS just a GUID, and the OS will find a DLL that implements that
interface, load the DLL, call the function that tells the DLL to
instantiate a class for that GUID, and then return an interface reference
to the calling program.

Since it's your DLL and your program, you hardly need to involve the OS at
all. You also already know what all the interfaces' methods are, so you
don't need a type library to tell you about them.

You can load the DLL with LoadLibrary, and directly call a function that
creates an instance of your class and returns an interface reference for
it.

-- 
Rob


__________________________________________________
Delphi-Talk mailing list -> Delphi-Talk@elists.org
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to