IWiaUIExtension2::GetDeviceIcon method

Gets a custom device icon.

Syntax

HRESULT GetDeviceIcon(
  [in]  BSTR  bstrDeviceId,
  [out] HICON *phIcon,
  [in]  ULONG nSize
);

Parameters

bstrDeviceId [in]

Type: BSTR

Specifies the device ID of the WIA device for which the icon is to be obtained.

phIcon [out]

Type: HICON*

Points to a memory location that will receive a handle for the icon for the device.

nSize [in]

Type: ULONG

Specifies the desired icon size, in pixels. The icon is assumed to be square, and nSize specifies both the width and height of the requested icon.

Return value

Type: HRESULT

If the method succeeds, it returns S_OK. If the method fails, it returns an appropriate error code. The following table shows some of the possible return status codes.

Error code Description
E_INVALIDARG Parameter bstrDeviceId or phIcon is NULL, or bstrDeviceId does not point to a valid WIA device ID string
E_FAIL No icon resource is available.
E_NOTIMPL No icon of the size requested is available.

 

Requirements

Requirement Value
Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Wiadevd.h