Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
![]() |
The GetDeviceIcon method returns a HICON that represents the icon that the device service provider indicates must be used to represent this device.
Syntax
HRESULT GetDeviceIcon(ULONG*hIcon);
Parameters
hIcon
[out] Handle to an Icon object that receives the icon for the device. Before using it, the caller must cast the value to a HICON*. When an application is finished with the icon, it should call DestroyIcon to free the resource. DestroyIcon is a standard Win32 function.
Return Values
The method returns an HRESULT. All the interface methods in Windows Media Device Manager can return any of the following classes of error codes:
- Standard COM error codes
- Windows error codes converted to HRESULT values
- Windows Media Device Manager error codes
For an extenstive list of possible error codes, see Error Codes.
Possible values include, but are not limited to, those in the following table.
| Return code | Description |
| S_OK | The method succeeded. |
| E_INVALIDARG | The hIcon parameter is an invalid or NULL pointer. |
| WMDM_E_NOTCERTIFIED | The caller is not certified. |
Remarks
In addition to the values above, the HRESULT error code could be a Win32 error.
This method must be implemented. It must not return WMDM_E_NOTSUPPORTED or E_NOTIMPL. For more information, see Mandatory and Optional Interfaces.
Requirements
Header: Defined in mswmdm.h.
Library: mssachlp.lib
See Also
.gif)