DirectoryEntry.Invoke(String, Object[]) DirectoryEntry.Invoke(String, Object[]) DirectoryEntry.Invoke(String, Object[]) DirectoryEntry.Invoke(String, Object[]) Method

定義

呼叫原生 Active Directory 網域服務物件上的方法。Calls a method on the native Active Directory Domain Services object.

public:
 System::Object ^ Invoke(System::String ^ methodName, ... cli::array <System::Object ^> ^ args);
public object Invoke (string methodName, params object[] args);
member this.Invoke : string * obj[] -> obj
Public Function Invoke (methodName As String, ParamArray args As Object()) As Object

參數

methodName
String String String String

要叫用之方法的名稱。The name of the method to invoke.

args
Object[]

型別 Object 物件的陣列,包含要叫用之方法的引數。An array of type Object objects that contains the arguments of the method to invoke.

傳回

已叫用之方法的傳回值。The return value of the invoked method.

例外狀況

原生方法擲回 TargetInvocationException 例外狀況。The native method threw a TargetInvocationException exception. InnerException 屬性包含 COMException 例外狀況,其包含已發生之實際錯誤的相關資訊。The InnerException property contains a COMException exception that contains information about the actual error that occurred.

備註

如果原生方法的傳回值會執行 iad 介面,則會傳回DirectoryEntry對應的。If the return value of the native method implements the IADs interface, a corresponding DirectoryEntry is returned. 如需有關 Iad 介面的詳細資訊,請參閱iad一文。For more information about the IADs interface, see the IADs article.

安全性

DirectoryServicesPermission
以叫用方法。To invoke the method.

適用於