Redigera

Dela via


EvtCreateRenderContext function (winevt.h)

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

Syntax

EVT_HANDLE EvtCreateRenderContext(
  [in] DWORD   ValuePathsCount,
  [in] LPCWSTR *ValuePaths,
  [in] DWORD   Flags
);

Parameters

[in] ValuePathsCount

The number of XPath expressions in the ValuePaths parameter.

[in] ValuePaths

An array of XPath expressions that uniquely identify a node or attribute in the event that you want to render.

Set to NULL if the EvtRenderContextValues context flag is not set in the Flags parameter.

The expressions must not contain the OR or AND operator.

Attribute names in the expressions must not be followed by a space.

[in] Flags

Flag that identifies 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

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

See also

EvtRender