怎么调用WINDOWS的拨号联接(50分)

  • 主题发起人 主题发起人 gmp1979
  • 开始时间 开始时间
G

gmp1979

Unregistered / Unconfirmed
GUEST, unregistred user!
怎么用DELPHI程序调用WINDOWS的拨号联接。
 
直接在dfw全文搜索中搜"拨号",至少有几十条......
 
找到后怎么操作?
 
DfW什么意思?
 
dfw=大富翁<br>全文搜索在你的贴子的最上面一行.
 
<br>winexec(pchar('rundll32.exe rnaui.dll,RnaDial 连接名程'),9);
 
Function DUNDialDefault(Hide : Boolean) : Boolean; <br>// Show or hide the dial-up dialog <br>var Reg : TRegistry; <br>var TempResult : Boolean; <br>var Name, con : String; <br>var ASW : Integer; <br>begin <br>Reg := TRegistry.Create; <br>Reg.RootKey := HKEY_CURRENT_USER; <br>if Reg.OpenKey('/RemoteAccess', False) then <br>&nbsp; begin <br>&nbsp; &nbsp; TempResult := True; <br>&nbsp; &nbsp; Name := Reg.ReadString('Default'); <br>&nbsp; end <br>else begin <br>tempresult := False; <br>end; <br>Reg.Free; <br>if TempResult = True then <br>&nbsp; begin <br>&nbsp; &nbsp; if Hide = True then ASW := SW_HIDE <br>&nbsp; &nbsp; else ASW := SW_SHOWDEFAULT; <br>&nbsp; &nbsp; con := 'rnaui.dll,RnaDial ' + Name; <br>&nbsp; &nbsp; ShellExecute(0, nil, 'rundll32.exe' , PChar <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (con), 'C:/windows/', ASW); <br>end; <br>Result := tempResult; <br>end;
 
后退
顶部