Sending SMS - configure provider

  • Thread starter =?iso-8859-1?Q?Andr=E9_Campos?=
  • 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top