Microsoft DirectX 8.1 (C++) |
Retrieves information about the rendering device.
HRESULT GetInfo( DWORD DevInfoID, VOID* pDevInfoStruct, DWORD DevInfoStructSize );
If the method succeeds, the return value is D3D_OK.
If this method fails, the return value is one of following.
D3DERR_INVALIDCALL | One or more parameters are invalid. |
E_FAIL | All parameters are valid, but not supported. The structure passed in the pDevInfoStruct parameter is not filled. |
S_FALSE | All parameters are valid, but an unknown error occurred. The structure passed in the pDevInfoStruct parameter is not filled. |
Information returned by this method can pertain to the underlying device driver. This method makes it possible for drivers to declare specific information types and corresponding structures that are not documented in this software development kit (SDK).
This method executes synchronously and can negatively impact an application's performance when it executes slowly. Do not call this method during scene rendering (between calls to IDirect3DDevice8::BeginScene and IDirect3DDevice8::EndScene).
This method is intended to be used for performance tracking and debugging during product development.
The following table shows a list of all the possible input values and the expected return value. ID is equivalent to the DevInfoID parameter, Struct is equivalent to the pDevInfoStruct parameter, and Size is equivalent to the DevInfoStructSize parameter.
ID | Struct | Size | Expected return value |
---|---|---|---|
- | NULL | - | D3DERR_INVALIDCALL |
- | - | 0 | D3DERR_INVALIDCALL |
0 | Struct_7 | Size_7 | E_FAIL |
ID_1 | Struct_1 | Size_1 | E_FAIL |
ID_2 | Struct_2 | Size_2 | E_FAIL |
ID_3 | Struct_3 | Size_3 | E_FAIL |
ID_4 | Struct_4 | Size_4 | S_FALSE |
ID_5 | Struct_5 | Size_5 | |
ID_6 | Struct_6 | Size_6 | |
ID_7 | Struct_7 | Size_7 | E_FAIL |
The table below shows the possible values for ID.
ID_1 | D3DDEVINFOID_TEXTUREMANAGER |
ID_2 | D3DDEVINFOID_D3DTEXTUREMANAGER |
ID_3 | D3DDEVINFOID_TEXTURING |
ID_4 | D3DDEVINFOID_VCACHE |
ID_5 | D3DDEVINFOID_RESOURCEMANAGER |
ID_6 | D3DDEVINFOID_D3DVERTEXSTATS |
ID_7 | D3DDEVINFOID_UNKNOWN |
The table below shows the possible values for Struct.
Struct_1 | D3DDEVINFO_TEXTUREMANAGER |
Struct_2 | D3DDEVINFO_D3DTEXTUREMANAGER |
Struct_3 | D3DDEVINFO_TEXTUREMANAGER |
Struct_4 | D3DDEVINFO_VCACHE |
Struct_5 | D3DDEVINFO_RESOURCEMANAGER |
Struct_6 | D3DDEVINFO_D3DVERTEXSTATS |
Struct_7 | D3DDEVINFO_UNKNOWN |
The table below shows the possible values for Size.
Size_1 | sizeof(D3DDEVINFO_TEXTUREMANAGER) |
Size_2 | sizeof(D3DDEVINFO_D3DTEXTUREMANAGER) |
Size_3 | sizeof(D3DDEVINFO_TEXTUREMANAGER) |
Size_4 | sizeof(D3DDEVINFO_VCACHE) |
Size_5 | sizeof(D3DDEVINFO_RESOURCEMANAGER) |
Size_6 | sizeof(D3DDEVINFO_D3DVERTEXSTATS) |
Size_7 | sizeof(D3DDEVINFO_UNKNOWN) |
Header: Declared in D3d8.h.
Import Library: Use D3d8.lib.