IVMRMonitorConfig::GetAvailableMonitors method (strmif.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The GetAvailableMonitors method retrieves information about the monitors currently available on the system.

Syntax

HRESULT GetAvailableMonitors(
  [out] VMRMONITORINFO *pInfo,
  [in]  DWORD          dwMaxInfoArraySize,
  [out] DWORD          *pdwNumDevices
);

Parameters

[out] pInfo

Pointer to an array of VMRMONITORINFO structures that contain information about each monitor on the system.

[in] dwMaxInfoArraySize

Specifies the maximum number of members in the array.

[out] pdwNumDevices

Pointer to a variable that receives the number of devices retrieved.

Return value

Returns an HRESULT value. Possible values include the following.

Return code Description
E_INVALIDARG
Invalid argument; dwMaxInfoArraySize must be greater than zero.
E_POINTER
NULL pointer argument.
S_OK
Success.

Remarks

Use this method to get a list of DirectDraw device GUIDs and their associated monitor information that the VMR can use when connecting to an upstream decoder filter. To return the required array size in the pdwNumDevices parameter, specify NULL for pInfo.

Requirements

Requirement Value
Minimum supported client Windows XP with SP1 [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)
Library Strmiids.lib

See also

Error and Success Codes

IVMRMonitorConfig Interface

Using the Video Mixing Renderer