Export (0) Print
Expand All
Expand Minimize
0 out of 2 rated this helpful - Rate this topic

DXVA2CreateDirect3DDeviceManager9 function

Creates an instance of the Direct3D Device Manager.

Syntax


HRESULT DXVA2CreateDirect3DDeviceManager9(
  _Out_  UINT *pResetToken,
  _Out_  IDirect3DDeviceManager9 **ppDXVAManager
);

Parameters

pResetToken [out]

Receives a token that identifies this instance of the Direct3D device manager. Use this token when calling IDirect3DDeviceManager9::ResetDevice.

ppDXVAManager [out]

Receives a pointer to the IDirect3DDeviceManager9 interface. The caller must release the interface.

Return value

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

Remarks

Windows Store apps must use IMFDXGIDeviceManager and Direct3D 11 Video APIs.

Examples


HRESULT CreateD3DDeviceManager(
    IDirect3DDevice9 *pDevice, 
    UINT *pReset, 
    IDirect3DDeviceManager9 **ppManager
    )
{
    UINT resetToken = 0;

    IDirect3DDeviceManager9 *pD3DManager = NULL;

    HRESULT hr = DXVA2CreateDirect3DDeviceManager9(&resetToken, &pD3DManager);

    if (FAILED(hr))
    {
        goto done;
    }

    hr = pD3DManager->ResetDevice(pDevice, resetToken);

    if (FAILED(hr))
    {
        goto done;
    }

    *ppManager = pD3DManager;
    (*ppManager)->AddRef();

    *pReset = resetToken;


done:
    SafeRelease(&pD3DManager);
    return hr;
}


Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Dxva2api.h

Library

Dxva2.lib

DLL

Dxva2.dll

See also

Direct3D Device Manager
Media Foundation Functions

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.