Directory Services |
The IADsPathname::SetDisplayType method specifies how to display the path of an object. It can query for the path to be displayed in a string with both naming attributes and values, that is, "CN=Jeff Smith" or with values only, that is, "Jeff Smith".
HRESULT SetDisplayType( long lnDisplayType );
This method supports the standard return values, including the following:
Return Code | Description |
---|---|
S_OK | The specified display type is valid and has been set successfully. |
E_FAIL | The specified display type cannot be set. |
The following Visual Basic code example sets to display the path in a string with both the naming attribute and the value.
Dim x As New Pathname x.SetDisplayType(ADS_DISPLAY_FULL)
The following VBScript code example sets to display the path in a string with both the naming attribute and the value.
Dim x const ADS_DISPLAY_FULL = 1 Set x = CreateObject("Pathname") x.SetDisplayType(ADS_DISPLAY_FULL)
The following C++ code example sets to display the path with both the naming attributes and values. For more information, see the code example for the GetPathnameObject function in IADsPathname.
LPWSTR adsPath=L"LDAP://server/cn=jeffsmith,dc=Fabrikam,dc=com"; IADsPathname *pPath = GetPathnameObject(adsPath); pPath->SetDisplayType(ADS_DISPLAY_FULL)
Client: Included in Windows XP and
Windows 2000 Professional.
Server: Included in Windows Server 2003 and
Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension
on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Iads.h.