Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
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] DWORDthat specifies the size of the buffer pointed to by pBuffer.

pcBytesNeeded

[out] Pointer to a DWORDthat 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 CeGetUserNotificationwith cBufferSizeset 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 CeGetUserNotificationagain with pBufferpointing to the buffer and cBufferSizeset to the size obtained from the first call to CeGetUserNotification. This second call retrieves the notification information.

If the second call to CeGetUserNotificationsucceeds, the buffer contains a CE_NOTIFICATION_INFO_HEADERstructure at the beginning. This structure points to two other structures that are allocated in the same buffer, CE_NOTIFICATION_TRIGGERand CE_USER_NOTIFICATION. The CE_USER_NOTIFICATIONstructure 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 pcBytesNeededis 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