IDsDisplaySpecifier::GetDisplaySpecifier method (dsclient.h)
The IDsDisplaySpecifier::GetDisplaySpecifier method binds to the display specifier object for a given class in Active Directory Domain Services.
Syntax
HRESULT GetDisplaySpecifier(
[in] LPCWSTR pszObjectClass,
[in] REFIID riid,
[in, out] void **ppv
);
Parameters
[in] pszObjectClass
Pointer to a null-terminated Unicode string that contains the name of the object class to retrieve the display specifier for.
[in] riid
Contains the interface identifier of the desired interface.
[in, out] ppv
Pointer to an interface pointer that receives the display specifier of the object class.
Return value
Returns a standard HRESULT value including the following.
Remarks
This method uses the ADsOpenObject function to bind to the display specifier object of the given class. If that fails, it attempts to bind to the display specifier in the user locale. If this fails again, it binds to the display specifier in the default locale.
This method uses the server and user credentials set by a previous call to IDsDisplaySpecifier::SetServer.
Examples
The following code example demonstrates how to call this method.
HRESULT hr;
IDsDisplaySpecifier *pDS;
hr = CoCreateInstance(CLSID_DsDisplaySpecifier,
NULL,
CLSCTX_INPROC_SERVER,
IID_IDsDisplaySpecifier,
(void**)&pDS);
if(SUCCEEDED(hr))
{
IADs *pads;
hr = pDS->GetDisplaySpecifier(L"user", IID_IADs, (LPVOID*)&pads);
if(SUCCEEDED(hr))
{
pads->Release();
}
pDS->Release();
}
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | dsclient.h |
DLL | Dsadmin.dll |