LPDXUTCALLBACKDEVICERESET
Microsoft DirectX 9.0 SDK Update (October 2004)

LPDXUTCALLBACKDEVICERESET Prototype


Application-defined resource creation callback function, called by the sample framework after the Microsoft Direct3D device is reset. Passes a pointer to the newly reset device.

Syntax

typedef HRESULT (CALLBACK *LPDXUTCALLBACKDEVICERESET)(      

    IDirect3DDevice9 *pd3dDevice,     const D3DSURFACE_DESC *pBackBufferSurfaceDesc );

Parameters

pd3dDevice
[out] Pointer to the reset IDirect3DDevice9 device.
pBackBufferSurfaceDesc
[out] Pointer to a D3DSURFACE_DESC surface description of the back buffer.

Return Value

In general, if no error occurs, program the function to return S_OK.

Program the function to return an HRESULT error code if the function fails. If the sample framework receives a failure HRESULT code, it will shut down the application.

Remarks

This callback function is the appropriate location for the application to create default pool resources, in D3DPOOL_DEFAULT memory, since these resources need to be reloaded whenever the device is reset. Resources created in this callback function should be deleted in the LPDXUTCALLBACKDEVICELOST callback function.

Prototype Information

Headerdxut.h
Import libraryNone
Minimum operating systems Windows 98

See Also

Device Events, DXUTSetCallbackDeviceReset, DXUTSetCallbackDeviceLost, LPDXUTCALLBACKDEVICELOST, Lost Devices


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.