Removes a file from the list of files registered using WerRegisterFile.
HRESULT WerUnregisterFile(
PCWSTR pwzFilePath
)
pwzFilePath
Type: PCWSTRÂ
[in] The full path to the file. This file must have been registered using the WerRegisterFile function.
Type: HRESULTÂ
| Return Value | Description |
|---|---|
| S_OK | Success. |
| WER_E_INVALID_STATE | The process state is not valid. |
| WER_E_NOT_FOUND | The list of registered files does not contain the specified file. |
To add a file to the registered-files list, call the WerRegisterFile function.
//
// Unregister game.log from being collected when the application crashes.
//
HRESULT hr = WerUnregisterFile(L"T:\\game.log");
if (FAILED(hr))
{
// Log failure to unregister file.
}
Header: Declared in werapi.h.
Library: Use kernelx.lib.