Hi all,
I am trying to create a routine that will gather the list of dial-up connections. The only way that I think this can be done is through API calls. I found two functions in ADVAPI32.DLL that should do the trick, but I haven't been able to get them to work.
Here is my current code. If anyone can point out any problems or another way to do this, I would appreciate it.
DECLARE RegOpenKeyEx IN ADVAPI32.DLL INTEGER, STRING, INTEGER, ;
INTEGER nAccess, INTEGER @nKeyHandle
DECLARE RegEnumKeyEx IN ADVAPI32.DLL INTEGER nKeyHandle, ;
INTEGER iValue, STRING @lpszName, INTEGER @lpcchName, INTEGER, ;
STRING @lpszClass, STRING @lpcchClass, INTEGER @lpftLastWrite
nKeyHandle = 0
RegOpenKeyEx(2147483649,"RemoteAccess\Profile",0,8,@nKeyHandle)
iValue = 0
STORE SPACE(255) TO lpszName, lpszClass, lpcchClass
STORE 255 TO lpcchName, lpftLastWrite
RegEnumKeyEx(nKeyHandle,iValue,@lpszName,@lpcchName,0,@lpszClass,@lpcchClass,@lpftLastWrite)
Brien R. Givens
Brampwood Systems