Partager via


CeGetUserNotification

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function retrieves notification information associated with a handle.

Syntax

BOOL CeGetUserNotification(
  HANDLE hNotification, 
  DWORD cBufferSize, 
  LPDWORD pcBytesNeeded, 
  LPBYTE pBuffer 
);

Parameters

  • hNotification
    [in] Handle to the notification.
  • cBufferSize
    [in] DWORD that specifies the size of the buffer pointed to by pBuffer.
  • pcBytesNeeded
    [out] Pointer to a DWORD that receives the number of bytes needed for the buffer pointed to by pBuffer.
  • pBuffer
    [out] Pointer to a buffer to hold the requested information.

Return Value

TRUE indicates success. FALSE indicates failure.

Remarks

Call CeGetUserNotification with cBufferSize set to 0 first to retrieve the size that you need for the buffer in pcBytesNeeded. Then, allocate a DWORD-aligned buffer of that size and call CeGetUserNotification again with pBuffer pointing to the buffer and cBufferSize set to the size obtained from the first call to CeGetUserNotification. This second call retrieves the notification information.

If the second call to CeGetUserNotification succeeds, the buffer contains a CE_NOTIFICATION_INFO_HEADER structure at the beginning. This structure points to two other structures that are allocated in the same buffer, CE_NOTIFICATION_TRIGGER and CE_USER_NOTIFICATION. The CE_USER_NOTIFICATION structure contains the information with which the notification was created.

If the buffer size is insufficient, this function fails and returns the necessary buffer size in pcBytesNeeded. For other failures, ERROR_INVALID_PARAMETER is set and pcBytesNeeded is 0.

Requirements

Header notify.h
Library coredll.lib
Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

CE_NOTIFICATION_INFO_HEADER
CE_USER_NOTIFICATION
CE_NOTIFICATION_TRIGGER
Notify Functions