EvtGetExtendedStatus function (winevt.h)
Gets a text message that contains the extended error information for the current error.
DWORD EvtGetExtendedStatus(
[in] DWORD BufferSize,
[in] LPWSTR Buffer,
[out] PDWORD BufferUsed
);
[in] BufferSize
The size of the Buffer buffer, in characters.
[in] Buffer
A caller-allocated string buffer that will receive the extended error information. You can set this parameter to NULL to determine the required buffer size.
[out] BufferUsed
The size, in characters, of the caller-allocated buffer that the function used or the required buffer size if the function fails with ERROR_INSUFFICIENT_BUFFER.
The return value is ERROR_SUCCESS if the call succeeded; otherwise, a Win32 error code.
You must call this function on the thread that generated the error and before calling another Windows Event Log function.
The EvtQuery and EvtSubscribe functions can provide extended error information if there is a problem with the specified XPath. For example, the error information can identify the character in the XPath where a parsing error occurred. To receive the extended error information for a malformed XPath, you cannot specify the EvtQueryTolerateQueryErrors flag when calling EvtQuery or EvtSubscribe.
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | winevt.h |
Library | Wevtapi.lib |
DLL | Wevtapi.dll |