/[cvs]/joko/ToolBox/Windows/VpnDial/src/InternetConnection.bas
ViewVC logotype

Contents of /joko/ToolBox/Windows/VpnDial/src/InternetConnection.bas

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Wed Sep 28 20:36:46 2005 UTC (18 years, 9 months ago) by joko
Branch: MAIN
CVS Tags: HEAD
+ initial commit

1 Attribute VB_Name = "InternetConnection"
2 Option Explicit
3
4 ' http://www.activevb.de/tipps/vb6tipps/tipp0049.html
5
6 Private Declare Function InternetDial Lib "wininet.dll" _
7 (ByVal hwndParent As Long, ByVal lpszConiID _
8 As String, ByVal dwFlags As Long, ByRef hCon _
9 As Long, ByVal dwReserved As Long) As Long
10
11 Private Declare Function InternetHangUp Lib "wininet.dll" _
12 (ByVal hCon As Long, ByVal dwReserved _
13 As Long) As Long
14
15 Const DIAL_UNATTENDED As Long = &H8000&
16 Const DIAL_FORCE_ONLINE As Long = 1&
17 Const DIAL_FORCE_UNATTENDED As Long = 2&
18
19
20 Public Function InternetConnect(conName As String)
21 Dim ConID As Long
22 InternetDial Form_Main.hWnd, conName, DIAL_FORCE_UNATTENDED, ConID, 0
23 InternetConnect = ConID
24 End Function
25
26 Public Function InternetDisconnect(ConID As Long)
27 If ConID Then InternetDisconnect = InternetHangUp(ConID, 0)
28 End Function
29
30

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed