SMSMESSAGE  
 

This structure provides information about a text message.

typedef struct _SMSMESSAGE
{
    DWORD dwFormat;
    DWORD dwLength;
    DWORD dwFlags;
    DWORD dwReserved;
    LPCTSTR lpszProvider;
    LPCTSTR lpszPhoneNumber;
    LPCTSTR lpszSender;
    LPCTSTR lpszMessage;	
}  SMSMESSAGE, *LPSMSMESSAGE;

Members

dwFormat
An integer value which specifies the format of the message message. This member is included for future use where a service provider supports multiple message formats based on different versions of the protocol. The default value for this member is SMS_FORMAT_TEXT.
dwLength
An integer value which specifies the length of the message. If this member is zero, the length will be automatically calculated based on the length of the lpszMessage text that is terminated by a null character. If this value is larger than the actual length of the message text, it will be ignored.
dwFlags
An integer value which specifies one or more message options.
Value Description
SMS_MESSAGE_DEFAULT The default value used with standard text messages.
SMS_MESSAGE_URGENT The text message should be flagged as urgent. For messages that are sent through a mail gateway, this will set the header to indicate that it is a high priority message. Note that service providers handle urgent messages differently and some may ignore the message priority.
dwReserved
Reserved for future use. This value should always be zero.
lpszProvider
A pointer to a null terminated string which specifies the name of the preferred wireless service provider responsible for handling the message. If this member is NULL or an empty string, the default provider assigned to the recipient's phone number will be used. This structure member is only used with SMS_SERVICE_SMTP messages and is ignored for other message services.
lpszPhoneNumber
A pointer to a null terminated string which specifies the recipient's phone number. This can be a standard E.164 formatted number or an unformatted number. Any extraneous whitespace, punctuation or other non-numeric characters in the string will be ignored. This structure member cannot be NULL.
lpszSender
A pointer to a null terminated string which identifies the sender of the message. For SMS_SERVICE_SMTP messages, this string should be a valid email address. For other services, this string may specify a phone number or shortcode. This structure member cannot be NULL.
lpszMessage
A pointer to a null terminated string that contains the message to be sent to the recipient. In most cases, a message should not exceed 160 characters in length, although some service providers may accept longer messages. If a message exceeds the maximum number of characters accepted by a service provider, the message may be ignored or it may be split into multiple messages.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools11.h
Unicode: Implemented as Unicode and ANSI versions

See Also

SendMessage, SMSSERVICE