Redigera

Dela via


EvtNextChannelPath function (winevt.h)

Gets a channel name from the enumerator.

Syntax

BOOL EvtNextChannelPath(
  [in]  EVT_HANDLE ChannelEnum,
  [in]  DWORD      ChannelPathBufferSize,
  [in]  LPWSTR     ChannelPathBuffer,
  [out] PDWORD     ChannelPathBufferUsed
);

Parameters

[in] ChannelEnum

A handle to the enumerator that the EvtOpenChannelEnum function returns.

[in] ChannelPathBufferSize

The size of the ChannelPathBuffer buffer, in characters.

[in] ChannelPathBuffer

A caller-allocated buffer that will receive the name of the channel. You can set this parameter to NULL to determine the required buffer size.

[out] ChannelPathBufferUsed

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.

Return value

Return code/value Description
TRUE
The function succeeded.
FALSE
The function failed. To get the error code, call the GetLastError function.

Remarks

Call this function in a loop until the function returns FALSE and the error code is ERROR_NO_MORE_ITEMS.

Examples

For an example that shows how to use this function, see Getting and Setting a Channel's Configuration Properties.

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

EvtOpenChannelEnum