Partager via


SmsGetMessageStatus

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

Use this function to retrieve a status report for a message sent with the PS_MESSAGE_OPTION_STATUSREPORT flag. See remarks for more detail.

Syntax

HRESULT SmsGetMessageStatus (
    const SMS_HANDLE         smshHandle,
    SMS_MESSAGE_ID           smsmidMessageID,
  SMS_STATUS_INFORMATION*  psmssiStatusInformation,
    const DWORD              dwTimeout
);

Parameters

  • smshHandle
    A Short Message Service (SMS) handle obtained from calling SmsOpen.
  • psmssiStatusInformation
    Contains the actual message status information if the API returned successfully.
  • dwTimeout
    The time-out (in milliseconds) to wait for the status message to be received (if it has not already been received).

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 and SMS General Errors.

Remarks

If the originally sent message resulted in a multipart SMS, then a single status report will be available after a report has been received for every multipart message. See the description of the SMS_STATUS_INFORMATION structure for more 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, just like 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, if it has the corresponding message identifier of 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
Windows Embedded CE Windows Embedded CE 6.0 and later
Windows Mobile Pocket PC 2002 and later, Smartphone 2002 and later

See Also

Reference

SmsOpen
SmsSendMessage
SMS_STATUS_INFORMATION
SmsGetMessageStatus

Concepts

Short Message Service Functions