Partager via


SetEventData (Windows Embedded CE 6.0)

1/6/2010

This function associates data with an event handle.

Syntax

BOOL SetEventData(
  HANDLE hEvent,
  DWORD dwData
);

Parameters

  • hEvent
    [in] Handle to an event that was created with CreateEvent.
  • dwData
    [in] Specifies data to be associated with an event.

Return Value

TRUE indicates success. FALSE indicates failure. Call GetLastError to get extended error information.

Remarks

The value stored can be a pointer to a memory location. If the value is a pointer, it must be accessible in the context in which it is dereferenced.

When two calls to SetEventData are made consecutively and the thread that is supposed to be waiting for the event is doing something else, the data from the first call is dropped.

There is no difference between handles that are manually reset and those that are automatically reset.

SetEventData requires privileged access.

Requirements

Header pkfuncs.h
Library coredll.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Kernel Functions
GetEventData

Other Resources

CreateEvent