Skip to main content
IDesktopWallpaper::GetMonitorDevicePathCount method

Retrieves the number of monitors that are associated with the system.

Syntax


HRESULT GetMonitorDevicePathCount(
  [out]  UINT *count
);

Parameters

count [out]

A pointer to a value that, when this method returns successfully, receives the number of monitors.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code, including the following.

Return codeDescription
E_POINTER

A NULL pointer was provided in monitorID.

 

Remarks

The count retrieved through this method includes monitors that are currently detached but that have an image assigned to them. Call GetMonitorRECT to distinguish between attached and detached monitors.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

See also

IDesktopWallpaper
IDesktopWallpaper::GetMonitorDevicePathAt