Registers app-specific metadata to be collected (in the form of key/value strings) when WER creates an error report.
HRESULT WerRegisterCustomMetadata( PCWSTR key, PCWSTR value );
The "key" string for the metadata element being registered.
The value string for the metadata element being registered.
This function returns S_OK on success or an error code on failure, including the following error codes.
||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.|
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.
|Minimum supported client||Windows 10, version 1703 [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2016 [desktop apps | UWP apps]|