WerReportSubmit function (werapi.h)
Submits the specified report.
Syntax
HRESULT WerReportSubmit(
[in] HREPORT hReportHandle,
[in] WER_CONSENT consent,
[in] DWORD dwFlags,
[out, optional] PWER_SUBMIT_RESULT pSubmitResult
);
Parameters
[in] hReportHandle
A handle to the report. This handle is returned by the WerReportCreate function.
[in] consent
The consent status. This parameter can be one of the following values from the WER_CONSENT enumeration type.
[in] dwFlags
This parameter can be one or more of the following values.
Value | Meaning |
---|---|
|
Add the data registered by WerSetFlags, WerRegisterFile, and WerRegisterMemoryBlock to the report. |
|
Honor any recovery registration for the application. For more information, see RegisterApplicationRecoveryCallback. |
|
Honor any restart registration for the application. For more information, see RegisterApplicationRestart. |
|
Do not archive the report. |
|
Do not display the close dialog box for the critical report. |
|
Do not queue the report. If there is adequate user consent the report is sent to Microsoft immediately; otherwise, the report is discarded. You may use this flag for non-critical reports.
The report is discarded for any action that would require the report to be queued. For example, if the computer is offline when you submit the report, the report is discarded. Also, if there is insufficient consent (for example, consent was required for the data portion of the report), the report is discarded. |
|
Spawn another process to submit the report. The calling thread is blocked until the function returns. |
|
Spawn another process to submit the report and return from this function call immediately. Note that the contents of the pSubmitResult parameter are undefined and there is no way to query when the reporting completes or the completion status. |
|
Add the report to the WER queue without notifying the user. The report is queued only—reporting (sending the report to Microsoft) occurs later based on the user's consent level. |
|
Show the debug button. |
|
The initial UI is minimized and flashing. |
|
Bypass data throttling for the report.
Windows 7 or earlier: This parameter is not available. |
|
Archive only the parameters; the cab is discarded. This flag overrides the ConfigureArchive WER setting.
Windows 7 or earlier: This parameter is not available. |
|
Always send the unique, 128-bit computer identifier with the report, regardless of the consent with which the report was submitted. See Remarks for additional information.
Windows 7 or earlier: This parameter is not available. |
[out, optional] pSubmitResult
The result of the submission. This parameter can be one of the following values from the WER_SUBMIT_RESULT enumeration type.
Return value
This function returns S_OK on success or an error code on failure.
Remarks
After the application calls this function, WER collects the specified data. If the consent parameter is WerConsentApproved, it submits the report to Microsoft. If consent is WerConsentNotAsked, WER displays the consent dialog box. To determine the submission status, check the pSubmitResult parameter.
In the event of a critical application event, applications that have registered for restart will be restarted.
The computer identifier is sent with the report when
- The consent used to send the report does not come from the application. For example, the report was submitted with consent status set to WerConsentNotAsked.
- The report was submitted with the WER_SUBMIT_REPORT_MACHINE_ID flag 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 |