Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than wininet, prefix the name with the module name and a period.
InternetGetConnectedState (wininet)
.
C# Signature:
[DllImport("wininet.dll", SetLastError=true)]
extern static bool InternetGetConnectedState(
out InternetGetConnectedStateFlags Description, int ReservedValue);
VB Signature:
Private Declare Function InternetGetConnectedState Lib "wininet.dll" _
(ByRef lpdwFlags As Int32, ByVal dwReserved As Int32) As Boolean
Function Get_InternetConnectedState(ByRef p_lngFlags As Long, Optional ByRef p_return_str As String = "") As Boolean
Dim lngFlags As Long
lngFlags = 0
Get_InternetConnectedState = False
If InternetGetConnectedState(lngFlags, 0) Then
'connected.
If lngFlags And ConnectionStates.LAN Then
'LAN connection.
p_return_str = "LAN connection."
ElseIf lngFlags And ConnectionStates.Modem Then
'Modem connection.
p_return_str = "Modem connection."
ElseIf lngFlags And ConnectionStates.Proxy Then
'Proxy connection.
p_return_str = "Proxy connection."
End If
Get_InternetConnectedState = True
Else
'not connected.
p_return_str = "Not connected."
Get_InternetConnectedState = False
End If
ByRef is a VB keyword that specifies a variable to be passed as a parameter BY REFERENCE. In other words, the pointer to the variable is passed and any change to its value made within the function or sub will change its value outside the function/sub.
4/25/2007 3:19:29 AM - anonymous
ByRef is a VB keyword that specifies a variable to be passed as a parameter BY REFERENCE. In other words, the pointer to the variable is passed and any change to its value made within the function or sub will change its value outside the function/sub.
4/25/2007 3:19:29 AM - anonymous
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).