473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

What is the library in .net that deal with the modem

Amr
Hi
i need a library to deal with the modem, cause i have to make an application
that connect to the modem and deal a number, and wirte the events (busy,
answered, not answered)

Nov 16 '05 #1
5 2076
"Amr" <Am*@discussions.microsoft.com> wrote in message news:5B**********************************@microsof t.com...
i need a library to deal with the modem, cause i have to make an application
that connect to the modem and deal a number, and wirte the events (busy,
answered, not answered)


Current versions of .NET do not have built-in support for working with the modem
via the serial port (COM1, etc.) so you must either use a third-party library or write
your own in unmanaged Win32 code and then invoke it through P/Invoke.

Whidbey (.NET 2.0) is supposed to feature greater managed support for working
with a serial port, through the SerialPort class (with related types and event handlers)
in the System.IO.Ports namespace, which [preliminarily] looks like this,

http://msdn2.microsoft.com/library/tf8zk72w.aspx

When speaking to a modem, you'll most likely need to send Hayes (AT) commands
to the serial port yourself, e.g.,

ATDT5551234

to dial; and then interpret the verbose response strings like RING and BUSY.
Derek Harmon
Nov 16 '05 #2
Amr,

There is nothing in .NET that deals with the modem in a completely
managed way. In order to do this, you will have to use the RAS API
functions through the P/Invoke layer.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Amr" <Am*@discussions.microsoft.com> wrote in message
news:5B**********************************@microsof t.com...
Hi
i need a library to deal with the modem, cause i have to make an
application
that connect to the modem and deal a number, and wirte the events (busy,
answered, not answered)

Nov 16 '05 #3
Hi,

I do really suggest you write this in VC++.

We have written a dialer in c# using the unmanaged RAS api & all
I can say is never again. Alot of time is waisted getting the
structures
to map correctly & we had big problems with the GC.

David

Nov 16 '05 #4
Another option for you would be to use ActiveX automation with HyperACCESS
(the commercial version of HyperTerminal). This is a mature ActiveX API
that is quite easy to work with (although lacking in any C# examples). Of
course, HyperACCESS has to be installed on all client machines, which may
not be a good thing for you.

--Bob

"Amr" <Am*@discussions.microsoft.com> wrote in message
news:5B**********************************@microsof t.com...
Hi
i need a library to deal with the modem, cause i have to make an
application
that connect to the modem and deal a number, and wirte the events (busy,
answered, not answered)

Nov 16 '05 #5
The VB Resource kit has the Sax.Net serial communication component community
edition
http://msdn.microsoft.com/vbasic/vbr...q/#installvdir

"Derek Harmon" <lo*******@msn.com> wrote in message
news:e7**************@TK2MSFTNGP14.phx.gbl...
"Amr" <Am*@discussions.microsoft.com> wrote in message news:5B**********************************@microsof t.com...
i need a library to deal with the modem, cause i have to make an application that connect to the modem and deal a number, and wirte the events (busy,
answered, not answered)


Current versions of .NET do not have built-in support for working with the

modem via the serial port (COM1, etc.) so you must either use a third-party library or write your own in unmanaged Win32 code and then invoke it through P/Invoke.

Whidbey (.NET 2.0) is supposed to feature greater managed support for working with a serial port, through the SerialPort class (with related types and event handlers) in the System.IO.Ports namespace, which [preliminarily] looks like this,

http://msdn2.microsoft.com/library/tf8zk72w.aspx

When speaking to a modem, you'll most likely need to send Hayes (AT) commands to the serial port yourself, e.g.,

ATDT5551234

to dial; and then interpret the verbose response strings like RING and BUSY.

Derek Harmon

Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kees Bakelaar | last post by:
Hi all, This is not really a VB question, however, i am stuck a modem problem The modem is connected to a cristie teleport with a speed of 9600 bps. How can i set the modems DTE speed at...
2
by: Etienne Labuschagne | last post by:
Assuming the modem is on COM5: m = open('COM5','wb+') m.write('+++\r\n') m.flush() m.write('ATQ0V1E0\r\n') m.flush() m.write('ATDT5551234;\r\n') m.flush() response = m.read()
1
by: Etienne Labuschagne | last post by:
Thanks for the responses. I will look into using PySerial for talking to the modem as suggested by Peter. The code example I gave is probably not the best way to do it, but it seemed to work ok...
8
by: Andrew Poulos | last post by:
Is there a small graphics library that I can use? All I need to do is draw a line of a nominated thickness and colour between two specified points and to, at some later time, "delete" the line? ...
17
by: Franc Zabkar | last post by:
My D-Link DSL-302G modem/router has a real-time clock whose settings are volatile. To avoid hand keying the date/time via the modem's JS interface, I wonder if there is a way to copy the JS code to...
11
by: Ray | last post by:
Hello, I've been reading MSDN to find out the answer for the question above, but I think I should ask in this newsgroup (since nearly everything I read in MSDN Seems to recommend me to move to...
0
by: bishnu12 | last post by:
Hi all, There are two questions 1. I am trying to write a programme which can query to a modem get the modem details. i am using normal send() and recv() functions. But when i try to fetch a...
3
by: Nutshell | last post by:
Hello everybody, in my application I'd need to know if a com port is a modem or not (and eventually its description and if it is a null modem). I get the list of com ports available with: string...
2
by: muruganyuva | last post by:
hi, in my project i'm sending the data from source to destination with the help of modem. one modem at the source and other at the destination. at first i'm initializing the source modem. ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

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.