共用方式為


IComManagedImportUtil.GetComponentInfo(String, String, String) 方法

定義

從組件 (Assembly) 取得元件資訊。

public:
 void GetComponentInfo(System::String ^ assemblyPath, [Runtime::InteropServices::Out] System::String ^ % numComponents, [Runtime::InteropServices::Out] System::String ^ % componentInfo);
public void GetComponentInfo (string assemblyPath, out string numComponents, out string componentInfo);
abstract member GetComponentInfo : string * string * string -> unit
Public Sub GetComponentInfo (assemblyPath As String, ByRef numComponents As String, ByRef componentInfo As String)

參數

assemblyPath
String

組件的路徑。

numComponents
String

當這個方法傳回時,這個參數會包含組件中的元件數目。

componentInfo
String

當這個方法傳回時,這個參數會包含元件的相關資訊。

例外狀況

assemblyPath 為空字串 ("");只包含泛空白字元 (White Space),或包含一個以上如 InvalidPathChars 所定義的無效字元。

-或-

系統可能不會擷取絕對路徑。

呼叫端沒有必要的權限。

assemblyPathnull

assemblyPath 包含冒號 (":")。

指定的路徑、檔案名稱,或兩者都超出系統定義的長度上限。

備註

COM+ 目錄會呼叫這個方法,以在註冊 DLL 之前,先識別 (CLSID) 和 DLL 中元件的 ProgID 類別識別碼。

適用於