Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IMFDXGIDeviceManager::ResetDevice method

Sets the Microsoft Direct3D device or notifies the device manager that the Direct3D device was reset.

Syntax


HRESULT ResetDevice(
  [in]  IUnknown *pUnkDevice,
  [in]  UINT resetToken
);

Parameters

pUnkDevice [in]

A pointer to the IUnknown interface of the DXGI device.

resetToken [in]

The token that was received in the pResetToken parameter of the MFCreateDXGIDeviceManager function.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

When you first create the DXGI Device Manager, call this method with a pointer to the Direct3D device. (The device manager does not create the device; the caller must provide the device pointer initially.) Also call this method if the Direct3D device becomes lost and you need to reset the device or create a new device.

The resetToken parameter ensures that only the component that originally created the device manager can invalidate the current device.

If this method succeeds, all open device handles become invalid.

To create a Microsoft Direct3D 11 device, call D3D11CreateDevice.

The device should be created with the D3D11_CREATE_DEVICE_VIDEO_SUPPORT device creation flag which is defined in the D3D11_CREATE_DEVICE_FLAG enumeration.

It is recommended that you use multi-thread protection on the device context to prevent deadlock issues that can sometimes happen when you call ID3D11VideoContext::GetDecoderBuffer or ID3D11VideoContext::ReleaseDecoderBuffer. To set multi-thread protection, first call QueryInterface on ID3D11Device to get an ID3D10Multithread pointer. Then call ID3D10Multithread::SetMultithreadProtected, passing in true for bMTProtect.

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Header

Mfobjects.h (include Mfidl.h)

See also

IMFDXGIDeviceManager

 

 

Community Additions

Show:
© 2014 Microsoft