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

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.

smsmidMessageID

This is a message ID returned by SmsSendMessage.

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 Errorsand 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_INFORMATIONstructure 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 SmsGetMessageStatusfunction. 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 dwTimeoutto wait for the status message to be received allows an application to call SmsGetMessageStatusimmediately 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