Sending SMS from C# application

Ever since my article( published in MS Support site, I receive many emails seeking for clarifiations on how to send SMS from a computer. I am writing this article, a different of its kind, is in the form of Question and Answers, would serve for other readers also. It is based on a email conversation between me and one of the readers of the MS site article.


The code sample you used with sms.dll in the article does not work with my ASP.NET mobile application. Why?


The article focuses on sending SMS from .NET CF application(used in Pocket PCs and Smart Phones). It also has a notion about ASP.NET mobile application that uses an existing webservice to send sms. Do not get confused with these two types of application. The article no way connected to sending SMS from any normal windows/console application in VB.NET or C#.


I am making a desktop software for this(phone Call or SMS) in VB.NET can you tell me how I call SMS.dll file and phone.dll file. Because without this when i am sending SMS it shows an exception ( value cannot be null. Parameter name: destination). So please tell me how i overcome with this problem, please tell me how i call SMS.dll or phone.dll.


Those DLLs are found in Windows Mobile 5.0 SDK. You need to install them separately. .Net Compact Framework doesn't include those files. If you want to send sms from simple VB.NET(C#) application, you need to target your application to the device, not the computer at all. Ironically, this part is not the scope of that article.

For download details of Windows Mobile 5.0 sdk for Pocket PC, visit

For download details of Windows Mobile 5.0 sdk for Smart Phone, visit


Then, how do I send SMS from my computer, not using .NET Compact Framework, not using smart device application template in Visual Studio.


To perform mobile operations, your computer must have wireless network (usually it requires a infra-red port) and must have SIM card attached either in CPU or in the modem. Only then, you can send SMS directly from computer to mobile. If you have Bluetooth capability in your system, you can send mails to mobiles which are Bluetooth enabled. These techniques are expensive and require a special configuration in the hardware, drivers and software.

The simplest way of sending SMS is using internet as a medium. You can make use of existing web services (they have SMS servers and gateways installed in their machines) as mentioned in my article.

Another way is to make use of existing messenger services like yahoo messenger. Get the messenger SDK and write program sending SMS using the components available. Using this technique, you can send SMS over the net, if you just have your own email account with them.


Which SIM card I attach in CPU or in modem, it is mobile SIM card Or Any other thing because if I attach mobile phone SIM card then my every SMS is cost effecting so there is no difference in making a software or using simple mobile for send SMS.


The idea is to make the computer aware of mobile network and capable of handling wireless requests. You need a SIM card, subscribed to some mobile operator, not for a hand-held mobile, but for a computer.

But, the most common practice is to buy a USB (universal serial bus) SIM reader and SIM reader driver software from the mobile operator (Airtel, Reliance etc.) for use on a computer. The USB SIM reader is a PC/SC standard compliant reader so it is accessible using the Microsoft* smart card subsystem.

Moreover, nowadays, the question is not about making just software, but for which device? Where do you target your application to run? - is the biggest question prevailing today.


If I make my this software in + or c# after that it requires wireless network or not, if required then how I make a Wireless Network and what are their requirements if you have any tutorials about this. Please suggest me.


Before writing drivers for WLAN, you first need a Wireless LAN card, the one like Intel PRO/Wireless 3945ABG.

To learn more about WLANS, you need to buy a book titled 'Designing a Wireless Network' by Syngress publications. Here is the URL:


If I made this software and install in client machine so I will work or not if not then why.


If you develop an application relying on these hardware/drivers/wireless protocols, your client should have the same infrastructure as well. No doubt about it.


My requirements for this software is sending SMS and making phone calls to mobile phones or landline phones in free of cost.


If you are looking for sending SMS and making phone calls free of cost, it indirectly tells you that you need to spend for that. Anyways, there are some workarounds.

To make phone calls, You need to check with the services offered by



From your .Net Application, you have to install RTC Client API and SIP(Session Initiation Protocol) Service Provider

The Real-Time Communications (RTC) Client API is a set of COM interfaces that enables you to build applications for making PC-PC, PC-phone, or phone-phone calls or creating instant messaging (IM) sessions over the Internet. Both voice and video calls can be established on PC-PC calls.

There are three simple steps in creating an Interop Assembly for the RTC Client SDK binaries. The Interop assembly can be used by C# or VB.NET managed code. I have assumed that you have installed the RTC Client API SDK 1.3

(1) Download and install the Microsoft Platform SDK

(2) Generate the type library

"midl /I "C:\Program Files\Microsoft Platform SDK\Include" rtccore.idl"

(3) Generate the interop assembly for any version of the .NET framework

"tlbimp rtccore.tlb /out:Interop.RTCCore.dll /namespace:RTCCore /sysarray"

SIP Service providers are just like mobile operators, and you need to subscribe it.


My above questions arises because when we are using yahoo messenger or any other messenger and make phone calls or sending SMS so for this our PC have no wireless network but our operations working properly.


The best and proven way is to make use of messenger services. It is simple as it is based on Internet. Get started with downloading the SDK and program against it.


Author: T.Thirumala Reddy18 Jan 2009 Member Level: Bronze   Points : 0

very valuble information....

Author: Dhanish Sudarsanan Nair22 Jan 2009 Member Level: Gold   Points : 1

Thanks for the details I never think of doing an sms based program after seeing your article I planned to do and is working fine

Author: Gollapudi Ramya Krishna22 Jan 2009 Member Level: Silver   Points : 0

valuable inforamtion given



Author: Balint17 Feb 2009 Member Level: Bronze   Points : 0

Where is the article?

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: