SmsGetMessageStatus (Compact 2013)
3/26/2014
Use this function to retrieve a status report for a message sent with the PS_MESSAGE_OPTION_STATUSREPORT flag. See remarks for details.
Syntax
HRESULT SmsGetMessageStatus (
const SMS_HANDLE smshHandle,
SMS_MESSAGE_ID smsmidMessageID,
SMS_STATUS_INFORMATION * const psmssiStatusInformation,
const DWORD dwTimeout);
Parameters
- smshHandle
Short Message Service (SMS) handle obtained from calling SmsOpen.
- smsmidMessageID
Message ID returned by SmsSendMessage.
- psmssiStatusInformation
Contains the actual message status information if the API returned successfully.
- dwTimeout
Time-out (in milliseconds) to wait for the status message to be received (if it has not already been received).
Return Value
- E_FAIL
Indicates an unspecified failure.
- E_INVALIDARG
Indicates one or more invalid arguments.
- E_OUTOFMEMORY
Indicates an out-of-memory error.
- E_UNEXPECTED
Unexpected failure.
- S_OK
The method completed successfully.
For information about additional return values, see SMS Specific Errors and SMS General Errors.
Remarks
If the original message sent resulted in a multipart SMS, then a single status report becomes available after a report has been received for every multipart message. See the description of the SMS_STATUS_INFORMATION structure for details concerning a multipart message status report.
There are two methods for obtaining a status report. One way is to register for status report messages, as with any other provider-specific message type. However, this only allows one entity to receive status messages. The second way is to use the SmsGetMessageStatus function. This allows any entity to read the status message, provided that it has the corresponding message identifier for the original message. Unlike other incoming messages, status messages persist until the status message buffer is full, then the oldest status messages are overwritten. This means multiple applications can receive status message information.
Using dwTimeout to wait for the status message to be received allows an application to call SmsGetMessageStatus immediately after calling SmsSendMessage.
Requirements
Header |
sms.h |
Library |
sms.lib |
See Also
Reference
Short Message Service Functions
SMS General Errors
SMS Specific Errors
SmsOpen
SmsSendMessage
SMS_STATUS_INFORMATION
SmsGetMessageStatus