WerUnregisterFile

Removes a file from the list of files registered using WerRegisterFile.

Syntax

HRESULT WerUnregisterFile(
         PCWSTR pwzFilePath
)  

Parameters

pwzFilePath
Type: PCWSTR 

[in] The full path to the file. This file must have been registered using the WerRegisterFile function.

Return value

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.

Remarks

To add a file to the registered-files list, call the WerRegisterFile function.

Example

//
// 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.
}  

Requirements

Header: Declared in werapi.h.

Library: Use kernelx.lib.