// d3d10umddi.h
PFND3D10DDI_CHECKCOUNTER Pfnd3d10ddiCheckcounter;
VOID Pfnd3d10ddiCheckcounter(
D3D10DDI_HDEVICE unnamedParam1,
D3D10DDI_QUERY unnamedParam2,
D3D10DDI_COUNTER_TYPE *unnamedParam3,
UINT *unnamedParam4,
LPSTR unnamedParam5,
[in, out] UINT *pNameLength,
LPSTR unnamedParam7,
[in, out] UINT *pUnitsLength,
LPSTR unnamedParam9,
[in, out] UINT *pDescriptionLength
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The CheckCounter function retrieves information that describes a counter.
unnamedParam1hDevice [in]
A handle to the display device (graphics context).
unnamedParam2Query [in]
A D3D10DDI_QUERY-typed value that identifies the counter identifier that information is retrieved for.
unnamedParam3pCounterType [out]
A pointer to a variable that receives one of the following values from the D3D10DDI_COUNTER_TYPE enumeration that identifies the data type that the counter outputs.
| Value | Meaning |
|---|---|
| D3D10DDI_COUNTER_TYPE_FLOAT32 | Single-precision float |
| D3D10DDI_COUNTER_TYPE_UINT16 | 16-bit value |
| D3D10DDI_COUNTER_TYPE_UINT32 | 32-bit value |
| D3D10DDI_COUNTER_TYPE_UINT64 | 64-bit value |
unnamedParam4pDescription [out]
A pointer that the driver returns a NULL-terminated string to that contains the description of what the counter identifier measures.
unnamedParam5pActiveCounters [out]
A pointer to a variable that receives the number of simultaneously active counters that are allocated for the creation of the counter identifier that Query identifies.
pNameLength [in, out]A pointer to a variable that receives the size, in bytes, of the NULL-terminated string that the pName parameter specifies.
unnamedParam7pName [out]
A pointer that the driver returns a NULL-terminated string to that contains the name of the counter identifier.
pUnitsLength [in, out]A pointer to a variable that receives the size, in bytes, of the NULL-terminated string that the pUnits parameter specifies.
unnamedParam9pUnits [out]
A pointer that the driver returns a NULL-terminated string to that contains the name of the units that the counter identifier measures.
pDescriptionLength [in, out]A pointer to a variable that receives the size, in bytes, of the NULL-terminated string that the pDescription parameter specifies.
The driver can use the pfnSetErrorCb callback function to set an error code.
The driver's CheckCounter function can call the pfnSetErrorCb callback function to set the ERR_UNSUPPORTED error code if the Query parameter of CheckCounterspecifies a well-known counter that the device does not support.
The driver must validate a device-dependent counter identifier to ensure the identifier is within range. The driver must also ensure that enough space exists to copy each counter string into each buffer that the Microsoft Direct3D runtime provides. The driver can call the pfnSetErrorCb callback function to set the E_INVALIDARG error code if there is not enough space for any of the provided buffers.
The driver's CheckCounter function cannot call the pfnSetErrorCb callback function to set the D3DDDIERR_DEVICEREMOVED error code because CheckCounter is a capability-check type of function. The driver must ensure that it has enough information after device creation to respond to a call to CheckCounter, even in the presence of D3DDDIERR_DEVICEREMOVED.