Düzenle

Aracılığıyla paylaş


EvtOpenChannelEnum function (winevt.h)

Gets a handle that you use to enumerate the list of channels that are registered on the computer.

Syntax

EVT_HANDLE EvtOpenChannelEnum(
  [in] EVT_HANDLE Session,
  [in] DWORD      Flags
);

Parameters

[in] Session

A remote session handle that the EvtOpenSession function returns. Set to NULL to enumerate the channels on the local computer.

[in] Flags

Reserved. Must be zero.

Return value

If successful, the function returns a handle to the list of channel names that are registered on the computer; otherwise, NULL. If NULL, call GetLastError function to get the error code.

Remarks

The enumeration includes all the channels that the providers that are registered on the computer defined. To enumerate the channel names, call the EvtNextChannelPath function in a loop. The names are sorted alphabetically.

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

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

EvtNextChannelPath

EvtOpenChannelConfig