Microsoft DirectX 9.0 |
This topic applies to the VMR-7 only. The VMR-9 has a different technique for enabling exclusive mode.
In DirectDraw Exclusive Mode, an application takes exclusive control of the graphics hardware. This is useful for applications such as games, or perhaps full-screen video applications. Normally, the VMR creates the DirectDraw objects and sets the cooperative level to normal. However, to run the VMR in DirectDraw Exclusive Mode, the application itself must create the DirectDraw object and the primary surface, and call SetCooperativeLevel to specify exclusive mode.
The VMR has a special allocator-presenter that enables it to run in DirectDraw Exclusive Mode. To configure the VMR to use this allocator-presenter:
IVMRImagePresenterExclModeConfig* pExclModeConfig;
CoCreateInstance(
CLSID_AllocPresenterDDXclMode,
NULL,
CLSCTX_INPROC_SERVER,
IID_IVMRImagePresenterExclModeConfig,
(void**)&pExclModeConfig
);
pExclModeConfig->SetXlcModeDDObjAndPrimarySurface(...);