PDA

Click to See Complete Forum and Search --> : VB RAS? - Getting DUN Names!


mcmoo
Jan 30th, 2002, 06:11 AM
I posted this in the networking forum.. but:

http://www.vbforums.com/showthread.php?s=&threadid=138896

ta.

darrenl
Jan 30th, 2002, 11:11 AM
This site is very usefull in explaing the RAS API.

http://www.totalenviro.com/PlatformVB

Hope this helps.

mcmoo
Jan 31st, 2002, 04:02 AM
Hi,

thanks for replying, I've got the helpfiule from the site, but the file says use Enum[..] to get the connection names.. however in the enum part, it will only return the number of phonebook entries..

darrenl
Jan 31st, 2002, 04:59 AM
If you look at the first eample in :-

Dial-up Networking\Working with phonebook entries\Enumerating existing entries The example is in yellow. Paste this code into a module. Then from a command button or something insert this code.

Dim myRasEntry() As VBRasEntryName
Dim ret As Long
Dim l As Long

ret = VBRasGetAllEntries(myRasEntry)

For l = LBound(myRasEntry) To UBound(myRasEntry)
Debug.Print myRasEntry(l).entryname
Next


The return value is the count of entries, but the array you passed is now filled with the name of each entry.

Happy coding.

mcmoo
Jan 31st, 2002, 07:06 AM
aah

thanks, I was too hasty to look properly into it!

mcmoo
Feb 2nd, 2002, 07:37 AM
darrenl,

I've done what I wanted, but in order for me to replicate the WHOLE DUN settings, I can't write the user/pass to the new dun I've just created.. read thru that help file and the set dial params function doens't have an "entryname" to pass to..

any ideas? :)