Compartilhar via


ILocalRegistry4.RegisterInterface Method

Registers an interface for marshaling by using a locally registered proxy.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.9.0 (in Microsoft.VisualStudio.Shell.Interop.9.0.dll)

Syntax

'Declaration
Function RegisterInterface ( _
    ByRef riid As Guid _
) As Integer
int RegisterInterface(
    ref Guid riid
)
int RegisterInterface(
    [InAttribute] Guid% riid
)
abstract RegisterInterface : 
        riid:Guid byref -> int
function RegisterInterface(
    riid : Guid
) : int

Parameters

  • riid
    Type: Guid%

    ID of the interface to register.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

If riid is GUID_NULL, then all interfaces under HKEY_LOCAL_MACHINE\<RegRoot>\Interface that have a ProxyStubClsid32 entry will be registered.

Note

This method can affect performance if there are many interfaces with many different proxy DLLs because all those DLLs will be loaded.

If riid is IID_IUnknown, then only those interfaces that have an auto-register value (that is, AutoRegister set to non-zero) will be registered.

This method is safe to call from any thread.

There is no corresponding "unregister" method.

COM Signature

From vsshell90.idl:

HRESULT RegisterClassObject(
   [in] REFIID riid
);

.NET Framework Security

See Also

Reference

ILocalRegistry4 Interface

Microsoft.VisualStudio.Shell.Interop Namespace