RegistrationServices 類別

定義

提供一組服務用來從 COM 註冊和取消註冊 Managed 組件。

public ref class RegistrationServices : System::Runtime::InteropServices::IRegistrationServices
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.Guid("475E398F-8AFA-43a7-A3BE-F4EF8D6787C9")]
public class RegistrationServices : System.Runtime.InteropServices.IRegistrationServices
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.Guid("475E398F-8AFA-43a7-A3BE-F4EF8D6787C9")]
[System.Runtime.InteropServices.ComVisible(true)]
public class RegistrationServices : System.Runtime.InteropServices.IRegistrationServices
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.Guid("475e398f-8afa-43a7-a3be-f4ef8d6787c9")]
public class RegistrationServices : System.Runtime.InteropServices.IRegistrationServices
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Runtime.InteropServices.Guid("475E398F-8AFA-43a7-A3BE-F4EF8D6787C9")>]
type RegistrationServices = class
    interface IRegistrationServices
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Runtime.InteropServices.Guid("475E398F-8AFA-43a7-A3BE-F4EF8D6787C9")>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type RegistrationServices = class
    interface IRegistrationServices
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Runtime.InteropServices.Guid("475e398f-8afa-43a7-a3be-f4ef8d6787c9")>]
type RegistrationServices = class
    interface IRegistrationServices
Public Class RegistrationServices
Implements IRegistrationServices
繼承
RegistrationServices
屬性
實作

備註

當 COM 用戶端正在使用元件中的物件時,就需要註冊。 Regasm.exe (元件註冊工具) 和 Microsoft Visual Studio 2005 會使用類別所公開的方法 RegistrationServices ,為 managed 元件新增或移除啟用 COM 的登錄專案。

您可以使用下列方法來協助您準備註冊檔案:

雖然這些方法有助於收集要用於註冊檔案的資訊,但實際上並不會產生註冊檔。 相反地,您可以使用 Regasm.exe (元件註冊工具) 工具搭配執行這項工作的 /regfile 選項。 RegistrationServices 方法無法匯出和註冊類型程式庫。 若要匯出和註冊類型程式庫,您可以使用 Regasm.exe (元件註冊工具) 工具和 Tlbexp.exe (型別程式庫匯出工具) 工具。

建構函式

RegistrationServices()

初始化 RegistrationServices 類別的新執行個體。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetManagedCategoryGuid()

傳回包含 Managed 類別之 COM 分類的 GUID。

GetProgIdForType(Type)

擷取指定型別的 COM ProgID。

GetRegistrableTypesInAssembly(Assembly)

擷取組件中的類別清單,此組件是藉由呼叫 RegisterAssembly(Assembly, AssemblyRegistrationFlags) 而註冊。

GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
RegisterAssembly(Assembly, AssemblyRegistrationFlags)

註冊 Managed 組件中的類別,以啟用從 COM 的建立。

RegisterTypeForComClients(Type, Guid)

使用指定的 GUID 來註冊 COM 的特定型別。

RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType)

使用指定的執行內容和連接類型,向 COM 註冊指定的型別。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)
TypeRepresentsComType(Type)

指出某個型別是使用 ComImportAttribute 標記,或是衍生自使用 ComImportAttribute 標記的型別並與父代 (Parent) 共用相同的 GUID。

TypeRequiresRegistration(Type)

判斷指定的型別是否需要登錄。

UnregisterAssembly(Assembly)

取消註冊 Managed 組件中的類別。

UnregisterTypeForComClients(Int32)

移除以 RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType) 方法註冊的類型參考。

適用於

另請參閱