Share via


CeEventSubscribe (Compact 7)

3/12/2014

This function opens the specified channel.

Syntax

EXTERN_C
HANDLE
EVNTAPI
    CeEventSubscribe(
    _in_z LPCWSTR ChannelPath,
    _in DWORD SubscribeFlags,
    _in DWORD Level,
    _in ULONGLONG MatchAnyKeywordMask,
    _in ULONGLONG MatchAllKeywordMask
  );

Parameters

  • ChannelPath
    [in] Specifies the channel path.
  • SubscribeFlags
    [in] Currently ignored.
  • Level
    [in] Filter that restricts the level of event severity that the subscriber wants to receive. The following table shows possible values.

    Value Description

    WINEVENT_LEVEL_LOG_ALWAYS

    0

    No filtering level is done on this event.

    WINEVENT_LEVEL_CRITICAL

    1

    Abnormal exit or termination events.

    WINEVENT_LEVEL_ERROR

    2

    Severe error events.

    WINEVENT_LEVEL_WARNING

    3

    Warning events such as allocation failures.

    WINEVENT_LEVEL_INFO

    4

    Non-error events such as entry or exit events.

    WINEVENT_LEVEL_VERBOSE

    5

    Detailed trace events. This level is currently not supported.

    The subscriber receives events at levels equal to or less than the level set.

  • MatchAnyKeywordMask
    [in] Filter that indicates what keywords the events may match for the subscriber to receive the event. If this is set to zero, it is assumed that any events that pass the Level and MatchAllKeyWordMask are sent to the subscriber.
  • MatchAllKeywordMask
    [in] Filter that indicates what keywords the events must match for the subscriber to receive the event. If this is set to zero, it is assumed that any events that pass the Level and MatchAnyKeywordMask are sent to the subscriber.

Return Value

A valid hSubscription handle indicates success.

The hSubscription is a waitable handle which the subscriber uses in the WaitForSingleObject or the WaitForMultipleObjects function. When an event of interest to the subscriber is sent to the channel, the subscriber is signaled on this handle. At this point the subscriber calls the CeEventRead and the CeEventNext functions. There may be multiple events per signal.

Remarks

There is an internal pointer per hSubscription handle which indicates which event the subscriber is currently reading. The CeEventNext function moves the internal pointer to the next valid event, as filtered by this function.

Setting Level to 5, MatchAnyKeywordMask to 0, and MatchAllKeywordMask to 0 gives the subscriber all events.

Requirements

Header

EvntCons.h

Library

filesys.dll

See Also

Reference

Event Log Subscriber Functions