WerStoreGetFirstReportKey function (werapi.h)

Gets a reference to the first Windows Error Reporting (WER) report in the report store.

Syntax

HRESULT WerStoreGetFirstReportKey(
  HREPORTSTORE hReportStore,
  PCWSTR       *ppszReportKey
);

Parameters

hReportStore

The error report store (previously retrieved with WerStoreOpen).

ppszReportKey

A pointer to the report key string. On a successful call, this will point to the retrieved report key.

Return value

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

Return code Description
E_INVALID_ARG One of the arguments is not a valid value.
ERROR_NO_MORE_FILES There are no error reports in the store.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1703 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Target Platform Windows
Header werapi.h
Library Wer.lib
DLL Wer.dll

See also

WerStoreGetNextReportKey, WerStoreOpen, Windows Error Reporting