|
Hi,
I use your code for make connection.
How i can share my connection ?
http://www.mahdavy.com
|
|
|
|
|
hey, I need this awesome project to dial a number, and WAIT for either a successful connection, or error. but I'm having trouble with that.
when I tell it
rasconnection1.Dial();
it just dials and continues the code.
if I call
rasconnection1.Dial();
and then add
Thread.Sleep(20000) //sleep 20 seconds
it doesnt dial until AFTER the 20 seconds!
I have also tried making a thread called thDial and using
while(thDial.IsBusy)
{
//wait while its busy dialing...
}
and it gets stuck in the while loop without ever dialing.
how can I set it to dial, and then wait to see if it connected successfully, or had an error in dialing?
It's not a bug it's a f- oh wait... no..It's a bug.
|
|
|
|
|
Hi,
i have 2 modem in my PC, i want to set one of them at my Code ?
do you know how i can do it ?
http://www.mahdavy.com
|
|
|
|
|
I think you need to see which modem it is using to dial out.
if its the one you want then its good, and it will always use that one.
if its using the other one, then uninstall the one it is not using, and re install it. it will most likely use that one.
I think it goes by which modem was installed last. I think.
It's not a bug it's a f- oh wait... no..It's a bug.
|
|
|
|
|
Thanks a lot.
I solved my problem.
http://www.mahdavy.com
|
|
|
|
|
hello.
Suppose, in my system installed 3 modem , every modem can connect to internet.
if uninstall a modem maybe other software that used it have problem.
how to check modems are busy or free . if is free set it to connect internet.
thanks.
i am sina
|
|
|
|
|
As the subject says:
Is it possible to create more then 1 connection with that code?
Anybody out there who found out how it works?
Ideas are welcome too
Thanks in advance.
|
|
|
|
|
After the project i found an easy way to create more than one connection. I simply create a new phonebook and i use the RasEntry functionality to create new entries into my new phonebook. I can now manage the entries and every time i connect to another number via RAS (ISDN in my case) i use a new entry.
No more problems with 1, 2 or 32 open channels (a big DIVA ISDN Card).
|
|
|
|
|
thank uuuuuu soo much for the RAS dll but the function RAS connected is not working properly when it connected to the internet pls give some Help
|
|
|
|
|
i want to use this , but i don't know how to use it,
how to create to a new Connection?
and how connect this connnection?
in fact , i need create a vpn client. use itselef account,
my email: lovebanyi at 163.com
if you see this message ,please send a email to me
Thank you
我该什么用这个类库呢?我不清楚什么去用它.
什么去创建一个连接.
什么去连接创建好的连接.
我想要的是创建一个vpn连接,并用它的帐号连接它.
我的邮箱 lovebanyi@163.com
如果你有看到这个消息就发一封邮件给我吧.谢谢
|
|
|
|
|
vpn isnt included in this solution
connect:
Ras.RasConnection rasConn;
rasConn.PhoneNumber = "110";
rasConn.UserName = "user";
rasConn.Password = "pw";
rasConn.CallbackNumber = "";
rasConn.Domain = "";
rasConn.Dial();
|
|
|
|
|
HI I am trying to use your demo project but facing error
Additional Information: text lenght must be less than 64 characters long
is any solutions please..
thanks
|
|
|
|
|
Hey, there is a problem when there are error messages longer than 64 characters. Therefore you have to shorten the text which goes to these notification icons (on the taskbar). The code therefore is within Form1 on line 748. I changed it to:
string rasNotifyText = (string.Format("{0},{1}", e.ConnectionState, e.Message));
this.rasNotify.Text = (rasNotifyText.Length > 63) ? rasNotifyText.Substring(0, 63) : rasNotifyText;
Quick and dirty, but it works
|
|
|
|
|
Hi,
All works me well with WINVER4 WINVER5.
When I define WINVER501, I get exception: Error 632 - Incorrect Structure Size.
Can somebody help with this problem?
I need setup functionality accessible in WinXp.
thank you Petr Synek
|
|
|
|
|
I'm getting the same error. Any help would be appreciated!
|
|
|
|
|
I found the problem here:
#if WINVER4
RAS_MaxEntryName =256,
RAS_MaxDeviceName =128,
RAS_MaxCallbackNumber =RAS_MaxPhoneNumber,
#else
RAS_MaxEntryName = 20,
RAS_MaxDeviceName = 32,
RAS_MaxCallbackNumber = 48,
#endif
According to http://billmccarthy.com/Projects/Archived/PlatformVB/dun/rasenumdevices.htm, the RAS_MaxDeviceName should be 128 for Winver4 *OR LATER* - in this case, it will only be set to that on Winver4, later versions will try and use 32. I changed the 32 to 128 and it ran fine...
|
|
|
|
|
hey, I need to connect to a PPP ISP, how do I do that with this code???
I do not have a phone line to test it with, but it does connect and try to dial through the modem just fine.
what other steps must be taken to connect to an ISP ?? thanks.
It's not a bug it's a f- oh wait... no..It's a bug.
|
|
|
|
|
Hi all,
can any one help me on this issue. If we set RasEntry options with bit that sets mentioned flag to 0 (we just don't specify it), code ignores that and created entry has this option under TCP/IP settings enabled. Bummer. Does anyone know why or how to correct this? Other flags seem to be OK.
I believe that author of this code uses 0x3d0d0318 as entry options. Try changing it to 0x3d0d0308 and observe.
|
|
|
|
|
Hi
I am working on a project to develop a VPN Dialer using RAS.dll, here is the Code
Conn.PhoneNumber = "10.101.10.1";
Conn.Phonebook = "C:\\Documents and Settings\\All Users\\Application Data\\Microsoft\\Network\\Connections\\Pbk\\rasphone.pbk";
Conn.UserName = "hassaan";
Conn.Password = "nothing";
Conn.Connected += new EventHandler(Conn_Connected);
Conn.Error += new RasErrorEventHandler(Conn_Error);
Conn.Disconnected += new EventHandler(Conn_Disconnected);
Conn.DialNotify1 += new RasDialNotify1EventHandler(Conn_DialNotify1);
Conn.Dial();
but i am keep getting the Error message "The Modem or the connecting Device is already in use, or is not configured Properly"
Hoping for earliest helping reply
Thanks
|
|
|
|
|
hello,
where can I parameter the time for the automaticle disconnect.
my problem is, that i activate the connection, and after I think 60-80 seconds the connection will be disconnected. there is no traffic during this time.
|
|
|
|
|
RasEntry.IdleDisconnectSeconds = 300;
|
|
|
|
|
I'm using this good Ras connection, to establish a gprs connection, and I encoutered vulnerability problems.
Infact this ras connection doesn't use the windows firewall, even tought I have enabledit manually on the windows' connection panel.
Never the connection notification, on the Network connections windows,seems to be related to the connection established via SW.
So I'm on Network without any protection.
Any ideas on how to protect me on this connection, programmatically?
Thanks
DE
DE
|
|
|
|
|
Hi.
Your code is very helpful - thank you for propagation.
It seems there is a problem. I switched of ISDN cable of my modem. After that i dialed up some Dialer. I got first an error 680 "No Dialtone" - that's ok - but i didn't get it through the error event. I can fetch it only by analyzing the dialnotify1 - events. The error occurrs after the portopen status. After that i hung up and dial again. From this point i go always error 756 "this connetion is beeing dialing" At the same point of time i opened the network conections in winXp and i cannot start or stop that dialer - because its in a pending state.
If i stop and restart my program the problem disapears - for exact one dialup. After deugging i discover that the Wrapper - Hangup - function does not call the real RAS.Hangup due to an former error which describes the handle as invalid. But the RAS - Hangup function must be called at least once because of freeing ressources inside the rasapi32.dll. After a quick and dirty solution which ensures a call to RAS.Hangup one time after a Call to Dial() the problem disapears.
Hope this will help
Best regards
Knoepfle
Knoepfle
|
|
|
|
|
See my comment below, with the subject "Thanks". I had to do the same thing you did - ensure that RasHangUp gets called. I too wonder what that error is that makes the handle invalid.
|
|
|
|
|
Was wondering how to use this code to connect over the internet. I don't use a modem.
Dave A.
|
|
|
|