RegistrationServices.RegisterTypeForComClients Metoda

Definice

Zaregistruje zadaný typ v modelu COM.

Přetížení

RegisterTypeForComClients(Type, Guid)

Zaregistruje zadaný typ pomocí modelu COM pomocí zadaného identifikátoru GUID.

RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType)

Zaregistruje zadaný typ pomocí modelu COM s použitím zadaného kontextu spuštění a typu připojení.

Poznámky

Všimněte si, že volání nespravovaných CoRegisterClassObject metod a CoDisconnectObject metod pro registraci a zrušení registrace objektů COM není podporováno.

RegisterTypeForComClients(Type, Guid)

Zaregistruje zadaný typ pomocí modelu COM pomocí zadaného identifikátoru GUID.

public:
 virtual void RegisterTypeForComClients(Type ^ type, Guid % g);
public virtual void RegisterTypeForComClients (Type type, ref Guid g);
[System.Security.SecurityCritical]
public virtual void RegisterTypeForComClients (Type type, ref Guid g);
abstract member RegisterTypeForComClients : Type * Guid -> unit
override this.RegisterTypeForComClients : Type * Guid -> unit
[<System.Security.SecurityCritical>]
abstract member RegisterTypeForComClients : Type * Guid -> unit
override this.RegisterTypeForComClients : Type * Guid -> unit
Public Overridable Sub RegisterTypeForComClients (type As Type, ByRef g As Guid)

Parametry

type
Type

K Type registraci pro použití z modelu COM.

g
Guid

Slouží Guid k registraci zadaného typu.

Implementuje

Atributy

Výjimky

Parametr type je null.

Parametr type nelze vytvořit.

Poznámky

Tato metoda je ekvivalentní volání CoRegisterClassObject v modelu COM. Metoda RegisterTypeForComClients není atomická a při použití ve vícevláknovém kontextu může způsobit nepředvídatelné výsledky.

Ve verzi 2.0 a novější použijte metodu UnregisterTypeForComClients k zrušení registrace typu v modelu COM.

Všimněte si, že volání nespravovaných CoRegisterClassObject metod a CoDisconnectObject metod pro registraci a zrušení registrace objektů COM není podporováno.

Viz také

Platí pro

RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType)

Zaregistruje zadaný typ pomocí modelu COM s použitím zadaného kontextu spuštění a typu připojení.

public:
 virtual int RegisterTypeForComClients(Type ^ type, System::Runtime::InteropServices::RegistrationClassContext classContext, System::Runtime::InteropServices::RegistrationConnectionType flags);
[System.Runtime.InteropServices.ComVisible(false)]
public virtual int RegisterTypeForComClients (Type type, System.Runtime.InteropServices.RegistrationClassContext classContext, System.Runtime.InteropServices.RegistrationConnectionType flags);
[System.Runtime.InteropServices.ComVisible(false)]
[System.Security.SecurityCritical]
public virtual int RegisterTypeForComClients (Type type, System.Runtime.InteropServices.RegistrationClassContext classContext, System.Runtime.InteropServices.RegistrationConnectionType flags);
[<System.Runtime.InteropServices.ComVisible(false)>]
abstract member RegisterTypeForComClients : Type * System.Runtime.InteropServices.RegistrationClassContext * System.Runtime.InteropServices.RegistrationConnectionType -> int
override this.RegisterTypeForComClients : Type * System.Runtime.InteropServices.RegistrationClassContext * System.Runtime.InteropServices.RegistrationConnectionType -> int
[<System.Runtime.InteropServices.ComVisible(false)>]
[<System.Security.SecurityCritical>]
abstract member RegisterTypeForComClients : Type * System.Runtime.InteropServices.RegistrationClassContext * System.Runtime.InteropServices.RegistrationConnectionType -> int
override this.RegisterTypeForComClients : Type * System.Runtime.InteropServices.RegistrationClassContext * System.Runtime.InteropServices.RegistrationConnectionType -> int
Public Overridable Function RegisterTypeForComClients (type As Type, classContext As RegistrationClassContext, flags As RegistrationConnectionType) As Integer

Parametry

type
Type

Objekt Type , který se má zaregistrovat pro použití z modelu COM.

classContext
RegistrationClassContext

Jedna z RegistrationClassContext hodnot, která označuje kontext, ve kterém bude spustitelný kód spuštěn.

flags
RegistrationConnectionType

Jedna z RegistrationConnectionType hodnot, která určuje způsob připojení k objektu třídy.

Návraty

Celé číslo, které představuje hodnotu souboru cookie.

Atributy

Výjimky

Parametr type je null.

Parametr type nelze vytvořit.

Poznámky

Tato metoda je ekvivalentní volání CoRegisterClassObject v modelu COM. Metoda RegisterTypeForComClients není atomická a při použití ve vícevláknovém kontextu může způsobit nepředvídatelné výsledky.

V rozhraní .NET Framework verze 2.0 a novější použijte metodu UnregisterTypeForComClients k zrušení registrace typu v modelu COM.

Všimněte si, že volání nespravovaných CoRegisterClassObject metod a CoDisconnectObject metod pro registraci a zrušení registrace objektů COM není podporováno.

Platí pro