Link to home
Start Free TrialLog in
Avatar of david76
david76

asked on

How can i create/edit DUN Entrys ?

How can i change the connection information (phonenumber, dns server, device etc.) for an entry in the phone book or create a new phone-book entry using delphi 5 ?
I know I can call the RAS API function CreateEntry, but that just pops up a dialog for the user to enter the details.  I also know that the entries are stored in the registry, but can anyone decode the information as it is all binary data.
The function should run under win 95 (osr 1 and 2), win 98 and win nt. rassetentryproperties does not work with win 95/98 & delphi (dont know why)
Avatar of rwilson032697
rwilson032697

Listening
Avatar of david76

ASKER

Edited text of question.

Use RasGetEntryProperties( ) to get the phonebook entry data, and use RasSetEntryProperties( ) so set them ...

But early releases of Windows 95 (prior to Windows 95 OSR2) require an additional DLL that contains these phonebook manipulation functions: RNAPH.DLL!

This DLL is included in IE 4.01 and higher and dial-up network MSDUN 1.2b and higher.

So there are two DLLs you have to lookup for your RAS functions: First RASAPI.DLL and then RNAPH.DLL if necessary. I recommend to bind the RASAPI.DLL dynamically via LoadLibrary first and try to get the address of the desired function via GetProcAddress. If your program can't find the function this way, bind the RNAPH.DLL dynamically and try to find the function there.

For some information look at these web pages:
<ul>
<li>http://support.microsoft.com/support/kb/articles/Q157/7/65.asp
<li>http://support.microsoft.com/support/kb/articles/Q183/3/67.ASP
</ul>


Avatar of david76

ASKER

i get always error 'invalid parameter'
ASKER CERTIFIED SOLUTION
Avatar of brain2000
brain2000

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial