LPDIRECT3DSURFACE9 pDepthStencilSurface = NULL; pDevice->GetDepthStencilSurface(&pDepthStencilSurface);
LPDIRECT3DSURFACE9 pDepthStencilSurface = NULL; D3DSURFACE_DESC desc; pDevice->GetDepthStencilSurface(&pDepthStencilSurface); pDepthStencilSurface->GetDesc(&desc);This example first retrieves a pointer to the depth stencil surface associated with the device and assigns it to a LPDIRECT3DSURFACE9 variable named pDepthStencilSurface. Then, it retrieves the surface description of the depth stencil surface by calling the GetDesc function on pDepthStencilSurface and assigns it to a D3DSURFACE_DESC variable named desc.