From: Vilius Mock�nas on

Hello,

As I remember I must register custom interface and it's marshaling
stub/proxy under HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface key.

But I'm not sure about automation compatible intercaces (dispinterface/dual)
which are marshaled by automation marshaler. Should I register them under
HKLM\SOFTWARE\Classes\Interface ? If yes what are the most common ways of
registration ? (I'm not using ATL, anyway I can do it by hand in the end)

I'm not talking about server/coclass registration under CLSID key - these
thing are clear to me.

thanks
Vilius


From: Igor Tandetnik on
Vilius Mockûnas wrote:
> As I remember I must register custom interface and it's marshaling
> stub/proxy under HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface key.
>
> But I'm not sure about automation compatible intercaces (dispinterface/dual)
> which are marshaled by automation marshaler. Should I register them under
> HKLM\SOFTWARE\Classes\Interface ?

dispinterface is just IDispatch. You don't need to register it, the system already knows how to marshal IDispatch calls.

You need to register a dual interface if you plan to make early-bound calls across apartment boundaries. If you are only going to use IDispatch portion, then you don't need to register.

Note that you don't need to build proxy/stub DLL for automation-compatible interfaces. You can register a type library instead (which you likely have already).

> If yes what are the most common ways of
> registration ? (I'm not using ATL, anyway I can do it by hand in the end)

RegisterTypeLib
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925