EvtCreateRenderContext function

Creates a context that specifies the information in the event that you want to render.

Syntax


EVT_HANDLE WINAPI EvtCreateRenderContext(
  _In_ DWORD   ValuePathsCount,
  _In_ LPCWSTR *ValuePaths,
  _In_ DWORD   Flags
);

Parameters

ValuePathsCount [in]

The number of XPath expressions in the ValuePaths parameter.

ValuePaths [in]

An array of XPath expressions that uniquely identify a node or attribute in the event that you want to render. The expressions must not contain the OR or AND operator. Set to NULL if the EvtRenderContextValues context flag is not set in the Flags parameter.

Flags [in]

One or more flags that identify the information in the event that you want to render. For example, the system information, user information, or specific values. For possible values, see the EVT_RENDER_CONTEXT_FLAGS enumeration.

Return value

A context handle that you use when calling the EvtRender function to render the contents of an event; otherwise, NULL. If NULL, call the GetLastError function to get the error code.

Remarks

To render the specified information from the event, call the EvtRender function.

You must call the EvtClose function to close the handle when done.

Examples

For an example that shows how to use this function, see Rendering Events.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

WinEvt.h

Library

Wevtapi.lib

DLL

Wevtapi.dll

See also

EvtRender

 

 

Show: