WerRegisterCustomMetadata function
Registers app-specific metadata to be collected (in the form of key/value strings) when WER creates an error report.
Syntax
HRESULT WINAPI WerRegisterCustomMetadata(
PCWSTR key,
PCWSTR value
);
Parameters
- key
-
The "key" string for the metadata element being registered.
- value
-
The value string for the metadata element being registered.
Return value
This function returns S_OK on success or an error code on failure, including the following error codes.
| Return code | Description |
|---|---|
|
Strings were NULL, key length was greater than 64 characters or was an invalid xml element name, orvalue length was greater than 128 characters or contained characters that were not ASCII printable characters. |
|
WER could not allocate a large enough heap for the data |
|
The maximum number of registered entries (WER_MAX_REGISTERED_ENTRIES) or maximum amount of registered metadata (WER_MAX_REGISTERED_METADATA) has been reached. |
|
The process state is not valid. For example, the process is in application recovery mode. |
Remarks
This API allows apps to integrate their own app-level telemetry with system-level telemetry (WER) by associating app metadata with crash reports corresponding to their processes.
Requirements
|
Minimum supported client |
Windows 10, version 1703 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2016 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also