SMS Specific Errors (Compact 2013)
3/26/2014
These errors are specific to the Short Message Service (SMS) transport.
Registration Errors
The following 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
The following 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 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, in which 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 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 details. |
SMS_E_RECEIVEHANDLEALREADYOPEN |
0x0105 |
Only one handle per provider may be open for read access by any application at one time. |
SMS_E_DESTINATIONOUTOFSVC |
0x0106 |
The message could not be delivered because the destination equipment is out of service. |
SMS_E_INVALIDADDRESS |
0x0107 |
The specified address is invalid. |
SMS_E_MSGBARREDBYOPERATOR |
0x0108 |
The operator barred (blocked) the message send attempt. |
SMS_E_MSGCALLBARRED |
0x0109 |
Outgoing calls are barred so that message sending was prevented. |
SMS_E_NOSCSUBSCRIPTION |
0x010a |
No SMSC subscription. |
SMS_E_SCBUSY |
0x010b |
The SMSC is busy. |
SMS_E_SVCNOTSUBSCRIBED |
0x010c |
The sender is not subscribed to the requested messaging service. |
SMS_E_UNASSIGNEDNUMBER |
0x010d |
The address specified as the message destination is currently an unassigned phone number. |
SMS_E_UNKNOWNSCADDRESS |
0x010e |
The SMSC address is unknown. |
SMS_E_UNIDENTIFIEDSUBCRIBER |
0x010f |
The sender's mobile ID is not registered. |
SMS_E_FDNRESTRICT |
0x0110 |
FDN restriction violated. |
Remarks
When these function calls fail, they 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
Header |
sms.h |
See Also
Reference
Short Message Service Errors
SMS General Errors
SmsClearMessageNotification
SmsSetMessageNotification