RegistrationServices.RegisterTypeForComClients Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Registrerar den angivna typen med COM.
Överlagringar
| Name | Description |
|---|---|
| RegisterTypeForComClients(Type, Guid) |
Registrerar den angivna typen med COM med det angivna GUID:et. |
| RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType) |
Registrerar den angivna typen med COM med den angivna körningskontexten och anslutningstypen. |
Kommentarer
Observera att användning av plattformsanrop för att anropa ohanterade CoRegisterClassObject metoder och CoDisconnectObject metoder för registrering och avregistrering av COM-objekt inte stöds.
RegisterTypeForComClients(Type, Guid)
Registrerar den angivna typen med COM med det angivna GUID:et.
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)
Parametrar
Implementeringar
- Attribut
Undantag
Parametern type är null.
Det går inte att skapa parametern type .
Kommentarer
Den här metoden motsvarar anrop CoRegisterClassObject i COM. Metoden RegisterTypeForComClients är inte atomisk och kan orsaka oförutsägbara resultat när den används i en flertrådad kontext.
I version 2.0 och senare använder du UnregisterTypeForComClients metoden för att avregistrera en typ i COM.
Observera att användning av plattformsanrop för att anropa ohanterade CoRegisterClassObject metoder och CoDisconnectObject metoder för registrering och avregistrering av COM-objekt inte stöds.
Se även
Gäller för
RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType)
Registrerar den angivna typen med COM med den angivna körningskontexten och anslutningstypen.
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
Parametrar
- classContext
- RegistrationClassContext
Ett av de RegistrationClassContext värden som anger kontexten där den körbara koden ska köras.
Ett av de RegistrationConnectionType värden som anger hur anslutningar görs till klassobjektet.
Returer
Ett heltal som representerar ett cookievärde.
- Attribut
Undantag
Parametern type är null.
Det går inte att skapa parametern type .
Kommentarer
Den här metoden motsvarar anrop CoRegisterClassObject i COM. Metoden RegisterTypeForComClients är inte atomisk och kan orsaka oförutsägbara resultat när den används i en flertrådad kontext.
I .NET Framework version 2.0 och senare använder du metoden UnregisterTypeForComClients för att avregistrera en typ i COM.
Observera att användning av plattformsanrop för att anropa ohanterade CoRegisterClassObject metoder och CoDisconnectObject metoder för registrering och avregistrering av COM-objekt inte stöds.