WerReportSubmit function (werapi.h)
Submits the specified Windows Error Reporting (WER) 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.
Value | Meaning |
---|---|
WerConsentAlwaysPrompt 4 |
The user is always asked to submit the request. |
WerConsentApproved 2 |
The user has approved the submission request. |
WerConsentDenied 3 |
The user has denied the submission request. |
WerConsentMax 5 |
The maximum value for the WER_CONSENT enumeration type. |
WerConsentNotAsked 1 |
The user was not asked for consent. |
[in] dwFlags
This parameter can be one or more of the following values.
Value | Meaning |
---|---|
WER_SUBMIT_ADD_REGISTERED_DATA 16 |
Add the data registered by WerSetFlags, WerRegisterFile, and WerRegisterMemoryBlock to the report. |
WER_SUBMIT_HONOR_RECOVERY 1 |
Honor any recovery registration for the application. For more information, see RegisterApplicationRecoveryCallback. |
WER_SUBMIT_HONOR_RESTART 2 |
Honor any restart registration for the application. For more information, see RegisterApplicationRestart. |
WER_SUBMIT_NO_ARCHIVE 256 |
Do not archive the report. |
WER_SUBMIT_NO_CLOSE_UI 64 |
Do not display the close dialog box for the critical report. |
WER_SUBMIT_NO_QUEUE 128 |
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. |
WER_SUBMIT_OUTOFPROCESS 32 |
Spawn another process to submit the report. The calling thread is blocked until the function returns. NOTE: Window messages will be pumped so that UI activity on the calling thread is not blocked. |
WER_SUBMIT_OUTOFPROCESS_ASYNC 1024 |
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. |
WER_SUBMIT_QUEUE 4 |
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. |
WER_SUBMIT_SHOW_DEBUG 8 |
Show the debug button. |
WER_SUBMIT_START_MINIMIZED 512 |
The initial UI is minimized and flashing. |
WER_SUBMIT_BYPASS_DATA_THROTTLING 2048 |
Bypass data throttling for the report. Windows 7 or earlier: This parameter is not available. |
WER_SUBMIT_ARCHIVE_PARAMETERS_ONLY 4096 |
Archive only the parameters; the cab is discarded. This flag overrides the ConfigureArchive WER setting. Windows 7 or earlier: This parameter is not available. |
WER_SUBMIT_REPORT_MACHINE_ID 8192 |
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.
Value | Meaning |
---|---|
WerCustomAction 9 |
Error reporting can be customized. |
WerDisabled 5 |
Error reporting was disabled. |
WerDisabledQueue 7 |
Queuing was disabled. |
WerReportAsync 8 |
The report was asynchronous. |
WerReportCancelled 6 |
The report was canceled. |
WerReportDebug 3 |
The Debug button was clicked. |
WerReportFailed 4 |
The report submission failed. |
WerReportQueued 1 |
The report was queued. |
WerReportUploaded 2 |
The report was uploaded. |
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.
To view the reports submitted by your application, go to Windows Quality Online Services.
Requirements
Requirement | Value |
---|---|
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
Application Recovery and Restart, WerReportCreate, Windows Error Reporting