Platform SDK: Active Directory, ADSI, and Directory Services

IDsDisplaySpecifier::GetIconLocation

The IDsDisplaySpecifier::GetIconLocation method fetches the location of an icon from the display specifier, returning both the filename and the resource ID as required.

HRESULT GetIconLocation(
  LPCWSTR pszObjectClass,
  DWORD dwFlags,
  LPWSTR pszBuffer,
  INT cchBuffer,
  INT *presid
);

Parameters

pszObjectClass
[in] Name of the object class with which the icon is associated.
dwFlags
[in] A flag indicating the type of icon to be fetched:
dwFlags Description
DSGIF_ISNORMAL Standard icon.
DSGIF_OPEN Open icon, for example, open folders.
DSGIF_DISABLED Disabled icon, for example, disabled user account.
DSGIF_GETDEFAULTICON Default document icon from Shell32.

pszBuffer
[in, out] Pointer to the string buffer to receive the file name.
cchBuffer
[in] Size of the buffer, in characters.
*presid
[in, out] Pointer to an integer to receive the resource identifier, (+ve for index, -ve for resource).

Return Values

This method returns an HRESULT value.

Remarks

The caller of this method can load the icon image into the application, or display this information in a dialog.

The default icon is returned if the object has no icon.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Dsclient.h.
  Library: Included as a resource in Dsuiext.dll.

See Also

Active Directory Display Interfaces, IDsDisplaySpecifier, IDsDisplaySpecifier::GetIcon