Hello *,

I created a class, which allows me to send a SMS.
I used the sendSMS example from Microsoft
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfSendSMS.asp)

Okay, it works fine, I can send a SMS, but only without
my own number. The receiver gets an anonymous message.
I already tried to change some options in the code, but
the SMS is still missing the number of the sender.

My code:

unsafe public bool sendSMS(string sPhoneNumber, string sMessage)
{
System.IntPtr hSms = IntPtr.Zero;
IntPtr res = SmsOpen(SMS_MSGTYPE_TEXT, (IntPtr)SMS_MODE_SEND, ref
hSms,
IntPtr.Zero);
if (res != IntPtr.Zero)
return false;
Byte[] bDest = new Byte[516];
Byte[] bDest2 = new Byte[516];

fixed (byte* pAddr = bDest)
{
fixed (byte* pAddr2 = bDest2)
{
byte *pCurrent = pAddr;
IntPtr myNumb = SmsGetPhoneNumber((IntPtr)pAddr2);

Marshal.WriteInt32((IntPtr)pCurrent, (int)AddressType.Unknown);
pCurrent +=4;
foreach (byte b in Encoding.Unicode.GetBytes(sPhoneNumber))
{
Marshal.WriteByte((IntPtr)pCurrent, b);
pCurrent++;
}

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

res = SmsSendMessage(hSms, myNumb, (IntPtr)pAddr, IntPtr.Zero,
bMessage, (IntPtr)nMsgSize, ProvData, (IntPtr)ProvData.Length,
SMS_DATA_ENCODING.SMSDE_GSM, (IntPtr)SMS_OPTION_DELIVERY_NONE,
IntPtr.Zero);
if (res != IntPtr.Zero)
return false;

SmsClose(hSms);
return true;
}
}
}

Any ideas, what I'm doing wrong?

Re: Send SMS with number of sender by Peter

Peter
Tue Oct 05 04:09:47 CDT 2004

By default the message should be sent with the settings defined by your
operator, therefore unless you change the settings on the phone your message
should be sent with your caller id. I'm not sure why the example below
places the result of the call to SmsGetPhoneNumber into the SMSC field -
this is for the Short Message Service Centre and should be left null to use
the default specified by your operator.

Have you tried the OpenNETCF.Phone.Sms functionality. All of the interop is
ready-wrapped for you - you could compare the sources to see how it is done
differently:-
http://www.opennetcf.org/sourcebrowse/view.aspx?f=d:/sites/OpenNETCF/InetPub/wwwroot/Source/OpenNETCF.Phone/Sms/Sms.cs


Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups

"Uwe Gebhardt" <uwe.gebhardt@freenet.de> wrote in message
news:534a6e6e.0410050018.4a13b59d@posting.google.com...
> Hello *,
>
> I created a class, which allows me to send a SMS.
> I used the sendSMS example from Microsoft
> (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfSendSMS.asp)
>
> Okay, it works fine, I can send a SMS, but only without
> my own number. The receiver gets an anonymous message.
> I already tried to change some options in the code, but
> the SMS is still missing the number of the sender.
>
> My code:
>
> unsafe public bool sendSMS(string sPhoneNumber, string sMessage)
> {
> System.IntPtr hSms = IntPtr.Zero;
> IntPtr res = SmsOpen(SMS_MSGTYPE_TEXT, (IntPtr)SMS_MODE_SEND, ref
> hSms,
> IntPtr.Zero);
> if (res != IntPtr.Zero)
> return false;
> Byte[] bDest = new Byte[516];
> Byte[] bDest2 = new Byte[516];
>
> fixed (byte* pAddr = bDest)
> {
> fixed (byte* pAddr2 = bDest2)
> {
> byte *pCurrent = pAddr;
> IntPtr myNumb = SmsGetPhoneNumber((IntPtr)pAddr2);
>
> Marshal.WriteInt32((IntPtr)pCurrent, (int)AddressType.Unknown);
> pCurrent +=4;
> foreach (byte b in Encoding.Unicode.GetBytes(sPhoneNumber))
> {
> Marshal.WriteByte((IntPtr)pCurrent, b);
> pCurrent++;
> }
>
> Byte[] ProvData = new Byte[12];
> byte[] bMessage = Encoding.Unicode.GetBytes(sMessage);
> int nMsgSize = bMessage.Length;
>
> res = SmsSendMessage(hSms, myNumb, (IntPtr)pAddr, IntPtr.Zero,
> bMessage, (IntPtr)nMsgSize, ProvData, (IntPtr)ProvData.Length,
> SMS_DATA_ENCODING.SMSDE_GSM, (IntPtr)SMS_OPTION_DELIVERY_NONE,
> IntPtr.Zero);
> if (res != IntPtr.Zero)
> return false;
>
> SmsClose(hSms);
> return true;
> }
> }
> }
>
> Any ideas, what I'm doing wrong?



Re: Send SMS with number of sender by Johnny

Johnny
Tue Oct 05 10:01:04 CDT 2004

Peter.
Please help me.
I am a starting programmer in compact framework.
I am using the code you recommended in opennetcf.org, but it is a wrong in
sms.dll calling.
Where I find the sms.dll. I installed compactframework 1.0 and visual studio
2003.
The error message is "It can't load sms.dll"


PD. Sorry for my writing, I from Peru

"Peter Foot [MVP]" wrote:

> By default the message should be sent with the settings defined by your
> operator, therefore unless you change the settings on the phone your message
> should be sent with your caller id. I'm not sure why the example below
> places the result of the call to SmsGetPhoneNumber into the SMSC field -
> this is for the Short Message Service Centre and should be left null to use
> the default specified by your operator.
>
> Have you tried the OpenNETCF.Phone.Sms functionality. All of the interop is
> ready-wrapped for you - you could compare the sources to see how it is done
> differently:-
> http://www.opennetcf.org/sourcebrowse/view.aspx?f=d:/sites/OpenNETCF/InetPub/wwwroot/Source/OpenNETCF.Phone/Sms/Sms.cs
>
>
> Peter
>
> --
> Peter Foot
> Windows Embedded MVP
> www.inthehand.com | www.opennetcf.org
>
> Do have an opinion on the effectiveness of Microsoft Windows Mobile and
> Embedded newsgroups? Let us know!
> https://www.windowsembeddedeval.com/community/newsgroups
>
> "Uwe Gebhardt" <uwe.gebhardt@freenet.de> wrote in message
> news:534a6e6e.0410050018.4a13b59d@posting.google.com...
> > Hello *,
> >
> > I created a class, which allows me to send a SMS.
> > I used the sendSMS example from Microsoft
> > (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfSendSMS.asp)
> >
> > Okay, it works fine, I can send a SMS, but only without
> > my own number. The receiver gets an anonymous message.
> > I already tried to change some options in the code, but
> > the SMS is still missing the number of the sender.
> >
> > My code:
> >
> > unsafe public bool sendSMS(string sPhoneNumber, string sMessage)
> > {
> > System.IntPtr hSms = IntPtr.Zero;
> > IntPtr res = SmsOpen(SMS_MSGTYPE_TEXT, (IntPtr)SMS_MODE_SEND, ref
> > hSms,
> > IntPtr.Zero);
> > if (res != IntPtr.Zero)
> > return false;
> > Byte[] bDest = new Byte[516];
> > Byte[] bDest2 = new Byte[516];
> >
> > fixed (byte* pAddr = bDest)
> > {
> > fixed (byte* pAddr2 = bDest2)
> > {
> > byte *pCurrent = pAddr;
> > IntPtr myNumb = SmsGetPhoneNumber((IntPtr)pAddr2);
> >
> > Marshal.WriteInt32((IntPtr)pCurrent, (int)AddressType.Unknown);
> > pCurrent +=4;
> > foreach (byte b in Encoding.Unicode.GetBytes(sPhoneNumber))
> > {
> > Marshal.WriteByte((IntPtr)pCurrent, b);
> > pCurrent++;
> > }
> >
> > Byte[] ProvData = new Byte[12];
> > byte[] bMessage = Encoding.Unicode.GetBytes(sMessage);
> > int nMsgSize = bMessage.Length;
> >
> > res = SmsSendMessage(hSms, myNumb, (IntPtr)pAddr, IntPtr.Zero,
> > bMessage, (IntPtr)nMsgSize, ProvData, (IntPtr)ProvData.Length,
> > SMS_DATA_ENCODING.SMSDE_GSM, (IntPtr)SMS_OPTION_DELIVERY_NONE,
> > IntPtr.Zero);
> > if (res != IntPtr.Zero)
> > return false;
> >
> > SmsClose(hSms);
> > return true;
> > }
> > }
> > }
> >
> > Any ideas, what I'm doing wrong?
>
>
>

Re: Send SMS with number of sender by Paul

Paul
Tue Oct 05 10:18:33 CDT 2004

If you don't have the SMS DLL, then you are not using a device that supports
SMS or you are using one that uses some sort of non-standard SMS interface.
What device is it?

Paul T.

"Johnny Salgado" <Johnny Salgado@discussions.microsoft.com> wrote in message
news:BD863252-F753-40DF-87E4-99665C6B85B2@microsoft.com...
> Peter.
> Please help me.
> I am a starting programmer in compact framework.
> I am using the code you recommended in opennetcf.org, but it is a wrong in
> sms.dll calling.
> Where I find the sms.dll. I installed compactframework 1.0 and visual
> studio
> 2003.
> The error message is "It can't load sms.dll"
>
>
> PD. Sorry for my writing, I from Peru
>
> "Peter Foot [MVP]" wrote:
>
>> By default the message should be sent with the settings defined by your
>> operator, therefore unless you change the settings on the phone your
>> message
>> should be sent with your caller id. I'm not sure why the example below
>> places the result of the call to SmsGetPhoneNumber into the SMSC field -
>> this is for the Short Message Service Centre and should be left null to
>> use
>> the default specified by your operator.
>>
>> Have you tried the OpenNETCF.Phone.Sms functionality. All of the interop
>> is
>> ready-wrapped for you - you could compare the sources to see how it is
>> done
>> differently:-
>> http://www.opennetcf.org/sourcebrowse/view.aspx?f=d:/sites/OpenNETCF/InetPub/wwwroot/Source/OpenNETCF.Phone/Sms/Sms.cs
>>
>>
>> Peter
>>
>> --
>> Peter Foot
>> Windows Embedded MVP
>> www.inthehand.com | www.opennetcf.org
>>
>> Do have an opinion on the effectiveness of Microsoft Windows Mobile and
>> Embedded newsgroups? Let us know!
>> https://www.windowsembeddedeval.com/community/newsgroups
>>
>> "Uwe Gebhardt" <uwe.gebhardt@freenet.de> wrote in message
>> news:534a6e6e.0410050018.4a13b59d@posting.google.com...
>> > Hello *,
>> >
>> > I created a class, which allows me to send a SMS.
>> > I used the sendSMS example from Microsoft
>> > (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfSendSMS.asp)
>> >
>> > Okay, it works fine, I can send a SMS, but only without
>> > my own number. The receiver gets an anonymous message.
>> > I already tried to change some options in the code, but
>> > the SMS is still missing the number of the sender.
>> >
>> > My code:
>> >
>> > unsafe public bool sendSMS(string sPhoneNumber, string sMessage)
>> > {
>> > System.IntPtr hSms = IntPtr.Zero;
>> > IntPtr res = SmsOpen(SMS_MSGTYPE_TEXT, (IntPtr)SMS_MODE_SEND, ref
>> > hSms,
>> > IntPtr.Zero);
>> > if (res != IntPtr.Zero)
>> > return false;
>> > Byte[] bDest = new Byte[516];
>> > Byte[] bDest2 = new Byte[516];
>> >
>> > fixed (byte* pAddr = bDest)
>> > {
>> > fixed (byte* pAddr2 = bDest2)
>> > {
>> > byte *pCurrent = pAddr;
>> > IntPtr myNumb = SmsGetPhoneNumber((IntPtr)pAddr2);
>> >
>> > Marshal.WriteInt32((IntPtr)pCurrent, (int)AddressType.Unknown);
>> > pCurrent +=4;
>> > foreach (byte b in Encoding.Unicode.GetBytes(sPhoneNumber))
>> > {
>> > Marshal.WriteByte((IntPtr)pCurrent, b);
>> > pCurrent++;
>> > }
>> >
>> > Byte[] ProvData = new Byte[12];
>> > byte[] bMessage = Encoding.Unicode.GetBytes(sMessage);
>> > int nMsgSize = bMessage.Length;
>> >
>> > res = SmsSendMessage(hSms, myNumb, (IntPtr)pAddr, IntPtr.Zero,
>> > bMessage, (IntPtr)nMsgSize, ProvData, (IntPtr)ProvData.Length,
>> > SMS_DATA_ENCODING.SMSDE_GSM, (IntPtr)SMS_OPTION_DELIVERY_NONE,
>> > IntPtr.Zero);
>> > if (res != IntPtr.Zero)
>> > return false;
>> >
>> > SmsClose(hSms);
>> > return true;
>> > }
>> > }
>> > }
>> >
>> > Any ideas, what I'm doing wrong?
>>
>>
>>



Re: Send SMS with number of sender by JohnnySalgado

JohnnySalgado
Tue Oct 05 10:33:05 CDT 2004

Paul.
I was reading about this but I didn't understand correctly.
You can recommende me any manual or tutorial or web page where I can learn
correctly about send sms message.
I need perform a program that sends sms message from web page.

Please help me

Thanks

"Paul G. Tobey [eMVP]" wrote:

> If you don't have the SMS DLL, then you are not using a device that supports
> SMS or you are using one that uses some sort of non-standard SMS interface.
> What device is it?
>
> Paul T.
>
> "Johnny Salgado" <Johnny Salgado@discussions.microsoft.com> wrote in message
> news:BD863252-F753-40DF-87E4-99665C6B85B2@microsoft.com...
> > Peter.
> > Please help me.
> > I am a starting programmer in compact framework.
> > I am using the code you recommended in opennetcf.org, but it is a wrong in
> > sms.dll calling.
> > Where I find the sms.dll. I installed compactframework 1.0 and visual
> > studio
> > 2003.
> > The error message is "It can't load sms.dll"
> >
> >
> > PD. Sorry for my writing, I from Peru
> >
> > "Peter Foot [MVP]" wrote:
> >
> >> By default the message should be sent with the settings defined by your
> >> operator, therefore unless you change the settings on the phone your
> >> message
> >> should be sent with your caller id. I'm not sure why the example below
> >> places the result of the call to SmsGetPhoneNumber into the SMSC field -
> >> this is for the Short Message Service Centre and should be left null to
> >> use
> >> the default specified by your operator.
> >>
> >> Have you tried the OpenNETCF.Phone.Sms functionality. All of the interop
> >> is
> >> ready-wrapped for you - you could compare the sources to see how it is
> >> done
> >> differently:-
> >> http://www.opennetcf.org/sourcebrowse/view.aspx?f=d:/sites/OpenNETCF/InetPub/wwwroot/Source/OpenNETCF.Phone/Sms/Sms.cs
> >>
> >>
> >> Peter
> >>
> >> --
> >> Peter Foot
> >> Windows Embedded MVP
> >> www.inthehand.com | www.opennetcf.org
> >>
> >> Do have an opinion on the effectiveness of Microsoft Windows Mobile and
> >> Embedded newsgroups? Let us know!
> >> https://www.windowsembeddedeval.com/community/newsgroups
> >>
> >> "Uwe Gebhardt" <uwe.gebhardt@freenet.de> wrote in message
> >> news:534a6e6e.0410050018.4a13b59d@posting.google.com...
> >> > Hello *,
> >> >
> >> > I created a class, which allows me to send a SMS.
> >> > I used the sendSMS example from Microsoft
> >> > (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfSendSMS.asp)
> >> >
> >> > Okay, it works fine, I can send a SMS, but only without
> >> > my own number. The receiver gets an anonymous message.
> >> > I already tried to change some options in the code, but
> >> > the SMS is still missing the number of the sender.
> >> >
> >> > My code:
> >> >
> >> > unsafe public bool sendSMS(string sPhoneNumber, string sMessage)
> >> > {
> >> > System.IntPtr hSms = IntPtr.Zero;
> >> > IntPtr res = SmsOpen(SMS_MSGTYPE_TEXT, (IntPtr)SMS_MODE_SEND, ref
> >> > hSms,
> >> > IntPtr.Zero);
> >> > if (res != IntPtr.Zero)
> >> > return false;
> >> > Byte[] bDest = new Byte[516];
> >> > Byte[] bDest2 = new Byte[516];
> >> >
> >> > fixed (byte* pAddr = bDest)
> >> > {
> >> > fixed (byte* pAddr2 = bDest2)
> >> > {
> >> > byte *pCurrent = pAddr;
> >> > IntPtr myNumb = SmsGetPhoneNumber((IntPtr)pAddr2);
> >> >
> >> > Marshal.WriteInt32((IntPtr)pCurrent, (int)AddressType.Unknown);
> >> > pCurrent +=4;
> >> > foreach (byte b in Encoding.Unicode.GetBytes(sPhoneNumber))
> >> > {
> >> > Marshal.WriteByte((IntPtr)pCurrent, b);
> >> > pCurrent++;
> >> > }
> >> >
> >> > Byte[] ProvData = new Byte[12];
> >> > byte[] bMessage = Encoding.Unicode.GetBytes(sMessage);
> >> > int nMsgSize = bMessage.Length;
> >> >
> >> > res = SmsSendMessage(hSms, myNumb, (IntPtr)pAddr, IntPtr.Zero,
> >> > bMessage, (IntPtr)nMsgSize, ProvData, (IntPtr)ProvData.Length,
> >> > SMS_DATA_ENCODING.SMSDE_GSM, (IntPtr)SMS_OPTION_DELIVERY_NONE,
> >> > IntPtr.Zero);
> >> > if (res != IntPtr.Zero)
> >> > return false;
> >> >
> >> > SmsClose(hSms);
> >> > return true;
> >> > }
> >> > }
> >> > }
> >> >
> >> > Any ideas, what I'm doing wrong?
> >>
> >>
> >>
>
>
>

Re: Send SMS with number of sender by Peter

Peter
Tue Oct 05 11:13:26 CDT 2004

To use the OpenNETCF Sms class you must be using a Pocket PC Phone Edition
2002/2003/2003SE or Smartphone 2003/2003SE device.

Can you describe in a bit more detail what you are trying to achieve?

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups

"Johnny Salgado" <JohnnySalgado@discussions.microsoft.com> wrote in message
news:FE6D5000-62CB-4F86-8EED-6541817F4464@microsoft.com...
> Paul.
> I was reading about this but I didn't understand correctly.
> You can recommende me any manual or tutorial or web page where I can learn
> correctly about send sms message.
> I need perform a program that sends sms message from web page.
>
> Please help me
>
> Thanks
>
> "Paul G. Tobey [eMVP]" wrote:
>
>> If you don't have the SMS DLL, then you are not using a device that
>> supports
>> SMS or you are using one that uses some sort of non-standard SMS
>> interface.
>> What device is it?
>>
>> Paul T.
>>
>> "Johnny Salgado" <Johnny Salgado@discussions.microsoft.com> wrote in
>> message
>> news:BD863252-F753-40DF-87E4-99665C6B85B2@microsoft.com...
>> > Peter.
>> > Please help me.
>> > I am a starting programmer in compact framework.
>> > I am using the code you recommended in opennetcf.org, but it is a wrong
>> > in
>> > sms.dll calling.
>> > Where I find the sms.dll. I installed compactframework 1.0 and visual
>> > studio
>> > 2003.
>> > The error message is "It can't load sms.dll"
>> >
>> >
>> > PD. Sorry for my writing, I from Peru
>> >
>> > "Peter Foot [MVP]" wrote:
>> >
>> >> By default the message should be sent with the settings defined by
>> >> your
>> >> operator, therefore unless you change the settings on the phone your
>> >> message
>> >> should be sent with your caller id. I'm not sure why the example below
>> >> places the result of the call to SmsGetPhoneNumber into the SMSC
>> >> field -
>> >> this is for the Short Message Service Centre and should be left null
>> >> to
>> >> use
>> >> the default specified by your operator.
>> >>
>> >> Have you tried the OpenNETCF.Phone.Sms functionality. All of the
>> >> interop
>> >> is
>> >> ready-wrapped for you - you could compare the sources to see how it is
>> >> done
>> >> differently:-
>> >> http://www.opennetcf.org/sourcebrowse/view.aspx?f=d:/sites/OpenNETCF/InetPub/wwwroot/Source/OpenNETCF.Phone/Sms/Sms.cs
>> >>
>> >>
>> >> Peter
>> >>
>> >> --
>> >> Peter Foot
>> >> Windows Embedded MVP
>> >> www.inthehand.com | www.opennetcf.org
>> >>
>> >> Do have an opinion on the effectiveness of Microsoft Windows Mobile
>> >> and
>> >> Embedded newsgroups? Let us know!
>> >> https://www.windowsembeddedeval.com/community/newsgroups
>> >>
>> >> "Uwe Gebhardt" <uwe.gebhardt@freenet.de> wrote in message
>> >> news:534a6e6e.0410050018.4a13b59d@posting.google.com...
>> >> > Hello *,
>> >> >
>> >> > I created a class, which allows me to send a SMS.
>> >> > I used the sendSMS example from Microsoft
>> >> > (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfSendSMS.asp)
>> >> >
>> >> > Okay, it works fine, I can send a SMS, but only without
>> >> > my own number. The receiver gets an anonymous message.
>> >> > I already tried to change some options in the code, but
>> >> > the SMS is still missing the number of the sender.
>> >> >
>> >> > My code:
>> >> >
>> >> > unsafe public bool sendSMS(string sPhoneNumber, string sMessage)
>> >> > {
>> >> > System.IntPtr hSms = IntPtr.Zero;
>> >> > IntPtr res = SmsOpen(SMS_MSGTYPE_TEXT, (IntPtr)SMS_MODE_SEND, ref
>> >> > hSms,
>> >> > IntPtr.Zero);
>> >> > if (res != IntPtr.Zero)
>> >> > return false;
>> >> > Byte[] bDest = new Byte[516];
>> >> > Byte[] bDest2 = new Byte[516];
>> >> >
>> >> > fixed (byte* pAddr = bDest)
>> >> > {
>> >> > fixed (byte* pAddr2 = bDest2)
>> >> > {
>> >> > byte *pCurrent = pAddr;
>> >> > IntPtr myNumb = SmsGetPhoneNumber((IntPtr)pAddr2);
>> >> >
>> >> > Marshal.WriteInt32((IntPtr)pCurrent, (int)AddressType.Unknown);
>> >> > pCurrent +=4;
>> >> > foreach (byte b in Encoding.Unicode.GetBytes(sPhoneNumber))
>> >> > {
>> >> > Marshal.WriteByte((IntPtr)pCurrent, b);
>> >> > pCurrent++;
>> >> > }
>> >> >
>> >> > Byte[] ProvData = new Byte[12];
>> >> > byte[] bMessage = Encoding.Unicode.GetBytes(sMessage);
>> >> > int nMsgSize = bMessage.Length;
>> >> >
>> >> > res = SmsSendMessage(hSms, myNumb, (IntPtr)pAddr, IntPtr.Zero,
>> >> > bMessage, (IntPtr)nMsgSize, ProvData, (IntPtr)ProvData.Length,
>> >> > SMS_DATA_ENCODING.SMSDE_GSM, (IntPtr)SMS_OPTION_DELIVERY_NONE,
>> >> > IntPtr.Zero);
>> >> > if (res != IntPtr.Zero)
>> >> > return false;
>> >> >
>> >> > SmsClose(hSms);
>> >> > return true;
>> >> > }
>> >> > }
>> >> > }
>> >> >
>> >> > Any ideas, what I'm doing wrong?
>> >>
>> >>
>> >>
>>
>>
>>



Re: Send SMS with number of sender by JohnnySalgado

JohnnySalgado
Tue Oct 05 11:41:07 CDT 2004

Ok Peter, thanks. I'll download these devices.

I need to perform a program, it sends sms message from web page to celular
phone, maybe one or two thousands messages by sending.
I don't know How start. I hope you can help me, brinding me information,
manual, tutorial or web page.
I was reading msdn, there is a example sending sms using compact framework
with vb.net, but it's wrong with message "it can't load sms.dll".
After I found your recommendation using openNETCF, but the same mistake.

What I must do?

Thank you in advance por help you can give me.

"Peter Foot [MVP]" wrote:

> To use the OpenNETCF Sms class you must be using a Pocket PC Phone Edition
> 2002/2003/2003SE or Smartphone 2003/2003SE device.
>
> Can you describe in a bit more detail what you are trying to achieve?
>
> Peter
>
> --
> Peter Foot
> Windows Embedded MVP
> www.inthehand.com | www.opennetcf.org
>
> Do have an opinion on the effectiveness of Microsoft Windows Mobile and
> Embedded newsgroups? Let us know!
> https://www.windowsembeddedeval.com/community/newsgroups
>
> "Johnny Salgado" <JohnnySalgado@discussions.microsoft.com> wrote in message
> news:FE6D5000-62CB-4F86-8EED-6541817F4464@microsoft.com...
> > Paul.
> > I was reading about this but I didn't understand correctly.
> > You can recommende me any manual or tutorial or web page where I can learn
> > correctly about send sms message.
> > I need perform a program that sends sms message from web page.
> >
> > Please help me
> >
> > Thanks
> >
> > "Paul G. Tobey [eMVP]" wrote:
> >
> >> If you don't have the SMS DLL, then you are not using a device that
> >> supports
> >> SMS or you are using one that uses some sort of non-standard SMS
> >> interface.
> >> What device is it?
> >>
> >> Paul T.
> >>
> >> "Johnny Salgado" <Johnny Salgado@discussions.microsoft.com> wrote in
> >> message
> >> news:BD863252-F753-40DF-87E4-99665C6B85B2@microsoft.com...
> >> > Peter.
> >> > Please help me.
> >> > I am a starting programmer in compact framework.
> >> > I am using the code you recommended in opennetcf.org, but it is a wrong
> >> > in
> >> > sms.dll calling.
> >> > Where I find the sms.dll. I installed compactframework 1.0 and visual
> >> > studio
> >> > 2003.
> >> > The error message is "It can't load sms.dll"
> >> >
> >> >
> >> > PD. Sorry for my writing, I from Peru
> >> >
> >> > "Peter Foot [MVP]" wrote:
> >> >
> >> >> By default the message should be sent with the settings defined by
> >> >> your
> >> >> operator, therefore unless you change the settings on the phone your
> >> >> message
> >> >> should be sent with your caller id. I'm not sure why the example below
> >> >> places the result of the call to SmsGetPhoneNumber into the SMSC
> >> >> field -
> >> >> this is for the Short Message Service Centre and should be left null
> >> >> to
> >> >> use
> >> >> the default specified by your operator.
> >> >>
> >> >> Have you tried the OpenNETCF.Phone.Sms functionality. All of the
> >> >> interop
> >> >> is
> >> >> ready-wrapped for you - you could compare the sources to see how it is
> >> >> done
> >> >> differently:-
> >> >> http://www.opennetcf.org/sourcebrowse/view.aspx?f=d:/sites/OpenNETCF/InetPub/wwwroot/Source/OpenNETCF.Phone/Sms/Sms.cs
> >> >>
> >> >>
> >> >> Peter
> >> >>
> >> >> --
> >> >> Peter Foot
> >> >> Windows Embedded MVP
> >> >> www.inthehand.com | www.opennetcf.org
> >> >>
> >> >> Do have an opinion on the effectiveness of Microsoft Windows Mobile
> >> >> and
> >> >> Embedded newsgroups? Let us know!
> >> >> https://www.windowsembeddedeval.com/community/newsgroups
> >> >>
> >> >> "Uwe Gebhardt" <uwe.gebhardt@freenet.de> wrote in message
> >> >> news:534a6e6e.0410050018.4a13b59d@posting.google.com...
> >> >> > Hello *,
> >> >> >
> >> >> > I created a class, which allows me to send a SMS.
> >> >> > I used the sendSMS example from Microsoft
> >> >> > (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfSendSMS.asp)
> >> >> >
> >> >> > Okay, it works fine, I can send a SMS, but only without
> >> >> > my own number. The receiver gets an anonymous message.
> >> >> > I already tried to change some options in the code, but
> >> >> > the SMS is still missing the number of the sender.
> >> >> >
> >> >> > My code:
> >> >> >
> >> >> > unsafe public bool sendSMS(string sPhoneNumber, string sMessage)
> >> >> > {
> >> >> > System.IntPtr hSms = IntPtr.Zero;
> >> >> > IntPtr res = SmsOpen(SMS_MSGTYPE_TEXT, (IntPtr)SMS_MODE_SEND, ref
> >> >> > hSms,
> >> >> > IntPtr.Zero);
> >> >> > if (res != IntPtr.Zero)
> >> >> > return false;
> >> >> > Byte[] bDest = new Byte[516];
> >> >> > Byte[] bDest2 = new Byte[516];
> >> >> >
> >> >> > fixed (byte* pAddr = bDest)
> >> >> > {
> >> >> > fixed (byte* pAddr2 = bDest2)
> >> >> > {
> >> >> > byte *pCurrent = pAddr;
> >> >> > IntPtr myNumb = SmsGetPhoneNumber((IntPtr)pAddr2);
> >> >> >
> >> >> > Marshal.WriteInt32((IntPtr)pCurrent, (int)AddressType.Unknown);
> >> >> > pCurrent +=4;
> >> >> > foreach (byte b in Encoding.Unicode.GetBytes(sPhoneNumber))
> >> >> > {
> >> >> > Marshal.WriteByte((IntPtr)pCurrent, b);
> >> >> > pCurrent++;
> >> >> > }
> >> >> >
> >> >> > Byte[] ProvData = new Byte[12];
> >> >> > byte[] bMessage = Encoding.Unicode.GetBytes(sMessage);
> >> >> > int nMsgSize = bMessage.Length;
> >> >> >
> >> >> > res = SmsSendMessage(hSms, myNumb, (IntPtr)pAddr, IntPtr.Zero,
> >> >> > bMessage, (IntPtr)nMsgSize, ProvData, (IntPtr)ProvData.Length,
> >> >> > SMS_DATA_ENCODING.SMSDE_GSM, (IntPtr)SMS_OPTION_DELIVERY_NONE,
> >> >> > IntPtr.Zero);
> >> >> > if (res != IntPtr.Zero)
> >> >> > return false;
> >> >> >
> >> >> > SmsClose(hSms);
> >> >> > return true;
> >> >> > }
> >> >> > }
> >> >> > }
> >> >> >
> >> >> > Any ideas, what I'm doing wrong?
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>

Re: Send SMS with number of sender by Paul

Paul
Tue Oct 05 12:09:22 CDT 2004

"From a Web page" is totally useless information. Who is accessing the Web
page? Where is it hosted, on what OS, on what server? Is the page opened
by users running SmartPhone and, when you click on a link, the phone should
send an SMS message?

Paul T.

"Johnny Salgado" <JohnnySalgado@discussions.microsoft.com> wrote in message
news:04DBD975-AA9C-4677-ADAF-947DFFCFF124@microsoft.com...
> Ok Peter, thanks. I'll download these devices.
>
> I need to perform a program, it sends sms message from web page to celular
> phone, maybe one or two thousands messages by sending.
> I don't know How start. I hope you can help me, brinding me information,
> manual, tutorial or web page.
> I was reading msdn, there is a example sending sms using compact framework
> with vb.net, but it's wrong with message "it can't load sms.dll".
> After I found your recommendation using openNETCF, but the same mistake.
>
> What I must do?
>
> Thank you in advance por help you can give me.
>
> "Peter Foot [MVP]" wrote:
>
>> To use the OpenNETCF Sms class you must be using a Pocket PC Phone
>> Edition
>> 2002/2003/2003SE or Smartphone 2003/2003SE device.
>>
>> Can you describe in a bit more detail what you are trying to achieve?
>>
>> Peter
>>
>> --
>> Peter Foot
>> Windows Embedded MVP
>> www.inthehand.com | www.opennetcf.org
>>
>> Do have an opinion on the effectiveness of Microsoft Windows Mobile and
>> Embedded newsgroups? Let us know!
>> https://www.windowsembeddedeval.com/community/newsgroups
>>
>> "Johnny Salgado" <JohnnySalgado@discussions.microsoft.com> wrote in
>> message
>> news:FE6D5000-62CB-4F86-8EED-6541817F4464@microsoft.com...
>> > Paul.
>> > I was reading about this but I didn't understand correctly.
>> > You can recommende me any manual or tutorial or web page where I can
>> > learn
>> > correctly about send sms message.
>> > I need perform a program that sends sms message from web page.
>> >
>> > Please help me
>> >
>> > Thanks
>> >
>> > "Paul G. Tobey [eMVP]" wrote:
>> >
>> >> If you don't have the SMS DLL, then you are not using a device that
>> >> supports
>> >> SMS or you are using one that uses some sort of non-standard SMS
>> >> interface.
>> >> What device is it?
>> >>
>> >> Paul T.
>> >>
>> >> "Johnny Salgado" <Johnny Salgado@discussions.microsoft.com> wrote in
>> >> message
>> >> news:BD863252-F753-40DF-87E4-99665C6B85B2@microsoft.com...
>> >> > Peter.
>> >> > Please help me.
>> >> > I am a starting programmer in compact framework.
>> >> > I am using the code you recommended in opennetcf.org, but it is a
>> >> > wrong
>> >> > in
>> >> > sms.dll calling.
>> >> > Where I find the sms.dll. I installed compactframework 1.0 and
>> >> > visual
>> >> > studio
>> >> > 2003.
>> >> > The error message is "It can't load sms.dll"
>> >> >
>> >> >
>> >> > PD. Sorry for my writing, I from Peru
>> >> >
>> >> > "Peter Foot [MVP]" wrote:
>> >> >
>> >> >> By default the message should be sent with the settings defined by
>> >> >> your
>> >> >> operator, therefore unless you change the settings on the phone
>> >> >> your
>> >> >> message
>> >> >> should be sent with your caller id. I'm not sure why the example
>> >> >> below
>> >> >> places the result of the call to SmsGetPhoneNumber into the SMSC
>> >> >> field -
>> >> >> this is for the Short Message Service Centre and should be left
>> >> >> null
>> >> >> to
>> >> >> use
>> >> >> the default specified by your operator.
>> >> >>
>> >> >> Have you tried the OpenNETCF.Phone.Sms functionality. All of the
>> >> >> interop
>> >> >> is
>> >> >> ready-wrapped for you - you could compare the sources to see how it
>> >> >> is
>> >> >> done
>> >> >> differently:-
>> >> >> http://www.opennetcf.org/sourcebrowse/view.aspx?f=d:/sites/OpenNETCF/InetPub/wwwroot/Source/OpenNETCF.Phone/Sms/Sms.cs
>> >> >>
>> >> >>
>> >> >> Peter
>> >> >>
>> >> >> --
>> >> >> Peter Foot
>> >> >> Windows Embedded MVP
>> >> >> www.inthehand.com | www.opennetcf.org
>> >> >>
>> >> >> Do have an opinion on the effectiveness of Microsoft Windows Mobile
>> >> >> and
>> >> >> Embedded newsgroups? Let us know!
>> >> >> https://www.windowsembeddedeval.com/community/newsgroups
>> >> >>
>> >> >> "Uwe Gebhardt" <uwe.gebhardt@freenet.de> wrote in message
>> >> >> news:534a6e6e.0410050018.4a13b59d@posting.google.com...
>> >> >> > Hello *,
>> >> >> >
>> >> >> > I created a class, which allows me to send a SMS.
>> >> >> > I used the sendSMS example from Microsoft
>> >> >> > (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfSendSMS.asp)
>> >> >> >
>> >> >> > Okay, it works fine, I can send a SMS, but only without
>> >> >> > my own number. The receiver gets an anonymous message.
>> >> >> > I already tried to change some options in the code, but
>> >> >> > the SMS is still missing the number of the sender.
>> >> >> >
>> >> >> > My code:
>> >> >> >
>> >> >> > unsafe public bool sendSMS(string sPhoneNumber, string sMessage)
>> >> >> > {
>> >> >> > System.IntPtr hSms = IntPtr.Zero;
>> >> >> > IntPtr res = SmsOpen(SMS_MSGTYPE_TEXT, (IntPtr)SMS_MODE_SEND,
>> >> >> > ref
>> >> >> > hSms,
>> >> >> > IntPtr.Zero);
>> >> >> > if (res != IntPtr.Zero)
>> >> >> > return false;
>> >> >> > Byte[] bDest = new Byte[516];
>> >> >> > Byte[] bDest2 = new Byte[516];
>> >> >> >
>> >> >> > fixed (byte* pAddr = bDest)
>> >> >> > {
>> >> >> > fixed (byte* pAddr2 = bDest2)
>> >> >> > {
>> >> >> > byte *pCurrent = pAddr;
>> >> >> > IntPtr myNumb = SmsGetPhoneNumber((IntPtr)pAddr2);
>> >> >> >
>> >> >> > Marshal.WriteInt32((IntPtr)pCurrent, (int)AddressType.Unknown);
>> >> >> > pCurrent +=4;
>> >> >> > foreach (byte b in Encoding.Unicode.GetBytes(sPhoneNumber))
>> >> >> > {
>> >> >> > Marshal.WriteByte((IntPtr)pCurrent, b);
>> >> >> > pCurrent++;
>> >> >> > }
>> >> >> >
>> >> >> > Byte[] ProvData = new Byte[12];
>> >> >> > byte[] bMessage = Encoding.Unicode.GetBytes(sMessage);
>> >> >> > int nMsgSize = bMessage.Length;
>> >> >> >
>> >> >> > res = SmsSendMessage(hSms, myNumb, (IntPtr)pAddr, IntPtr.Zero,
>> >> >> > bMessage, (IntPtr)nMsgSize, ProvData, (IntPtr)ProvData.Length,
>> >> >> > SMS_DATA_ENCODING.SMSDE_GSM, (IntPtr)SMS_OPTION_DELIVERY_NONE,
>> >> >> > IntPtr.Zero);
>> >> >> > if (res != IntPtr.Zero)
>> >> >> > return false;
>> >> >> >
>> >> >> > SmsClose(hSms);
>> >> >> > return true;
>> >> >> > }
>> >> >> > }
>> >> >> > }
>> >> >> >
>> >> >> > Any ideas, what I'm doing wrong?
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>



Re: Send SMS with number of sender by JohnnySalgado

JohnnySalgado
Tue Oct 05 12:27:02 CDT 2004

The page will be opened by users running microsoft internet explorer 6.0,
when they accessing the web page, they input many cellular phone numbers,
then the web page (it needs to perform) sends sms message to cellular phone
that they registered.

Tha web page is running in IIS, Microsoft 2000 Server Service Pack 4

Thanks

"Paul G. Tobey [eMVP]" wrote:

> "From a Web page" is totally useless information. Who is accessing the Web
> page? Where is it hosted, on what OS, on what server? Is the page opened
> by users running SmartPhone and, when you click on a link, the phone should
> send an SMS message?
>
> Paul T.
>
> "Johnny Salgado" <JohnnySalgado@discussions.microsoft.com> wrote in message
> news:04DBD975-AA9C-4677-ADAF-947DFFCFF124@microsoft.com...
> > Ok Peter, thanks. I'll download these devices.
> >
> > I need to perform a program, it sends sms message from web page to celular
> > phone, maybe one or two thousands messages by sending.
> > I don't know How start. I hope you can help me, brinding me information,
> > manual, tutorial or web page.
> > I was reading msdn, there is a example sending sms using compact framework
> > with vb.net, but it's wrong with message "it can't load sms.dll".
> > After I found your recommendation using openNETCF, but the same mistake.
> >
> > What I must do?
> >
> > Thank you in advance por help you can give me.
> >
> > "Peter Foot [MVP]" wrote:
> >
> >> To use the OpenNETCF Sms class you must be using a Pocket PC Phone
> >> Edition
> >> 2002/2003/2003SE or Smartphone 2003/2003SE device.
> >>
> >> Can you describe in a bit more detail what you are trying to achieve?
> >>
> >> Peter
> >>
> >> --
> >> Peter Foot
> >> Windows Embedded MVP
> >> www.inthehand.com | www.opennetcf.org
> >>
> >> Do have an opinion on the effectiveness of Microsoft Windows Mobile and
> >> Embedded newsgroups? Let us know!
> >> https://www.windowsembeddedeval.com/community/newsgroups
> >>
> >> "Johnny Salgado" <JohnnySalgado@discussions.microsoft.com> wrote in
> >> message
> >> news:FE6D5000-62CB-4F86-8EED-6541817F4464@microsoft.com...
> >> > Paul.
> >> > I was reading about this but I didn't understand correctly.
> >> > You can recommende me any manual or tutorial or web page where I can
> >> > learn
> >> > correctly about send sms message.
> >> > I need perform a program that sends sms message from web page.
> >> >
> >> > Please help me
> >> >
> >> > Thanks
> >> >
> >> > "Paul G. Tobey [eMVP]" wrote:
> >> >
> >> >> If you don't have the SMS DLL, then you are not using a device that
> >> >> supports
> >> >> SMS or you are using one that uses some sort of non-standard SMS
> >> >> interface.
> >> >> What device is it?
> >> >>
> >> >> Paul T.
> >> >>
> >> >> "Johnny Salgado" <Johnny Salgado@discussions.microsoft.com> wrote in
> >> >> message
> >> >> news:BD863252-F753-40DF-87E4-99665C6B85B2@microsoft.com...
> >> >> > Peter.
> >> >> > Please help me.
> >> >> > I am a starting programmer in compact framework.
> >> >> > I am using the code you recommended in opennetcf.org, but it is a
> >> >> > wrong
> >> >> > in
> >> >> > sms.dll calling.
> >> >> > Where I find the sms.dll. I installed compactframework 1.0 and
> >> >> > visual
> >> >> > studio
> >> >> > 2003.
> >> >> > The error message is "It can't load sms.dll"
> >> >> >
> >> >> >
> >> >> > PD. Sorry for my writing, I from Peru
> >> >> >
> >> >> > "Peter Foot [MVP]" wrote:
> >> >> >
> >> >> >> By default the message should be sent with the settings defined by
> >> >> >> your
> >> >> >> operator, therefore unless you change the settings on the phone
> >> >> >> your
> >> >> >> message
> >> >> >> should be sent with your caller id. I'm not sure why the example
> >> >> >> below
> >> >> >> places the result of the call to SmsGetPhoneNumber into the SMSC
> >> >> >> field -
> >> >> >> this is for the Short Message Service Centre and should be left
> >> >> >> null
> >> >> >> to
> >> >> >> use
> >> >> >> the default specified by your operator.
> >> >> >>
> >> >> >> Have you tried the OpenNETCF.Phone.Sms functionality. All of the
> >> >> >> interop
> >> >> >> is
> >> >> >> ready-wrapped for you - you could compare the sources to see how it
> >> >> >> is
> >> >> >> done
> >> >> >> differently:-
> >> >> >> http://www.opennetcf.org/sourcebrowse/view.aspx?f=d:/sites/OpenNETCF/InetPub/wwwroot/Source/OpenNETCF.Phone/Sms/Sms.cs
> >> >> >>
> >> >> >>
> >> >> >> Peter
> >> >> >>
> >> >> >> --
> >> >> >> Peter Foot
> >> >> >> Windows Embedded MVP
> >> >> >> www.inthehand.com | www.opennetcf.org
> >> >> >>
> >> >> >> Do have an opinion on the effectiveness of Microsoft Windows Mobile
> >> >> >> and
> >> >> >> Embedded newsgroups? Let us know!
> >> >> >> https://www.windowsembeddedeval.com/community/newsgroups
> >> >> >>
> >> >> >> "Uwe Gebhardt" <uwe.gebhardt@freenet.de> wrote in message
> >> >> >> news:534a6e6e.0410050018.4a13b59d@posting.google.com...
> >> >> >> > Hello *,
> >> >> >> >
> >> >> >> > I created a class, which allows me to send a SMS.
> >> >> >> > I used the sendSMS example from Microsoft
> >> >> >> > (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfSendSMS.asp)
> >> >> >> >
> >> >> >> > Okay, it works fine, I can send a SMS, but only without
> >> >> >> > my own number. The receiver gets an anonymous message.
> >> >> >> > I already tried to change some options in the code, but
> >> >> >> > the SMS is still missing the number of the sender.
> >> >> >> >
> >> >> >> > My code:
> >> >> >> >
> >> >> >> > unsafe public bool sendSMS(string sPhoneNumber, string sMessage)
> >> >> >> > {
> >> >> >> > System.IntPtr hSms = IntPtr.Zero;
> >> >> >> > IntPtr res = SmsOpen(SMS_MSGTYPE_TEXT, (IntPtr)SMS_MODE_SEND,
> >> >> >> > ref
> >> >> >> > hSms,
> >> >> >> > IntPtr.Zero);
> >> >> >> > if (res != IntPtr.Zero)
> >> >> >> > return false;
> >> >> >> > Byte[] bDest = new Byte[516];
> >> >> >> > Byte[] bDest2 = new Byte[516];
> >> >> >> >
> >> >> >> > fixed (byte* pAddr = bDest)
> >> >> >> > {
> >> >> >> > fixed (byte* pAddr2 = bDest2)
> >> >> >> > {
> >> >> >> > byte *pCurrent = pAddr;
> >> >> >> > IntPtr myNumb = SmsGetPhoneNumber((IntPtr)pAddr2);
> >> >> >> >
> >> >> >> > Marshal.WriteInt32((IntPtr)pCurrent, (int)AddressType.Unknown);
> >> >> >> > pCurrent +=4;
> >> >> >> > foreach (byte b in Encoding.Unicode.GetBytes(sPhoneNumber))
> >> >> >> > {
> >> >> >> > Marshal.WriteByte((IntPtr)pCurrent, b);
> >> >> >> > pCurrent++;
> >> >> >> > }
> >> >> >> >
> >> >> >> > Byte[] ProvData = new Byte[12];
> >> >> >> > byte[] bMessage = Encoding.Unicode.GetBytes(sMessage);
> >> >> >> > int nMsgSize = bMessage.Length;
> >> >> >> >
> >> >> >> > res = SmsSendMessage(hSms, myNumb, (IntPtr)pAddr, IntPtr.Zero,
> >> >> >> > bMessage, (IntPtr)nMsgSize, ProvData, (IntPtr)ProvData.Length,
> >> >> >> > SMS_DATA_ENCODING.SMSDE_GSM, (IntPtr)SMS_OPTION_DELIVERY_NONE,
> >> >> >> > IntPtr.Zero);
> >> >> >> > if (res != IntPtr.Zero)
> >> >> >> > return false;
> >> >> >> >
> >> >> >> > SmsClose(hSms);
> >> >> >> > return true;
> >> >> >> > }
> >> >> >> > }
> >> >> >> > }
> >> >> >> >
> >> >> >> > Any ideas, what I'm doing wrong?
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>

