cgD3D9GetLastError
Keywords: cgD3D9GetLastError, NVIDIA, NVIDIA Cg Toolkit, Cg Toolkit, Shader, Shader Programming, GPU Shader Programming, GPU Program

> ## Name

> cgD3D9GetLastError - get the last D3D error that occurred

> ## Synopsis

>     #include <Cg/cgD3D9.h>

>     HRESULT cgD3D9GetLastError( void );

> ## Parameters

> None.

> ## Return Values

> Returns the last D3D error that occurred during an expanded interface function call.

> Returns D3D_OK if no D3D error has occurred since the last call to cgD3D9GetLastError.

> ## Description

> cgD3D9GetLastError retrieves the last D3D error that occurred during an expanded interface function call. The last error is always cleared immediately after the call.

> ## Examples

>       HRESULT lastError = cgD3D9GetLastError();

> ## Errors

> None.

> ## History

> cgD3D9GetLastError was introduced in Cg 1.1.

> ## See Also

> cgD3D9TranslateHRESULT