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 codeDescription
E_INVALIDARGParameter bstrDeviceId or phIcon is NULL, or bstrDeviceId does not point to a valid WIA device ID string
E_FAILNo icon resource is available.
E_NOTIMPLNo icon of the size requested is available.

 

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Wiadevd.h

 

 

Community Additions

ADD
Show:
© 2014 Microsoft