Re: Send SMS with number of sender by Paul

Paul
Tue Oct 05 12:40:31 CDT 2004

Well, then they're running on PCs, right? Not on phones? The method to
send SMS messages is *not* going to be built into Windows. That probably
varies from TMobile to Sprint to who knows what else (1234567890@verizon.com
or something, maybe). So, your question has nothing to do with Windows CE
or Pocket PC, as the Web page is *not* being viewed on that device or hosted
there? Even if you *had* the SMS.dll, you wouldn't be able to do anything
with it.

Since you will be sending these SMS messages from desktop Windows, I'd
suggest looking at MSDN for information on SMS. However, I don't think that
you'll find much there. There is a general sort of discussion about what
SMS is at the beginning of an article on PPC SMS development. It does
mention some hosting options for the store-and-forward capability of SMS:

MobileSys, Inc.
Smartserv Online, Inc.

Paul T.

"Johnny Salgado" <JohnnySalgado@discussions.microsoft.com> wrote in message
news:ED55C3C9-8386-44AF-98B7-209F94A4D81A@microsoft.com...
> The page will be opened by users running microsoft internet explorer 6.0,
> when they accessing the web page, they input many cellular phone numbers,
> then the web page (it needs to perform) sends sms message to cellular
> phone
> that they registered.
>
> Tha web page is running in IIS, Microsoft 2000 Server Service Pack 4
>
> Thanks
>
> "Paul G. Tobey [eMVP]" wrote:
>
>> "From a Web page" is totally useless information. Who is accessing the
>> Web
>> page? Where is it hosted, on what OS, on what server? Is the page
>> opened
>> by users running SmartPhone and, when you click on a link, the phone
>> should
>> send an SMS message?
>>
>> Paul T.
>>
>> "Johnny Salgado" <JohnnySalgado@discussions.microsoft.com> wrote in
>> message
>> news:04DBD975-AA9C-4677-ADAF-947DFFCFF124@microsoft.com...
>> > Ok Peter, thanks. I'll download these devices.
>> >
>> > I need to perform a program, it sends sms message from web page to
>> > celular
>> > phone, maybe one or two thousands messages by sending.
>> > I don't know How start. I hope you can help me, brinding me
>> > information,
>> > manual, tutorial or web page.
>> > I was reading msdn, there is a example sending sms using compact
>> > framework
>> > with vb.net, but it's wrong with message "it can't load sms.dll".
>> > After I found your recommendation using openNETCF, but the same
>> > mistake.
>> >
>> > What I must do?
>> >
>> > Thank you in advance por help you can give me.
>> >
>> > "Peter Foot [MVP]" wrote:
>> >
>> >> To use the OpenNETCF Sms class you must be using a Pocket PC Phone
>> >> Edition
>> >> 2002/2003/2003SE or Smartphone 2003/2003SE device.
>> >>
>> >> Can you describe in a bit more detail what you are trying to achieve?
>> >>
>> >> Peter
>> >>
>> >> --
>> >> Peter Foot
>> >> Windows Embedded MVP
>> >> www.inthehand.com | www.opennetcf.org
>> >>
>> >> Do have an opinion on the effectiveness of Microsoft Windows Mobile
>> >> and
>> >> Embedded newsgroups? Let us know!
>> >> https://www.windowsembeddedeval.com/community/newsgroups
>> >>
>> >> "Johnny Salgado" <JohnnySalgado@discussions.microsoft.com> wrote in
>> >> message
>> >> news:FE6D5000-62CB-4F86-8EED-6541817F4464@microsoft.com...
>> >> > Paul.
>> >> > I was reading about this but I didn't understand correctly.
>> >> > You can recommende me any manual or tutorial or web page where I can
>> >> > learn
>> >> > correctly about send sms message.
>> >> > I need perform a program that sends sms message from web page.
>> >> >
>> >> > Please help me
>> >> >
>> >> > Thanks
>> >> >
>> >> > "Paul G. Tobey [eMVP]" wrote:
>> >> >
>> >> >> If you don't have the SMS DLL, then you are not using a device that
>> >> >> supports
>> >> >> SMS or you are using one that uses some sort of non-standard SMS
>> >> >> interface.
>> >> >> What device is it?
>> >> >>
>> >> >> Paul T.
>> >> >>
>> >> >> "Johnny Salgado" <Johnny Salgado@discussions.microsoft.com> wrote
>> >> >> in
>> >> >> message
>> >> >> news:BD863252-F753-40DF-87E4-99665C6B85B2@microsoft.com...
>> >> >> > Peter.
>> >> >> > Please help me.
>> >> >> > I am a starting programmer in compact framework.
>> >> >> > I am using the code you recommended in opennetcf.org, but it is a
>> >> >> > wrong
>> >> >> > in
>> >> >> > sms.dll calling.
>> >> >> > Where I find the sms.dll. I installed compactframework 1.0 and
>> >> >> > visual
>> >> >> > studio
>> >> >> > 2003.
>> >> >> > The error message is "It can't load sms.dll"
>> >> >> >
>> >> >> >
>> >> >> > PD. Sorry for my writing, I from Peru
>> >> >> >
>> >> >> > "Peter Foot [MVP]" wrote:
>> >> >> >
>> >> >> >> By default the message should be sent with the settings defined
>> >> >> >> by
>> >> >> >> your
>> >> >> >> operator, therefore unless you change the settings on the phone
>> >> >> >> your
>> >> >> >> message
>> >> >> >> should be sent with your caller id. I'm not sure why the example
>> >> >> >> below
>> >> >> >> places the result of the call to SmsGetPhoneNumber into the SMSC
>> >> >> >> field -
>> >> >> >> this is for the Short Message Service Centre and should be left
>> >> >> >> null
>> >> >> >> to
>> >> >> >> use
>> >> >> >> the default specified by your operator.
>> >> >> >>
>> >> >> >> Have you tried the OpenNETCF.Phone.Sms functionality. All of the
>> >> >> >> interop
>> >> >> >> is
>> >> >> >> ready-wrapped for you - you could compare the sources to see how
>> >> >> >> it
>> >> >> >> is
>> >> >> >> done
>> >> >> >> differently:-
>> >> >> >> http://www.opennetcf.org/sourcebrowse/view.aspx?f=d:/sites/OpenNETCF/InetPub/wwwroot/Source/OpenNETCF.Phone/Sms/Sms.cs
>> >> >> >>
>> >> >> >>
>> >> >> >> Peter
>> >> >> >>
>> >> >> >> --
>> >> >> >> Peter Foot
>> >> >> >> Windows Embedded MVP
>> >> >> >> www.inthehand.com | www.opennetcf.org
>> >> >> >>
>> >> >> >> Do have an opinion on the effectiveness of Microsoft Windows
>> >> >> >> Mobile
>> >> >> >> and
>> >> >> >> Embedded newsgroups? Let us know!
>> >> >> >> https://www.windowsembeddedeval.com/community/newsgroups
>> >> >> >>
>> >> >> >> "Uwe Gebhardt" <uwe.gebhardt@freenet.de> wrote in message
>> >> >> >> news:534a6e6e.0410050018.4a13b59d@posting.google.com...
>> >> >> >> > Hello *,
>> >> >> >> >
>> >> >> >> > I created a class, which allows me to send a SMS.
>> >> >> >> > I used the sendSMS example from Microsoft
>> >> >> >> > (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfSendSMS.asp)
>> >> >> >> >
>> >> >> >> > Okay, it works fine, I can send a SMS, but only without
>> >> >> >> > my own number. The receiver gets an anonymous message.
>> >> >> >> > I already tried to change some options in the code, but
>> >> >> >> > the SMS is still missing the number of the sender.
>> >> >> >> >
>> >> >> >> > My code:
>> >> >> >> >
>> >> >> >> > unsafe public bool sendSMS(string sPhoneNumber, string
>> >> >> >> > sMessage)
>> >> >> >> > {
>> >> >> >> > System.IntPtr hSms = IntPtr.Zero;
>> >> >> >> > IntPtr res = SmsOpen(SMS_MSGTYPE_TEXT,
>> >> >> >> > (IntPtr)SMS_MODE_SEND,
>> >> >> >> > ref
>> >> >> >> > hSms,
>> >> >> >> > IntPtr.Zero);
>> >> >> >> > if (res != IntPtr.Zero)
>> >> >> >> > return false;
>> >> >> >> > Byte[] bDest = new Byte[516];
>> >> >> >> > Byte[] bDest2 = new Byte[516];
>> >> >> >> >
>> >> >> >> > fixed (byte* pAddr = bDest)
>> >> >> >> > {
>> >> >> >> > fixed (byte* pAddr2 = bDest2)
>> >> >> >> > {
>> >> >> >> > byte *pCurrent = pAddr;
>> >> >> >> > IntPtr myNumb = SmsGetPhoneNumber((IntPtr)pAddr2);
>> >> >> >> >
>> >> >> >> > Marshal.WriteInt32((IntPtr)pCurrent,
>> >> >> >> > (int)AddressType.Unknown);
>> >> >> >> > pCurrent +=4;
>> >> >> >> > foreach (byte b in Encoding.Unicode.GetBytes(sPhoneNumber))
>> >> >> >> > {
>> >> >> >> > Marshal.WriteByte((IntPtr)pCurrent, b);
>> >> >> >> > pCurrent++;
>> >> >> >> > }
>> >> >> >> >
>> >> >> >> > Byte[] ProvData = new Byte[12];
>> >> >> >> > byte[] bMessage = Encoding.Unicode.GetBytes(sMessage);
>> >> >> >> > int nMsgSize = bMessage.Length;
>> >> >> >> >
>> >> >> >> > res = SmsSendMessage(hSms, myNumb, (IntPtr)pAddr, IntPtr.Zero,
>> >> >> >> > bMessage, (IntPtr)nMsgSize, ProvData, (IntPtr)ProvData.Length,
>> >> >> >> > SMS_DATA_ENCODING.SMSDE_GSM, (IntPtr)SMS_OPTION_DELIVERY_NONE,
>> >> >> >> > IntPtr.Zero);
>> >> >> >> > if (res != IntPtr.Zero)
>> >> >> >> > return false;
>> >> >> >> >
>> >> >> >> > SmsClose(hSms);
>> >> >> >> > return true;
>> >> >> >> > }
>> >> >> >> > }
>> >> >> >> > }
>> >> >> >> >
>> >> >> >> > Any ideas, what I'm doing wrong?
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>



Re: Send SMS with number of sender by JohnnySalgado

JohnnySalgado
Tue Oct 05 13:05:03 CDT 2004

thanks.
I think that I was looking for in the incorrect side.
Where I found "PPC SMS development", or any information about you say me.

Thanks you very much.

"Paul G. Tobey [eMVP]" wrote:

> Well, then they're running on PCs, right? Not on phones? The method to
> send SMS messages is *not* going to be built into Windows. That probably
> varies from TMobile to Sprint to who knows what else (1234567890@verizon.com
> or something, maybe). So, your question has nothing to do with Windows CE
> or Pocket PC, as the Web page is *not* being viewed on that device or hosted
> there? Even if you *had* the SMS.dll, you wouldn't be able to do anything
> with it.
>
> Since you will be sending these SMS messages from desktop Windows, I'd
> suggest looking at MSDN for information on SMS. However, I don't think that
> you'll find much there. There is a general sort of discussion about what
> SMS is at the beginning of an article on PPC SMS development. It does
> mention some hosting options for the store-and-forward capability of SMS:
>
> MobileSys, Inc.
> Smartserv Online, Inc.
>
> Paul T.
>
> "Johnny Salgado" <JohnnySalgado@discussions.microsoft.com> wrote in message
> news:ED55C3C9-8386-44AF-98B7-209F94A4D81A@microsoft.com...
> > The page will be opened by users running microsoft internet explorer 6.0,
> > when they accessing the web page, they input many cellular phone numbers,
> > then the web page (it needs to perform) sends sms message to cellular
> > phone
> > that they registered.
> >
> > Tha web page is running in IIS, Microsoft 2000 Server Service Pack 4
> >
> > Thanks
> >
> > "Paul G. Tobey [eMVP]" wrote:
> >
> >> "From a Web page" is totally useless information. Who is accessing the
> >> Web
> >> page? Where is it hosted, on what OS, on what server? Is the page
> >> opened
> >> by users running SmartPhone and, when you click on a link, the phone
> >> should
> >> send an SMS message?
> >>
> >> Paul T.
> >>
> >> "Johnny Salgado" <JohnnySalgado@discussions.microsoft.com> wrote in
> >> message
> >> news:04DBD975-AA9C-4677-ADAF-947DFFCFF124@microsoft.com...
> >> > Ok Peter, thanks. I'll download these devices.
> >> >
> >> > I need to perform a program, it sends sms message from web page to
> >> > celular
> >> > phone, maybe one or two thousands messages by sending.
> >> > I don't know How start. I hope you can help me, brinding me
> >> > information,
> >> &