次の方法で共有


SmsReadMessage (Compact 2013)

3/26/2014

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,
  __out_bcount(dwBufferSize) BYTE* const pbBuffer,
  DWORD dwBufferSize,
  __out_bcount(dwProviderSpecificDataBuffer) BYTE* const pbProviderSpecificBuffer,
  DWORD dwProviderSpecificDataBuffer,
  DWORD* pdwBytesRead
);

Parameters

  • smshHandle
    Short Message Service (SMS) handle obtained from calling SmsOpen.
  • psmsaSMSCAddress
    Indicates the Short Message Service Center (SMSC) that the message was routed through.
  • psmsaSourceAddress
    Source of the message.
  • pstReceiveTime
    Time of day that the message was received. This timestamp is in UTC (Coordinated Universal Time) format.
  • pbBuffer
    Data buffer used to store the received SMS message.
  • dwBufferSize
    Size, in bytes, of the buffer used for the received message. The buffer size to use can be determined by calling SmsGetMessageSize.
  • pbProviderSpecificBuffer
    For certain providers, a provider-specific buffer must be provided in addition to the previous data buffer.
  • dwProviderSpecificDataBuffer
    Size of pbProviderSpecificBuffer.
  • pdwBytesRead
    Number of bytes read. This includes only the message data. It does not include the incoming addresses or timestamp.

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.

Requirements

Header

sms.h

Library

sms.lib

See Also

Reference

Short Message Service Functions
SmsOpen
SmsGetMessageSize
SMS Specific Errors