ID3D11Device::CheckCounter Method

Get the type, name, units of measure, and a description of an existing counter.

Syntax

HRESULT CheckCounter(
  [in]       const D3D11_COUNTER_DESC *pDesc,
  [out]      D3D11_COUNTER_TYPE *pType,
  [out]      UINT *pActiveCounters,
  [out]      LPSTR szName,
  [in, out]  UINT *pNameLength,
  [out]      LPSTR szUnits,
  [in, out]  UINT *pUnitsLength,
  [out]      LPSTR szDescription,
  [in, out]  UINT *pDescriptionLength
);

Parameter

  • pDesc [in]
    Typ: const D3D11_COUNTER_DESC*

    Pointer to a counter description (see D3D11_COUNTER_DESC). Specifies which counter information is to be retrieved about.

  • pType [out]
    Typ: D3D11_COUNTER_TYPE*

    Pointer to the data type of a counter (see D3D11_COUNTER_TYPE). Specifies the data type of the counter being retrieved.

  • pActiveCounters [out]
    Typ: UINT*

    Pointer to the number of hardware counters that are needed for this counter type to be created. All instances of the same counter type use the same hardware counters.

  • szName [out]
    Typ: LPSTR

    String to be filled with a brief name for the counter. May be NULL if the application is not interested in the name of the counter.

  • pNameLength [in, out]
    Typ: UINT*

    Length of the string returned to szName. Can be NULL.

  • szUnits [out]
    Typ: LPSTR

    Name of the units a counter measures, provided the memory the pointer points to has enough room to hold the string. Can be NULL. The returned string will always be in English.

  • pUnitsLength [in, out]
    Typ: UINT*

    Length of the string returned to szUnits. Can be NULL.

  • szDescription [out]
    Typ: LPSTR

    A description of the counter, provided the memory the pointer points to has enough room to hold the string. Can be NULL. The returned string will always be in English.

  • pDescriptionLength [in, out]
    Typ: UINT*

    Length of the string returned to szDescription. Can be NULL.

Rückgabewert

Typ: HRESULT

This method returns one of the following Direct3D 11 Return Codes.

Hinweise

Length parameters can be NULL, which indicates the application is not interested in the length nor the corresponding string value. When a length parameter is non-NULL and the corresponding string is NULL, the input value of the length parameter is ignored, and the length of the corresponding string (including terminating NULL) will be returned through the length parameter. When length and the corresponding parameter are both non-NULL, the input value of length is checked to ensure there is enough room, and then the length of the string (including terminating NULL character) is passed out through the length parameter.

Anforderungen

Header

D3D11.h

Bibliothek

D3D11.lib

Siehe auch

ID3D11Device