Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Public Function GetIPAddresses(Optional blnFilterLocalhost As Boolean = False) As String
Dim Ret As Long, Tel As Long
Dim bytBuffer() As Byte
Dim IPTableRow As IPINFO
Dim lngCount As Long
Dim lngBufferRequired As Long
Dim lngStructSize As Long
Dim lngNumIPAddresses As Long
Dim strIPAddress As String
Dim tmpStr As String
On Error GoTo ErrorHandler:
Call GetIpAddrTable(ByVal 0&, lngBufferRequired, 1)
If lngBufferRequired > 0 Then
ReDim bytBuffer(0 To lngBufferRequired - 1) As Byte
If GetIpAddrTable(bytBuffer(0), lngBufferRequired, 1) = 0 Then
'We've successfully obtained the IP Address details...
'How big is each structure row?...
lngStructSize = LenB(IPTableRow)
'First 4 bytes is a long indicating the number of entries in the table
CopyMemory lngNumIPAddresses, bytBuffer(0), 4
While lngCount < lngNumIPAddresses
'bytBuffer contains the IPINFO structures (after initial 4 byte long)
CopyMemory IPTableRow, bytBuffer(4 + (lngCount * lngStructSize)), lngStructSize
strIPAddress = ConvertIPAddressToString(IPTableRow.dwAddr)
If Not ((strIPAddress = "127.0.0.1") And blnFilterLocalhost) Then
'Replace this with whatever you want to do with the IP Address...
If Not tmpStr = "" Then tmpStr = tmpStr & ";"
tmpStr = tmpStr & strIPAddress
End If
lngCount = lngCount + 1
Wend
End If
End If
GetIPAddresses = tmpStr
Exit Function
ErrorHandler:
MsgBox "An error has occured in GetIPAddresses():" & vbCrLf & vbCrLf & Err.Description & " (" & CStr(Err.Number) & ")"
End Function
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.