LPDIRECT3DDEVICE9 pDevice; // assume device was created D3DCAPS9 caps; pDevice->GetDeviceCaps(&caps); // print some device properties printf("Device type: %d\n", caps.DeviceType); printf("Max texture width: %d\n", caps.MaxTextureWidth); printf("Max vertex shader version: %d\n", caps.VertexShaderVersion);
LPDIRECT3D9 pD3D; // assume Direct3D object was created D3DADAPTER_IDENTIFIER9 adapterId; pD3D->GetAdapterIdentifier(D3DADAPTER_DEFAULT, 0, &adapterId); // print some adapter properties printf("Adapter name: %s\n", adapterId.Description); printf("Vendor ID: 0x%x\n", adapterId.VendorId); printf("Driver version: %d.%d.%d.%d\n", HIWORD(adapterId.DriverVersion.HighPart), LOWORD(adapterId.DriverVersion.HighPart), HIWORD(adapterId.DriverVersion.LowPart), LOWORD(adapterId.DriverVersion.LowPart));This example retrieves the adapter name, vendor ID, and driver version used by the graphics card. Package library: Microsoft DirectX SDK