SMS Specific Errors
These errors are specific to the Short Message Service (SMS) transport.
Registration Errors
These errors can be returned by the SmsSetMessageNotification and SmsClearMessageNotification functions.
Name | Value | Description |
---|---|---|
SMS_E_INVALIDPROTOCOL | 0x0001 | SMS protocol does not exist. |
SMS_E_REGISTRATIONEXISTS | 0x0002 | Protocol is already set for notification. |
SMS_S_NOSUCHREGISTRATION | 0x0003 | Notification is not set for that protocol. |
Messaging Errors
These errors can be returned by the SmsOpen, SmsSendMessage, and SmsGetSMSC functions.
Name | Value | Description |
---|---|---|
SMS_E_TOOMUCHDATA | 0x0100 | The data passed into SmsSendMessage was too large and could not be properly encoded and sent out. For example, datagram packets get 140 bytes per Short Message Service (SMS) message fragment with a Global System for Mobile Communications (GSM-imposed) limit of 255 message fragments — therefore any request to send more than 35,700 bytes will be impossible to satisfy and this error will be returned. |
SMS_E_INVALIDDATA | 0x0101 | The data passed into SmsSendMessage was invalid. For example, attempting to send Unicode characters (which means that 2 bytes are needed per character) and providing an odd number of bytes of data will generate this error. |
SMS_E_BUFFERTOOSMALL | 0x0102 | The size of the buffer passed into SmsReadMessage was too small to read the data available. The caller may not have previously called SmsGetMessageSize in order to determine the necessary buffer size. |
SMS_E_PROVIDERSPECIFICBUFFERWRONGSIZE | 0x0103 | The size of the provider-specific buffer passed into SmsSendMessage or SmsReadMessage was incorrect. For example, when calling SmsOpen with type SMS_MESSAGE_TEXT, the provider-specific buffer passed in by the caller must be of type TEXT_PROVIDER_SPECIFIC_DATA and have the size of that structure – other sizes are incorrect and will cause this error to be returned. |
SMS_E_TIMEUNAVAILABLE | 0x0104 | The Short Message Service Center (SMSC) Timestamp is currently unavailable. This is usually the case if the necessary prerequisites for SmsGetTime have not yet taken place. See the documentation for SmsGetTime for more details. |
SMS_E_RECEIVEHANDLEALREADYOPEN | 0x0105 | The SMSC address is unknown. |
SMS_E_DESTINATIONOUTOFSVC | 0x0106 | Only one handle per provider may be open for read access by any application at one time. |
SMS_E_INVALIDADDRESS | 0x0107 | The message could not be delivered because the destination equipment is out of service. |
SMS_E_MSGBARREDBYOPERATOR | 0x0108 | The specified address is invalid. |
SMS_E_MSGCALLBARRED | 0x0109 | The operator barred (blocked) the message send attempt. |
SMS_E_NOSCSUBSCRIPTION | 0x010a | Outgoing calls are barred so message sending was prevented. |
SMS_E_SCBUSY | 0x010b | No message Service Center subscription. |
SMS_E_SVCNOTSUBSCRIBED | 0x010c | The message Service Center is busy. |
SMS_E_UNASSIGNEDNUMBER | 0x010d | The sender is not subscribed to the requested messaging service. |
SMS_E_UNKNOWNSCADDRESS | 0x010e | The address specified as the message destination is currently an unassigned phone number. |
SMS_E_UNIDENTIFIEDSUBCRIBER | 0x010f | The sender's mobile ID is not registered. |
Remarks
When these function calls fail, they actually return a decimal value. For example, -2113928945. You can find the associated error code by converting the decimal value to Hexadecimal. For example, ffffffff8200010f. The least-significant four digits represent the error code (in this case, 010f, which corresponds to the error SMS_E_UNIDENTIFIEDSUBCRIBER).
Requirements
Smartphone: Smartphone 2002 and later
Pocket PC: Pocket PC 2002 and later
OS Versions: Windows CE 3.0 and later
Header: sms.h
Library: sms.lib
See Also
Short Message Service Errors | SMS General Errors | Short Message Service (SMS) API | SmsSetMessageNotification | SmsClearMessageNotification
Send Feedback on this topic to the authors