SmsSetMessageNotification (Windows Embedded CE 6.0)
1/6/2010
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.
Syntax
HRESULT SmsSetMessageNotification (
const SMSREGISTRATIONDATA* psmsrd
);
Parameters
- psmsrd
Points to a structure indicating how to notify the application.
Return Value
This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:
- S_OK
The method completed successfully.
For information about additional return values, see SMS Specific Errors.
Remarks
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.
Requirements
Header | sms.h |
Library | sms.lib |
Windows Embedded CE | Windows Embedded CE 6.0 and later |
See Also
Reference
SMSREGISTRATIONDATA
SmsSetMessageNotification
SmsClearMessageNotification