whats new ¦  programming tips ¦  indy articles ¦  intraweb articles ¦  informations ¦  links ¦  interviews
 misc ¦  tutorials ¦  Add&Win Game

Tips (1541)

Database (90)
Files (137)
Forms (107)
Graphic (114)
IDE (21)
Indy (5)
Internet / LAN (130)
IntraWeb (0)
Math (76)
Misc (126)
Multimedia (45)
Objects/
ActiveX (51)

OpenTools API (3)
Printing (35)
Strings (83)
System (266)
VCL (242)

Top15

Tips sort by
component


Search Tip

Add new Tip

Add&Win Game

Advertising

25 Visitors Online


 
...start a dialup connection?
Autor: Jim Crawford
[ Print tip ]  

Tip Rating (10):  
     


uses
  
ShellAPI;

procedure TForm1.Button1Click(Sender: TObject);
begin
  case 
OSVer of
    
VER_PLATFORM_WIN32_NT:
    // Win NT, 2000, XP:
        {connection_name = the name of the connection in "Network and
        DialUp Connections", logon = logon string, password = password string.
        All are separated by spaces.}
        
ShellExecute(Handle, 'open', 'rasdial.exe', 'connection_name logon password', nil, SW_HIDE);
        // disconnect:
        // ShellExecute(Handle, 'open', 'rasdial.exe', ' /disconnect', nil, SW_HIDE);
    
VER_PLATFORM_WIN32_WINDOWS:
    // VERSION = 95, 98
       (*
      Dial Up Networking (DUN)

        module:
                RNAUI.DLL

      command:
                rundll32.exe rnaui.dll,RnaDial {name of connection to establish}
          result:
                displays the Connect To dialog for the passed connection
      *)

      
ShellExecute(Handle, PChar('open'), PChar('rundll32.exe'),
        PChar('rnaui.dll,RnaDial exact name of dialer entry TRACERT -h 1 -w 1'),nil, SW_NORMAL);
  end;
end;


 

Rate this tip:

poor
very good


Copyright © by SwissDelphiCenter.ch
All trademarks are the sole property of their respective owners