ADsGetObject

In Active Directory, bind to an object given its path and primary interface identifier (IID).

HRESULT ADsGetObject(
  LPWSTR lpszPathName,  //The ADsPath name of the object
  REFIID riid,          //IID of primary interface
  VOID ** ppObject      //Interface on that object
);
 

Parameters

lpszPathName
[in] The path name to use to bind to the object in the underlying directory service.
riid
[in] Interface identifier for the primary interface on this object.
ppObject
[out] Indirect pointer to the riid Interface identifier.

Return Values

This method supports the standard return values E_FAIL and E_UNEXPECTED, as well as the following:

S_OK
Binding to the specified object has been successful.

Remarks

The ADsGetObject helper function is called by the C/C++ client to bind to an Active Directory object. Like Visual Basic's internal GetObject() function, ADsGetObject takes as input a display name and returns a pointer to the requested interface.

QuickInfo

  Windows NT: Use version 4.0 and later.
  Windows CE: Unsupported.

See Also