SmsReadMessage (Windows Embedded CE 6.0)
1/6/2010
This function is used to read a previously received Short Message Service (SMS) message.
Syntax
HRESULT SmsReadMessage (
const SMS_HANDLE smshHandle,
SMS_ADDRESS* const psmsaSMSCAddress,
SMS_ADDRESS* const psmsaSourceAddress,
SYSTEMTIME* const pstReceiveTime,
bcount(dwBufferSize) BYTE* pbBuffer,
DWORD dwBufferSize,
bcount(dwProviderSpecificDataBuffer) BYTE* pbProviderSpecificBuffer,
DWORD dwProviderSpecificDataBuffer,
DWORD* pdwBytesRead
);
Parameters
- smshHandle
[in]A Short Message Service (SMS) handle obtained from calling SmsOpen.
- psmsaSMSCAddress
[in][out]Indicates the Short Message Service Center (SMSC) the message was routed through.
- psmsaSourceAddress
[in]The source of the message.
- pstReceiveTime
[in][out]The time of day that the message was received. This timestamp is in UTC (Coordinated Universal Time) format.
- pbBuffer
[out]The data buffer used to store the received SMS message.
- dwBufferSize
[in]Size, in bytes, of the buffer used for the received message. The buffer size to use can be determined by calling SmsGetMessageSize.
- pbProviderSpecificBuffer
[out]For certain providers, a provider-specific buffer must be provided in addition to the previous data buffer.
- dwProviderSpecificDataBuffer
[in]Size of pbProviderSpecificBuffer.
- pdwBytesRead
[out]Number of bytes read. This includes only the message data. It does not include the incoming addresses or timestamp.
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.
Requirements
Header | sms.h |
Library | sms.lib |
Windows Embedded CE | Windows Embedded CE 6.0 and later |