General information
Category:
Windows API functions
>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,
I am by far not one that can do this reading the registry, I'm just telling you what I know. I have both Mabry and Catalyst ActiveX controls. Using Mabry's Ras control - phone entries can be obtained using the included properties. The catch all - is that for NT - you need to get the entries from the .pbk file. By default this file is located in the \winNT\system32\Ras\rasphone.pbk. (You can have more than one .pbk file - but that is the default.)
I know that doesn't help what you are attempting to do, but it may be helpful.
(IF you purchase the RAS control from Mabry - I Do have some code that can help)
Robert
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only