Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Creates a Windows Error Reporting (WER) report that describes an application event.
HRESULT WerReportCreate(
[in] PCWSTR pwzEventType,
[in] WER_REPORT_TYPE repType,
[in, optional] PWER_REPORT_INFORMATION pReportInformation,
[out] HREPORT *phReportHandle
);
[in] pwzEventType
A pointer to a Unicode string that specifies the name of the event.
[in] repType
The type of report. This parameter can be one of the following values from the WER_REPORT_TYPE enumeration type.
Value | Meaning |
---|---|
WerReportApplicationCrash 2 |
An error that has caused the application to stop running has occurred. |
WerReportApplicationHang 3 |
An error that has caused the application to stop responding has occurred. |
WerReportInvalid 5 |
An error that has called out a return that is not valid has occurred. |
WerReportKernel 4 |
An error in the kernel has occurred. |
WerReportCritical 1 |
A critical error, such as a crash or non-response, has occurred. By default, processes that experience a critical error are terminated or restarted. |
WerReportNonCritical 0 |
An error that is not critical has occurred. This type of report shows no UI; the report is silently queued. It may then be sent silently to the server in the background if adequate user consent is available. |
[in, optional] pReportInformation
A pointer to a WER_REPORT_INFORMATION structure that specifies information for the report.
[out] phReportHandle
A handle to the report. If the function fails, this handle is NULL.
This function returns S_OK on success or an error code on failure.
Use the following functions to specify additional information to be submitted:
To submit the information, call the WerReportSubmit function. When you have finished with the report handle, call the WerReportCloseHandle function.
Applications can also indicate that they would like the opportunity to recover data or restart on failure. For more information, see Application Recovery and Restart.
To view the reports submitted by your application, go to Windows Quality Online Services.
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 |
Application Recovery and Restart, WER_REPORT_INFORMATION, WerReportCloseHandle, WerReportSubmit, Windows Error Reporting
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today