WerStoreQueryReportMetadataV2 function

Retrieves metadata about a report in the store.

Syntax


HRESULT WINAPI WerStoreQueryReportMetadataV2(
   HREPORTSTORE            store,
   PCWSTR                  reportKey,
   WER_REPORT_METADATA_V2* metadata
);

Parameters

store

The error report store (previously retrieved with WerStoreOpen).

reportKey

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

metadata

A pointer to the report store metadata in the form of a WER_REPORT_METADATA_V2 structure. The field SizeOfFileNames should be set to 0 during the first call. The function updates this field with the required size to hold the file names associated with the report. The field FileNames should then be allocated with SizeOfFileNames bytes and the function should be called again to get all of the file names.

Return value

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

Return codeDescription
E_INVALID_ARG

One of the arguments is not a valid value.

ERROR_INSUFFICIENT_BUFFER

There is not enough memory available to retrieve the metadata. In this case, the caller should allocate memory of size SizeOfFileNames for the FileNames field, found in the WER_REPORT_METADATA_V2 structure, and call the function again.

 

Requirements

Minimum supported client

Windows 10, version 1703 [desktop apps only]

Minimum supported server

Windows Server 2016 [desktop apps only]

Header

Werapi.h

Library

Wer.lib

DLL

Wer.dll

See also

WER Functions
WerStoreGetFirstReportKey
WerStoreGetNextReportKey
WER_REPORT_METADATA_V2
Windows Error Reporting

 

 

Show: