|
I really love your example, it has all the gimmicks in it i can use for my own project!
I credit you in my project!
Many thanx!!;)
If you make something idiotproof, someone else will make a better idiot.....
|
|
|
|
|
I need ur help..
plz give me ur email..
my email id is
vavjeeva@gmail.com
Keep Smile Always
|
|
|
|
|
I need ur help.. vavjeeva@gmail.com
Keep Smile Always
|
|
|
|
|
The link is dead, can author fix or someone else supply?
"How to using Remote Access Service on DotNet"
Thanks,
|
|
|
|
|
Nice code. But i'm trying to use it to connect to a VPN server.
And I only get a error message..
Any suggestion on differences with doing RAS calls to PPTP. Should this work or do I have to change the code?
CC
|
|
|
|
|
Easy.
just add the entryname & phone book file to the rasdial.
looks like:
RasDial(null,"C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk",_Params,1,_DialNotifyDelegate,ref _Handle);
the keys are:
1. need to add the entryname in _Params, that is the entryname, not a connection manager name, very important.
2. use IP instead the phone no in _Params.
3. the phone book name.
and you get it.
Still some errors somewhere. but definitely Cool code. thanks a lot.
|
|
|
|
|
hi,
the demo code is great, but could u give an example of how to detect that a connection has been made to an ISP/server, and how to detect that it has been terminated.
thanks
rt
|
|
|
|
|
I am using Windows XP as my development machine. I have found that the alternate numbers are not loading properly after making a call to the RasGetEntryProperties. I have tried several things to get it to work. I have not modified the code given. Any suggestions??
|
|
|
|
|
in the actual pbk file, it's just adding 2 additional numbers even though i didnt specify them, and calling them "ack" and something else, garbage data...
any ideas of how to fix? I even try doing rasEntry.AdditionalNumbers.clear()
|
|
|
|
|
Does anybody use this code for ISDN modem and how?
I try but unsuccessful .
smac
|
|
|
|
|
I want to dial automaticly to the internet using rasapi32.dll. My problem is, that I don't want to ask the user for his username and password. Is it possible the get these information automaticly?
|
|
|
|
|
I had the same problem. I figured it out. I just used an XML file (or you can use a text file)
to put the info in. then take the info out of that file, and set it as the parameters.
It's not a bug it's a f- oh wait... no..It's a bug.
|
|
|
|
|
Can we somehow find the modem type using RAS.. i.e. Is my modem is 56K, 33k or ISDN or cable modem ?
Help will be highly appriciated
sdsd
|
|
|
|
|
The devicetype offers the help to find out if it is modem or isdn.
|
|
|
|
|
The code is very good,But I find a question your code can't connect to pppoe
look http://www.codeproject.com/internet/afdialer.asp
It can use to pppoe,but my vc is poor .can you anser the question?
I love .net
|
|
|
|
|
Hi,
Your code is perfect, but I think that I've found a little problem.
If I use an existing Dun, using entry name and phonebook in a RasConnection, I found some problems if the modem is not connect to a line.
It notify me that there is no answare, and if I try to re-dial the same connection it tells me that is already being dialled.
Did you have some suggest?
thanks a lot.
Spagna
|
|
|
|
|
Thanks for a great effort. This code is exactly what I was looking for, for soooooo long! Actualy I am just looking to determine when a internet connection is present, and when not.
Thanks,
|
|
|
|
|
Look at this code...
They tell you when is connected or not...
I think may help.
Guber
using System;
using System.Runtime.InteropServices;
namespace InetStateTest
{
public class ConnectionState
{
private enum ConnectionStateEnum
{
//Local system has a valid connection to the Internet, but it might or might not be currently connected.
ConnectionConfigured = 64,
//Local system uses a local area network to connect to the Internet.
ConnectionLan = 2,
//Local system uses a modem to connect to the Internet.
ConnectionModem = 1,
//No longer used.
ConnectionModemBusy = 8,
//Local system is in offline mode.
ConnectionOffline = 32,
//Local system uses a proxy server to connect to the Internet.
ConnectionProxy = 4,
//Local system has RAS installed.
RasInstalled = 16
}
private class Win32
{
[DllImport("Wininet.dll", CharSet=CharSet.Auto)]
public static extern int InternetGetConnectedState(out int Flag, int Reserved);
}
private static int GetConnectionFlag()
{
int Flag;
Win32.InternetGetConnectedState(out Flag,0);
return Flag;
}
public static bool IsModemConnected()
{
return ((GetConnectionFlag() & (int)ConnectionStateEnum.ConnectionModem)==0) ?
false : true;
}
}
public class StartUp
{
public static void Main()
{
if (ConnectionState.IsModemConnected())
{
Console.WriteLine("Connected");
}
else
{
Console.WriteLine("Not connected");
}
Console.ReadLine();
}
}
}
Guber
|
|
|
|
|
Guber, you are the man! This is absolutely perfect! Clean, short and to the point.
Thx man!
G
|
|
|
|
|
This is good code, I looking this code..
thank you a lots....
Leonardo..
|
|
|
|
|
This code looks great, I added an exception class and was able to use as is, great job!
g-man
|
|
|
|
|
the code looks pretty good. Thanks for the effort.
Chad
|
|
|
|