Share via


SetEventData (Compact 2013)

3/28/2014

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

See Also

Reference

Kernel Functions
CreateEvent
GetEventData