472,111 Members | 1,931 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,111 software developers and data experts.

send sms in windows application using .NET

i m developing one windows application using ASP.NET 2.0 (C#)
and i want to use SMS service in which, we can send sms from our application to the mobile number...
so plz help me in this situation.... wht can i do for that???
which services are helpful for me in my application???
Jan 25 '07 #1
10 6198
759 Expert 512MB
You said its Windows Application, then why did u use ASP.NET 2.0 ?

Jan 25 '07 #2
[quote=radcaesar]You said its Windows Application, then why did u use ASP.NET 2.0 ?

because iam in traning in company so i cant argu on that
Jan 25 '07 #3
759 Expert 512MB
If its web application, at that instance ASP.NET is prefered. If its windows apps then it will be either only c# or vb .net. You cant use System.Web Namespace in windows forms.

Clear ?

Enquire to them clearly about this, which assembly u r goin to use.

Then, For this SMS Stuff there are free web services available to send SMS from our apps.



Also, u can use achieve this through System.Runtime.InteropServices assembly.

Here is a mock code which i shoot from a sight

using System.Runtime.InteropServices;
// Public Declare Function SmsOpen Lib "SMS" (ByVal ptsMessageProtocol As String, ByVal dwMessageModes As Long, ByRef psmshHandle As Long, ByRef phMessageAvailableEvent As Long) As Long
public static extern long SmsOpen (string ptsMessageProtocol, long dwMessageModes, ref long psmshHandle, ref long phMessageAvailableEvent);

// Public Declare Function SmsSendMessage Lib "SMS" (ByVal smshHandle As Long, ByVal psmsaSMSCAddress As Long, ByVal psmsaDestinationAddress As String, ByVal pstValidityPeriod As Long, ByVal pbData As String, ByVal dwDataSize As Long, ByVal pbProviderSpecificData As String, ByVal dwProviderSpecificDataSize As Long, ByVal smsdeDataEncoding As Long, ByVal dwOptions As Long, ByRef psmsmidMessageID As Long) As Long
public static extern long SmsSendMessage (long smshHandle, long psmsaSMSCAddress, string psmsaDestinationAddress, long pstValidityPeriod, string pbData, long dwDataSize, string pbProviderSpecificData, long dwProviderSpecificDataSize, long smsdeDataEncoding, long dwOptions, long psmsmidMessageID);

// Public Declare Function SmsClose Lib "SMS" (ByVal smshHandle As Long) As Long
public static extern long SmsClose (long smshHandle);

//Public Const SMS_MSGTYPE_TEXT = "Microsoft Text SMS Protocol"
public const string SMS_MSGTYPE_TEXT = "Microsoft Text SMS Protocol";

// Public Const SMS_MODE_SEND = 2 ' Open in send mode
public const long SMS_MODE_SEND = 2;

// Public Const SMSDE_GSM = 1 ' Use standard GSM encoding
public const long SMSDE_GSM = 1;

Public Const SMSAT_INTERNATIONAL = 1 ' International number format
public const long SMSAT_INTERNATIONAL = 1;

Public Const PS_MESSAGE_OPTION_NONE = 0 ' No message options
public const long PS_MESSAGE_OPTION_NONE = 0;

Public Const PS_MESSAGE_CLASS0 = 0 ' Send immediately
public const long PS_MESSAGE_CLASS0 = 0;

Public Const PSRO_NONE = 0 ' No replacements
public const long PSRO_NONE = 0;

Public Const SMS_OPTION_DELIVERY_NONE = 0 ' No delivery options
public const long SMS_OPTION_DELIVERY_NONE = 0;

Jan 25 '07 #4
thanx buddy.
web services which provide u mentioned is limited for uk???
as i wnt to use my application in India...
tht can provide services me at india????
Jan 25 '07 #5
759 Expert 512MB

check www.webservicex.net

Jan 25 '07 #6
1,892 Expert 1GB
You said its Windows Application, then why did u use ASP.NET 2.0 ?

because iam in traning in company so i cant argu on that
Why did you report this post to the moderators?
Jan 25 '07 #7
366 256MB

You want to use only web services for sending messages are you using any

external harware like gsm modems ,are you going to use any other services

developed by your company.as far as windows application is considered there is no

particular need of web servises( my opinion)

Jan 27 '07 #8
ya i want to use sms service in windows application
i dont want to use web services
i m intrested to use SMS gateway or gsm modem facility ...
and i m using .NET (C#)
so vl u help me ??????
Feb 1 '07 #9
366 256MB

if you are using gsm modem and c# windows application then i can help as much

as i can already 3 or 4 times i hav posted some part code any some links

regarding that in this forums just find out else i will try to post again
Feb 2 '07 #10
1,892 Expert 1GB
Please don't report posts and request answers through email.
Mar 20 '07 #11

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Boba | last post: by
4 posts views Thread by Tony M | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.