 |
| ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

November 29th, 2008, 09:39 AM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
pls help me..
i used the code that was posted in msdn help and support for sending sms in mobile using asp.net. but i found these following errors.
[DllImport("sms.dll")]
private static extern IntPtr SmsOpen(String ptsMessageProtocol,
IntPtr dwMessageModes, ref IntPtr psmshHandle, IntPtr
phMessageAvailableEvent); [DllImport("sms.dll")]
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);
[DllImport("sms.dll")]
private static extern IntPtr SmsClose(IntPtr smshHandle); the highlighted lines shows error..
Error 1 Expected class, delegate, enum, interface, or struct
Error 3 Identifier expected
Error 8 The modifier 'extern' is not valid for this item
Error 9 The namespace '<global namespace>' already contains a definition for '?'
i would be extremly grateful to you if you help me sir.
|
|

November 29th, 2008, 10:47 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Where are you calling this code? It compiles fine for me inside a class in a Smart Device application provided I add a using statement for using System.Runtime.InteropServices.
I haven't been able to run the code as I don't have sms.dll. I also don't know where to get it, so that's something you need to figure out.
And how is this related to ASP.NET?
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
|
|

November 30th, 2008, 05:39 AM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi sir,
thks for ur reply..i tried to run the code in asp.net page..
i have used the namespace which u said already..u can get sms.dll in
this link..xttp://support.microsoft.com/kb/555578..replace x with h.
im unable to compile sir..y??
|
|

November 30th, 2008, 12:08 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Replace x with h? Why not just write http
Anyway, I am not 100% sure, but I think this code only works om a Pocket PC or other device as it seems to make use of device capabilities to send SMS.
For ASP.NET apps you probably need a host / service that you connect to in order to send messages.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
|
|

December 4th, 2008, 07:23 AM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
sir bcos new begineers r nt allowed to use write http..
sir i know tht it should b viewed in pocket pc..
how cn i use it to c the output??
|
|
 |