|Microsoft DirectX 9.0|
Gets the query information.
void* pData, DWORD dwSize, DWORD dwGetDataFlags );
- [in, out] Pointer to a buffer containing the query data.
- [in] Number of bytes of data. See Remarks.
- [in] Data flags specifying the query type. Valid values are either 0 or D3DGETDATA_FLUSH, which will force the runtime to flush the query down to the driver. See Remarks.
The method returns S_OK if the query data is available and S_FALSE if it is not. These are considered successful return values.
If the method fails when D3DGETDATA_FLUSH is used, the return value can be D3DERR_DEVICELOST.
The application is expected to pass the right amount of data for the query results. If the query result is available, the runtime returns the query data.
The size of dwSize depends on the query type given as follows:
Use D3DGETDATA_FLUSH to flush the internally batched queries to the driver. For applications writing their own version of waiting, results of queries from the driver are batched (not realized) until the driver receives a flush.
Query Type Size D3DQUERYTYPE_VCACHE sizeof(D3DDEVINFO_VCACHE) D3DQUERYTYPE_RESOURCEMANAGER sizeof(D3DDEVINFO_RESOURCEMANAGER) D3DQUERYTYPE_VERTEXSTATS sizeof(D3DDEVINFO_D3DVERTEXSTATS) D3DQUERYTYPE_EVENT sizeof(BOOL) D3DQUERYTYPE_OCCLUSION sizeof(DWORD)
When D3DGETDATA_FLUSH is specified, this method can also return D3DERR_DEVICELOST in response to a device that is lost. This allows an application to prevent threads from polling forever due to a lost device (which cannot respond to the query).