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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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)
 
Amr said:
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
 
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.
 
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
 
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
 
The VB Resource kit has the Sax.Net serial communication component community
edition
http://msdn.microsoft.com/vbasic/vbrkit/faq/#installvdir

Derek Harmon said:
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
 
Back
Top