Windows Mobile 6.5
A version of this page is also available for

Use this function to get started when a Short Message Service (SMS) message comes in and your application is not running. Any existing registration for the specified message type will be overwritten. To clear a registration entry, call SmsClearMessageNotification.

HRESULT SmsSetMessageNotification (


Points to a structure indicating how to notify the application.

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:


The method completed successfully.

For information about additional return values, see SMS Specific Errors.

Note that this notification happens only when no application has an open SMS read handle. Also, note that there is no verification that the application calling this function is the same application that was passed in to the registration data function.

When other application has already registered for the message type this call tries to register, the call to SmsSetMessageNotification will fail with the return value SMS_E_REGISTRATIONEXISTS. Call SmsClearMessageNotification to clear the previous registration if you want to overwrite it.

This is a privileged function.

Windows Embedded CEWindows Embedded CE 6.0 and later
Windows MobilePocket PC 2002 and later, Smartphone 2002 and later

Community Additions