RegistrationServices.RegisterTypeForComClients Metode

Definisi

Mendaftarkan jenis yang ditentukan dengan COM.

Overload

RegisterTypeForComClients(Type, Guid)

Mendaftarkan jenis yang ditentukan dengan COM menggunakan GUID yang ditentukan.

RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType)

Mendaftarkan jenis yang ditentukan dengan COM menggunakan konteks eksekusi dan jenis koneksi yang ditentukan.

Keterangan

Perhatikan bahwa menggunakan pemanggilan platform untuk memanggil metode yang tidak dikelola CoRegisterClassObject dan CoDisconnectObject untuk pendaftaran dan pembatalan pendaftaran objek COM tidak didukung.

RegisterTypeForComClients(Type, Guid)

Mendaftarkan jenis yang ditentukan dengan COM menggunakan GUID yang ditentukan.

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)

Parameter

type
Type

yang Type akan didaftarkan untuk digunakan dari COM.

g
Guid

yang Guid digunakan untuk mendaftarkan jenis yang ditentukan.

Penerapan

Atribut

Pengecualian

Parameternya type adalah null.

Parameter type tidak dapat dibuat.

Keterangan

Metode ini setara dengan panggilan CoRegisterClassObject di COM. Metode RegisterTypeForComClients ini tidak atomik dan dapat menyebabkan hasil yang tidak dapat diprediksi ketika digunakan dalam konteks multithreaded.

Di versi 2.0 dan yang UnregisterTypeForComClients lebih baru, gunakan metode untuk membatalkan pendaftaran jenis di COM.

Perhatikan bahwa menggunakan pemanggilan platform untuk memanggil metode yang tidak dikelola CoRegisterClassObject dan CoDisconnectObject untuk pendaftaran dan pembatalan pendaftaran objek COM tidak didukung.

Lihat juga

Berlaku untuk

RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType)

Mendaftarkan jenis yang ditentukan dengan COM menggunakan konteks eksekusi dan jenis koneksi yang ditentukan.

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

Parameter

type
Type

Objek Type yang akan didaftarkan untuk digunakan dari COM.

classContext
RegistrationClassContext

Salah RegistrationClassContext satu nilai yang menunjukkan konteks di mana kode yang dapat dieksekusi akan dijalankan.

flags
RegistrationConnectionType

Salah RegistrationConnectionType satu nilai yang menentukan bagaimana koneksi dibuat ke objek kelas.

Mengembalikan

Bilangan bulat yang mewakili nilai cookie.

Atribut

Pengecualian

Parameternya type adalah null.

Parameter type tidak dapat dibuat.

Keterangan

Metode ini setara dengan panggilan CoRegisterClassObject di COM. Metode RegisterTypeForComClients ini tidak atomik dan dapat menyebabkan hasil yang tidak dapat diprediksi ketika digunakan dalam konteks multithreaded.

Di .NET Framework versi 2.0 dan yang lebih baru, gunakan UnregisterTypeForComClients metode untuk membatalkan pendaftaran jenis di COM.

Perhatikan bahwa menggunakan pemanggilan platform untuk memanggil metode yang tidak dikelola CoRegisterClassObject dan CoDisconnectObject untuk pendaftaran dan pembatalan pendaftaran objek COM tidak didukung.

Berlaku untuk