WerReportSetParameter function

Sets the parameters that uniquely identify an event for the specified report.

Syntax

HRESULT WerReportSetParameter(
  HREPORT hReportHandle,
  DWORD   dwparamID,
  PCWSTR  pwzName,
  PCWSTR  pwzValue
);

Parameters

hReportHandle

A handle to the report. This handle is returned by the WerReportCreate function.

dwparamID

The identifier of the parameter to be set. This parameter can be one of the following values.

WER_P0

WER_P1

WER_P2

WER_P3

WER_P4

WER_P5

WER_P6

WER_P7

WER_P8

WER_P9

pwzName

A pointer to a Unicode string that contains the name of the parameter. If this parameter is NULL, the default name is Px, where x matches the integer portion of the value specified in dwparamID.

pwzValue

The parameter value.

Return value

This function returns S_OK on success or an error code on failure, including the following error code.

Return code Description
E_HANDLE
The specified handle is not valid.
WER_E_LENGTH_EXCEEDED
The length of one or more string arguments has exceeded its limit.

Remarks

Each report supports parameters P0 through P9. This function sets one parameter at a time. If parameter Px is set, then all parameters from P0 and Px must be set.

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header werapi.h
Library Wer.lib
DLL Wer.dll

See also

WER Functions

WerReportCreate

Windows Error Reporting