GetPhysicalMonitors function

Important

This function is used by the monitor configuration API to access functionality in the display driver. Applications should not call this function.

Gets the physical monitors associated with a display device.

Syntax

NTSTATUS WINAPI GetPhysicalMonitors(
  _In_  UNICODE_STRING *pstrDeviceName,
  _In_  DWORD          dwPhysicalMonitorArraySize,
  _Out_ DWORD          *pdwNumPhysicalMonitorHandlesInArray,
  _Out_ HANDLE         *phPhysicalMonitorArray
);

Parameters

pstrDeviceName [in]

A pointer to a UNICODE_STRING structure that contains the name of the display device, as returned by the GetMonitorInfo function.

dwPhysicalMonitorArraySize [in]

The number of elements in the pdwNumPhysicalMonitorHandlesInArray array. To get the required size of the array, call GetNumberOfPhysicalMonitors.

pdwNumPhysicalMonitorHandlesInArray [out]

Receives the number of items that the function copies to the phPhysicalMonitorArray array.

phPhysicalMonitorArray [out]

An array that receives handles to the physical monitors. Each handle must be released by calling DestroyPhysicalMonitor.

Return value

If the method succeeds, it returns STATUS_SUCCESS. Otherwise, it returns an NTSTATUS error code.

Remarks

Instead of using this function, applications should call one of the following functions:

This function has no associated import library. To call this function, you must use the LoadLibrary and GetProcAddress functions to dynamically link to Gdi32.dll.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
DLL
Gdi32.dll

See also

Monitor Configuration Functions