DHCP Fix
This commit is contained in:
@@ -7,12 +7,13 @@ Public Class Class1
|
||||
Public sAppPath As String = Application.StartupPath
|
||||
'Public Shared DBConString As String = "Server=NBMIESENBECK\SPIELWIESE;Initial Catalog=Doku;User ID=sa;Password=verag#3;Connection Timeout=5;"
|
||||
Public Shared DBConString As String
|
||||
Public Shared DBConstringDev As String = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;"
|
||||
Public Shared DBADMINBuchhaltung As String = "Data Source=SQLGuide01.verag.ost.dmn;Initial Catalog=ADMIN;Integrated Security=false;User ID=sa;Password=BmWr501956;"
|
||||
Public Shared DBConstringDev As String = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Initial Catalog=Doku;User ID=AppUser;Password=yp/THDd?xM+pZ$;Connection Timeout=5;"
|
||||
Public Shared DBADMINBuchhaltung As String = "Data Source=SQLGuide01.verag.ost.dmn;Initial Catalog=ADMIN;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;"
|
||||
Public Shared DBAdmin As String = "[SQLGuide01.verag.ost.dmn].ADMIN"
|
||||
Public Shared DBDoku As String = "Server=SQLGuide01.verag.ost.dmn\Verag;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;"
|
||||
'Public Shared DBDoku As String = "Server=SQLGuide01.verag.ost.dmn\Verag;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;"
|
||||
Public Shared DBDoku As String = "Server=SQLGuide01.verag.ost.dmn\Verag;Initial Catalog=Doku;User ID=AppUser;Password=yp/THDd?xM+pZ$;Connection Timeout=5;"
|
||||
'Public Shared DBDoku As String = "Server=dokusql.verag.ost.dmn\sqlexpress;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;"
|
||||
Public Shared DBDokuTest As String = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;"
|
||||
Public Shared DBDokuTest As String = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Initial Catalog=Doku;User ID=AppUser;Password=yp/THDd?xM+pZ$;Connection Timeout=5;"
|
||||
'Public Shared FilePath As String = "\\192.168.0.253\backup\temp_Sebastian\Spielwiese\Doku"
|
||||
Public Shared FilePath As String ' = "\\192.168.0.90\f\EDV-Wartung\Dokumentation"
|
||||
Public Shared Absender As String = "Absender Standard"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Imports System.Net
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports Dhcp
|
||||
|
||||
|
||||
Public Class DHCP
|
||||
@@ -110,15 +111,29 @@ Public Class DHCP
|
||||
ReDim DHCP_Clients(Client_Array.NumElements - 1)
|
||||
|
||||
For i = 0 To Client_Array.NumElements - 1
|
||||
' pt = IntPtr.Zero '''keine Ahnung, nur ein Test, kann wieder weg
|
||||
pt = Marshal.ReadIntPtr(Client_Array.Clients, j)
|
||||
DHCP_Clients(i) = Marshal.PtrToStructure(pt, GetType(DHCP_CLIENT_INFO))
|
||||
'DHCP_Clients(i) = Marshal.PtrToStructure(pt, GetType(DHCP_CLIENT_INFO))
|
||||
pt = IntPtr.Zero
|
||||
j = j + 4
|
||||
'Form1.Label1.Text &= DHCP_Clients(i).ClientName & " - " & DHCP_Clients(i).ClientIpAddress & " - " & Scobe_C - ((DHCP_Clients(i).ClientIpAddress * -1) + d) & vbCrLf
|
||||
|
||||
Next i
|
||||
|
||||
' MsgBox("")
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Function DHCP1(dhcps As String)
|
||||
|
||||
Dim dhcpsrv As DhcpServer = DhcpServer.Connect(dhcps)
|
||||
Dim scope = dhcpsrv.Scopes.First()
|
||||
Dim activeClients = scope.Clients '.Where(Function(c) c.AddressState = DhcpServerClientAddressStates.Active)
|
||||
|
||||
Return activeClients
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Friend Shared Function StringIPAddressToUInt32(Address As String) As UInteger
|
||||
|
||||
Reference in New Issue
Block a user