WerStoreUploadReport function (werapi.h)

Uploads a report to the Windows Error Reporting (WER) store.

Syntax

HRESULT WerStoreUploadReport(
                  HREPORTSTORE       hReportStore,
                  PCWSTR             pszReportKey,
  [in]            DWORD              dwFlags,
  [out, optional] PWER_SUBMIT_RESULT pSubmitResult
);

Parameters

hReportStore

The error report store (previously retrieved with WerStoreOpen).

pszReportKey

The string identifying which report is being queried (previously retrieved with WerStoreGetFirstReportKey or WerStoreGetNextReportKey).

[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.

Requirements

Requirement Value
Header werapi.h

See also

Windows Error Reporting