-
I am trying to add each of the existing Dial-Up Networking connections to a list box for display on a form. I have tried to use the RegEnumValues API call, but it seems that it can't display properly because the values are stored in a binary key. Can anyone help me out on this?
I have found 2 other posts on this forum regarding this, but in each case, the code to do what I need was emailed to the person looking for help rather than posted on here.
Can anyone help me out?
I appreciate it!!!!
Dan
-
why dont u ask for the code to be emailed to you, and then you post it up here, as i wanted to know how to do that a while ago, couldnt, and left it
-
The DUN connnections are in HKEY_CURRENT_USER\RemoteAccess\Addresses. Each connection has it's own Name. Why don't you just use some code that retreives all values under a certain key? I saw some code on here that does just that. Then simply modify the code so that it loops through adding each retrieved connection to a list/combo box.
-
I found them in HKEY_CURRENT_USER\RemoteAccess\Addresses\ but when I try to read the value names using the RegEnumValues API call, I get an error #234 (which I believe to be "More Data is Available"). I'm not sure what this means.
I have been able to successfully pull ODBC Data Sources from HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\ODBC Data Sources\ using the same API call. The only difference I can see is that the ODBC DSNs are REG_SZ registry entries (strings) whereas the DUN Connections are REG_BINARY (or hex) entries. I think this is causing my problem, but I'm not certain.
If I can get the values from the registry, putting them into a list box is no big deal. Problem is, I can't get that far.
Does anyone have code that will do this that I can try?
HELP!!!