IVMRMonitorConfig9::GetAvailableMonitors method (vmr9.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] VMR9MonitorInfo *pInfo,
[in] DWORD dwMaxInfoArraySize,
[out] DWORD *pdwNumDevices
);
Parameters
[out] pInfo
Pointer to an array of VMR9MonitorInfo structures that contain information about each monitor on the system.
[in] dwMaxInfoArraySize
Specifies the maximum number of members in the array.
[out] pdwNumDevices
If pInfo is NULL, this parameter receives the required array size. Otherwise, it receives the actual number of devices retrieved.
Return value
The method returns an HRESULT. Possible values include the following.
Return code | Description |
---|---|
|
Invalid argument; dwMaxInfoArraySize must be greater than zero. |
|
NULL pointer argument. |
|
The method succeeded. |
Remarks
Use this method to get a list of Direct Draw device identifiers and their associated monitor information that the mixer can use when connecting to an upstream decoder filter.
Include DShow.h and D3d9.h before Vmr9.h.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP with SP2 [desktop apps only] |
Minimum supported server | Windows Server 2003 R2 [desktop apps only] |
Target Platform | Windows |
Header | vmr9.h |
Library | Strmiids.lib |