Mega Code Archive

 
Categories / Delphi / LAN Web TCP
 

How to get all the Dial up connections

Title: How to get all the Dial-up connections. Question: How do I pull the names of all the Dial-Up Networking (DUN) connections from the registry. Answer: You can use the following function to retrieve all of the DUN connections from the registry. Uses Registry; Function DUNGetConnections( Out OutList : TStringList) : Boolean; var Reg : TRegistry; begin OutList.Clear; Reg := TRegistry.Create; Reg.RootKey := HKEY_CURRENT_USER; if Reg.OpenKey('\RemoteAccess\Profile', False) then begin Reg.GetKeyNames(OutList); Result := True; end else begin Result := False; end; Reg.Free; end;