Sending SMS - configure provider

  • Thread starter Thread starter =?iso-8859-1?Q?Andr=E9_Campos?=
  • Start date Start date
?

=?iso-8859-1?Q?Andr=E9_Campos?=

Hi,

I'm building an application that send's sms. I'm using
the code example from MSDN page. Everything is alright
but the message is not kept in the SIM after the
receiving.
Can anyone help and tell me how to change this code
example to have PS_MESSAGE_CLASS3 instead of 0

private static extern IntPtr SmsSendMessage(IntPtr
smshHandle, IntPtr psmsaSMSCAddress, IntPtr
psmsaDestinationAddress, IntPtr pstValidityPeriod, byte[]
pbData, IntPtr dwDataSize, byte[] pbProviderSpecificData,
IntPtr dwProviderSpecificDataSize, SMS_DATA_ENCODING
smsdeDataEncoding, IntPtr dwOptions, IntPtr
psmsmidMessageID);

Byte[] ProvData = new Byte[12];

byte[] bMessage = Encoding.Unicode.GetBytes(sMessage);
int nMsgSize = bMessage.Length;

res = SmsSendMessage(hSms, IntPtr.Zero, (IntPtr)pAddr,
IntPtr.Zero, bMessage, (IntPtr)nMsgSize, ProvData,
(IntPtr)ProvData.Length,
SMS_DATA_ENCODING.SMSDE_OPTIMAL, (IntPtr)
SMS_OPTION_DELIVERY_NONE, IntPtr.Zero);

Thanks in advance for your help
André Campos
 
Back
Top