GetNumberOfPhysicalMonitorsFromHMONITOR function

Retrieves the number of physical monitors associated with an HMONITOR monitor handle. Call this function before calling GetPhysicalMonitorsFromHMONITOR.

Syntax


BOOL GetNumberOfPhysicalMonitorsFromHMONITOR(
  _In_   HMONITOR hMonitor,
  _Out_  LPDWORD pdwNumberOfPhysicalMonitors
);

Parameters

hMonitor [in]

A monitor handle. Monitor handles are returned by several Multiple Display Monitor functions, including EnumDisplayMonitors and MonitorFromWindow, which are part of the graphics device interface (GDI).

pdwNumberOfPhysicalMonitors [out]

Receives the number of physical monitors associated with the monitor handle.

Return value

If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE. To get extended error information, call GetLastError.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

PhysicalMonitorEnumerationAPI.h

Library

Dxva2.lib

DLL

Dxva2.dll

See also

Monitor Configuration Functions
GetPhysicalMonitorsFromHMONITOR

 

 

Show: