We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Start dialup network automatically

Syouchi
Syouchi asked
on
Medium Priority
377 Views
Last Modified: 2010-04-04
Hello,all.

I want to start and end the dailup network automatically from my application.
My Os is Windows95.

Please help.

Syouchi
Comment
Watch Question

search the file of the dialer and run it with shellexec.

Commented:
Dear syouchi
You have not mentioned what is the type of network to connect to.
I am detailing the procedure for RAS(Remote access services)
availble in windows 95.
There are two components Dial up (d ras.zip) and  TfnugryRASnotify components available in Torry's Delphi pages(Under the heading of communications) website which will provide all the necessary functions for dial up connections.
In this connection refer to  
https://www.experts-exchange.com/Q.10068423 
in which I have already answered a question regarding dial up connections.
Hope this solves your problem
Venks

To run it use....ShellExecute(....)

To stop it use this....
var
  hHandle : HWND;
begin
  hHandle := FindWindow(nil,PChar('Name Of The Form''s Caption'));//example 'Notepad'
  if hHanlde <> 0 then
    SendMessage(hHandle, WM_CLOSE, 0, 0);
end;
-------
That's all you need....

Regards,
Viktor Ivanov

Author

Commented:
Thanks,Saar.

But I cannot understand how to use 'ShellExec API'.
What is the dial up program file's name?
I am just using dialup program in the Win95 My Computer,
not third party program.

And Please show me a sample.

Syouchi
Hello Syouchi.... I'm not sure but do you want to start a connection, or you just want to open the Dial-Up Networking folder and let the user choose the connection.....

Regards,
Viktor Ivanov

Author

Commented:
Sorry for my English.

I want to start dialup program and connect to Internet.
I mean, when I push the button on my program, I want to connect to E-mail server automatically and send a E-mail.

Syouchi.



Oh, so that what it is....try this....

Add this to your uses clause -> ShellAPI ....like

uses Windows, SysUtils,............, ShellAPI;

..and then this into the button's click event

ShellExecute(0,'open',PChar('viktor@megsinet.net'),nil,nil,SW_NORMAL);

//viktor@megsinet.net is my E-mail address
//This will start your default server... (ex.Netscape, Internet Explorer)... and you will be able to //send an E-mail....
//if you want to open a website just replace my e-mail address with the site like this.

ShellExecute(0,'open',PChar('http://www.yahoo.com'),nil,nil,SW_NORMAL);

//That's all there is to it...if you need any help just leave a comment or you can send me e-mail at //viktor@megsinet.net

Regards,
Viktor Ivanov

Author

Commented:
Very very sorry for my English.

I don't know Dial-Up Network is correct word.
Because My Win95 is Japanese version.

I will connect to internet by a modem.
When the button pushed on my app, Dial-up Network program start and dail-up network dialog open and modem line connect to a provider and E-mail is sended, I expect.

Thanks a lot, Viktor Ivanov.
ShellExecute(..) do not work.

Pleasee help.

Syouchi



 

Commented:
Dear Syouchi
If you just just want to send an e mail use   a software like
Eudora Lite.If you want to use delphi to send e mail you have to do a lot of reading on dial up connections,RAS and e mail components that came with delphi or third party components(mostly free and availble from delphi super page under subheading communications)
Venks

Author

Commented:
I want to accept venks!!

I can solve this problem.

Thank you, all especially venks.




Author

Commented:
Hello.Linda.

I had solved this problem.
Because of venks' advices, I want to accept venks.

Syouchi.



Hey Syouchi, jusst wait until Venks comes back and put it as an answer, then you accept it :)

Regards,
Viktor Ivanov
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
Thanks a lot, venks.
I will study RAS program more.

Syouchi.




Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.