DirectoryEntry.Invoke Method
Assembly: System.DirectoryServices (in system.directoryservices.dll)
'Declaration Public Function Invoke ( _ methodName As String, _ ParamArray args As Object() _ ) As Object 'Usage Dim instance As DirectoryEntry Dim methodName As String Dim args As Object() Dim returnValue As Object returnValue = instance.Invoke(methodName, args)
public Object Invoke ( String methodName, Object[] args )
public function Invoke ( methodName : String, ... args : Object[] ) : Object
Not applicable.
Parameters
- methodName
The name of the method to invoke.
- args
An array of type Object objects that contains the arguments of the method to invoke.
Return Value
The return value of the invoked method.| Exception type | Condition |
|---|---|
| The native method threw a COMException exception. | |
| The native method threw a TargetInvocationException exception. The InnerException property contains a COMException exception that contains information about the actual error that occurred. |
If the return value of the native method implements the IADs interface, a corresponding DirectoryEntry is returned. For more information about the IADs interface, see the topic IADs in the MSDN Library at http://msdn.microsoft.com/library.
- DirectoryServicesPermission To invoke the method.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.