473,396 Members | 1,938 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,396 software developers and data experts.

“Dialup Connectivity” in .Net

Hi :idea: ,

I am looking for some input on “Dialup Connectivity” in .Net

My scenario being I will have a config file containing the parameters
required for modem connection like the phone number, data bit, baud
rate, etc. Here I have instantiate the connection and send a string
to the server (machine I connect to) and where I will receive a
message once the string has been received.

Any code and documentation on how to set this project scenario will be
welcome.

Thanking you in advance.

Hima :roll:

Nov 16 '05 #1
2 1886
Hima,

There is nothing in the framework out of the box that will help you with
this. If anything, you will probably have to make calls to the RAS api
through the P/Invoke layer.

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

"himu" <hi*********@healthasyst-dot-com.no-spam.invalid> wrote in message
news:40********@127.0.0.1...
Hi :idea: ,

I am looking for some input on “Dialup Connectivity” in .Net

My scenario being I will have a config file containing the parameters
required for modem connection like the phone number, data bit, baud
rate, etc. Here I have instantiate the connection and send a string
to the server (machine I connect to) and where I will receive a
message once the string has been received.

Any code and documentation on how to set this project scenario will be
welcome.

Thanking you in advance.

Hima :roll:

Nov 16 '05 #2
"himu" <hi*********@healthasyst-dot-com.no-spam.invalid> wrote in message
news:40********@127.0.0.1...
Hi :idea: ,

I am looking for some input on “Dialup Connectivity” in .Net

My scenario being I will have a config file containing the parameters
required for modem connection like the phone number, data bit, baud
rate, etc. Here I have instantiate the connection and send a string
to the server (machine I connect to) and where I will receive a
message once the string has been received.

Any code and documentation on how to set this project scenario will be
welcome.

Thanking you in advance.

Hima :roll:


Snippets of code cut/pasted in to give you and idea... Functions work, but
not tested as from snippets.

// Calling code in form
RAS rc;

private void buttonConnect_Click(object sender, System.EventArgs e)

{

int ret = -1;

// ISP is an existing phone book RAS Dialup/VPN entry

rc = new RAS("ISP");

ret = rc.Connect();

if (ret != 0)

{

rc = null;

}

}

private void buttonDisconnect_Click(object sender, System.EventArgs e)

{

if (rc != null)

{

rc.Disconnect();

rc = null;

}

}

// end calling code in form
// Requires IE 5.5 or above!
public class RAS

{

public enum DialUpOptions

{

INTERNET_AUTODIAL_FORCE_ONLINE = 0x0001,

INTERNET_AUTODIAL_FORCE_UNATTENDED = 0x0002,

INTERNET_DIAL_FORCE_PROMPT =0x2000,

INTERNET_DIAL_SHOW_OFFLINE =0x4000,

INTERNET_DIAL_UNATTENDED =0x8000

}

public RAS() {}

[DllImport("wininet.dll",CharSet=CharSet.Auto)]

private extern static int InternetDial(

IntPtr hwnd,

[In]string lpszConnectoid,

uint dwFlags,

ref int lpdwConnection,

uint dwReserved

);

[DllImport("wininet.dll",CharSet=CharSet.Auto)]

private extern static int InternetHangUp(

int lpdwConnection,

uint dwReserved

);

public int Connect()

{

int retVal = RAS.InternetDial(IntPtr.Zero, m_ConnectionName, (uint)
this.DialUpOptions.INTERNET_DIAL_UNATTENDED, ref m_connectionnumber, 0);

return retVal;

}

public void Disconnect()

{

InternetHangUp(m_connectionnumber, 0);

}

}
Nov 16 '05 #3

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

Similar topics

0
by: Nir | last post by:
I need a script to perform dialup, connecting to another computer using a modem. I tried to write directly to the modem comport it didn't work. Thanks Nir,
0
by: SPD | last post by:
I've been researching this issue with little luck. Here's the situation: We have a few users on slow dialup connections who are posting data from forms. Frequently, they get script timeout...
3
by: Alex | last post by:
I have developed a VB application that uses Oracle 8i database for backend. The database server is on the local network. From my development machine, the application connects (via ODBC) to the...
1
by: Matt Moran | last post by:
Hi, just wondering if anyone out there has created a dialup connection using C# or other dot net language. Is the rasdial.dll the only way to do this? Where can I find code examples to create...
3
by: Harry Simpson | last post by:
I've got an aspnet page that is primarily a datagrid within a DIV that loads a dataset from a SQLServer call on load. It returns about 187 records. The kicker is that when i access this page...
1
by: Darren McDowell via .NET 247 | last post by:
I have a situation, I was wondering if someone could help me. Wehave a .net web service, it runs several transactions in sqlserver 2000. We have several clients which connect to this webservice in...
2
by: cr113 | last post by:
I want to write program that will establish a dialup connection from a standalone pc to a private network and then copy files. The program will reside on the standalone pc. Is there .NET object for...
1
by: den 2005 | last post by:
Hi everybody, How do you monitor the connection if it is still open or close for a dial up and internet RAS connection? I used both dialup and vpn RAS. The dialup is for modem connection and vpn...
0
by: Sells, Fred | last post by:
We need to automate the download of data that is now done manually via a terminal session to a dialup bulletin board. The user uses this to upload and download files. Hard to believe in this day...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.