I've written code using the RasGetEntryDialParams() function. Here's
Microsoft's description of this function:
---begin description---
The RasGetEntryDialParams function retrieves the connection information
saved by the last successful call to the RasDial or
RasSetEntryDialParams function for a specified phone-book entry.
---end description---
Another function which is supposed to supersede this function is
RasGetCredentials(). Here's the description for this function:
---begin description---
The RasGetCredentials function retrieves the user credentials associated
with a specified RAS phone-book entry.
---end description---
In both cases the clear-text password is a field in the retrieved
record. No need to access the regitry, no need to use the LSA secrets
code. I think Microsoft thought they should provide such a feature for
purposes of automatic dialup connections - to avoid the need for user
input. This might sound a bit funny, but if the password isn't saved, a
human has to enter it manualy, but a program can just use one of the
aformentioned functions. Microsoft seemingly makes a distinction between
the privilages of a user and those of a program (i.e. programmer).
Noam Ben-Yochanan
noam@zsoft.com