Parent Directory
|
Revision Log
+ initial commit
| 1 | joko | 1.1 | Attribute VB_Name = "Module_Main" |
| 2 | Option Explicit | ||
| 3 | |||
| 4 | ' see: How To Obtain the IP Address Assigned to a RAS Client | ||
| 5 | ' http://support.microsoft.com/default.aspx?scid=kb;en-us;160622 | ||
| 6 | |||
| 7 | ' see: RasGetProjectionInfo | ||
| 8 | ' http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcecomm5/html/wce50lrfRasGetProjectionInfo.asp | ||
| 9 | |||
| 10 | ' http://home.iprimus.com.au/billmcc/PlatformVB/dun/rasenumentries.htm | ||
| 11 | ' http://home.iprimus.com.au/billmcc/PlatformVB/dun/raserrorhandler.htm | ||
| 12 | ' http://www.mentalis.org/apilist/RasEnumEntries.shtml | ||
| 13 | |||
| 14 | ' http://www.activevb.de/tipps/tipkat/kat1.html | ||
| 15 | ' http://www.activevb.de/rubriken/apikatalog/deklarationen/rasenumentries.html | ||
| 16 | ' http://www.dotnet247.com/247reference/msgs/18/93960.aspx | ||
| 17 | |||
| 18 | Public RasEntries As New Collection | ||
| 19 | |||
| 20 | Sub Main() | ||
| 21 | |||
| 22 | Dim cmdline As New CommandLine | ||
| 23 | Dim conName As String | ||
| 24 | |||
| 25 | ReadRasEntries | ||
| 26 | cmdline.parse | ||
| 27 | |||
| 28 | If cmdline.hasSwitch("gui") Then | ||
| 29 | Form_Main.Show | ||
| 30 | Else | ||
| 31 | conName = cmdline.getArgument(conName) | ||
| 32 | MsgBox conName | ||
| 33 | End If | ||
| 34 | |||
| 35 | End Sub | ||
| 36 | |||
| 37 | Private Sub ReadRasEntries() | ||
| 38 | |||
| 39 | Dim myEntries() As VBRasEntryName | ||
| 40 | Dim lngCount As Long | ||
| 41 | Dim rasItem As RasEntryData | ||
| 42 | |||
| 43 | lngCount = VBRasGetAllEntries(myEntries) | ||
| 44 | |||
| 45 | 'MsgBox lngCount | ||
| 46 | Dim i As Integer | ||
| 47 | Dim curEntry As VBRasEntryName | ||
| 48 | For i = 0 To lngCount - 1 | ||
| 49 | curEntry = myEntries(i) | ||
| 50 | |||
| 51 | Set rasItem = New RasEntryData | ||
| 52 | rasItem.entryname = curEntry.entryname | ||
| 53 | rasItem.PhonebookPath = curEntry.PhonebookPath | ||
| 54 | rasItem.Win2000_SystemPhonebook = curEntry.Win2000_SystemPhonebook | ||
| 55 | |||
| 56 | RasEntries.add rasItem, rasItem.entryname | ||
| 57 | Next i | ||
| 58 | |||
| 59 | End Sub |
| MailToCvsAdmin">MailToCvsAdmin | ViewVC Help |
| Powered by ViewVC 1.1.26 |