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 creates a new user notification or modifies an existing one.

Syntax

HANDLE CeSetUserNotificationEx(
  HANDLE 
hNotification, 
  CE_NOTIFICATION_TRIGGER* 
pcnt, 
  CE_USER_NOTIFICATION* 
pceun 
);

Parameters

hNotification

[in] Handle to the notification to overwrite or 0 to add a new notification.

pcnt

[in] Pointer to a CE_NOTIFICATION_TRIGGERstructure that defines what event activates a notification.

pceun

[in] Pointer to the CE_USER_NOTIFICATIONstructure that defines how the system should respond when a notification occurs. For example, the system could launch a dialog box or another application.

Return Value

Returns a handle to the notification object if successful. This handle can then be used with the other Notify functions. Returns NULL if unsuccessful.

Remarks

Notifications which are time-bound will be deleted once the time passes. For event-based notifications, the notification won't disappear after the event is triggered. The user has to manually delete the notification using CeClearUserNotification.

If the scheduled time lies within the platform-dependent period defined by the accuracy of the real-time clock (RTC), the notification may be scheduled immediately. The accuracy may be retrieved by IOCTL_KLIB_GETALARMRESOLUTION and may range from 1 to 60 seconds. If the platform does not implement IOCTL_KLIB_GETALARMRESOLUTION, the default RTC accuracy of 10 seconds is assumed.

If pcnt->dwTypeis set to CNT_EVENT, the pceunparameter should be set to NULL. Otherwise the function call will fail and return ERROR_INVALID_PARAMETER.

To delete a notification and release the handle, use the handle returned by CeSetUserNotificationExin a call to CeClearUserNotification. To overwrite a notification, use the returned handle in another call to CeSetUserNotificationEx.

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