Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
 Invoke Method

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
DirectoryEntry..::.Invoke Method

Calls a method on the native Active Directory Domain Services object.

Namespace:  System.DirectoryServices
Assembly:  System.DirectoryServices (in System.DirectoryServices.dll)
Visual Basic (Declaration)
Public Function Invoke ( _
    methodName As String, _
    ParamArray args As Object() _
) As Object
Visual Basic (Usage)
Dim instance As DirectoryEntry
Dim methodName As String
Dim args As Object()
Dim returnValue As Object

returnValue = instance.Invoke(methodName, _
    args)
C#
public Object Invoke(
    string methodName,
    params Object[] args
)
Visual C++
public:
Object^ Invoke(
    String^ methodName, 
    ... array<Object^>^ args
)
JScript
public function Invoke(
    methodName : String, 
    ... args : Object[]
) : Object

Parameters

methodName
Type: System..::.String
The name of the method to invoke.
args
Type: array<System..::.Object>[]()[]
An array of type Object objects that contains the arguments of the method to invoke.

Return Value

Type: System..::.Object
The return value of the invoked method.
ExceptionCondition
DirectoryServicesCOMException

The native method threw a COMException exception.

TargetInvocationException

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.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Kerberos and Windows servers      Pino-Eire   |   Edit   |   Show History
Careful! the second point in the remarks for the SetPassword (at http://msdn.microsoft.com/en-us/library/aa746344(VS.85).aspx) looks related to Windows 2000 only: well it's not the case as it applies to Windows 2003 as well. I will not be surprised if it applies also to the 2008 Server.

For completion I add here a reminder about what works or not (from SRQ080612600548):
  • Setting the password specifying the server with a DNS name works, with or without a port number in the address.
  • Setting the password specifying the IP of the server works only if no port is specified.
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker