I don't know Delphi, but this code will enable or disable network adapters.
#include <GUIConstants.au3>
Dim $i, $base, $key, $name
; == GUI generated with Koda ==
$Form1 = GUICreate("Nic", 176, 89, -1, -1, -1, $WS_EX_TOOLWINDOW)
GUICtrlCreateLabel("Pick Network Connection", 8, 8, 157, 17, $SS_CENTER)
$Combo1 = GUICtrlCreateCombo("", 8, 24, 161, 21)
$Button1 = GUICtrlCreateButton("Enable", 8, 56, 75, 25)
$Button2 = GUICtrlCreateButton("Disable", 96, 56, 75, 25)
;Get Network Connection Names
$base = "HKLM\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}"
While 1
$i += 1
$key = RegEnumKey($base, $i)
If @error <> 0 Then ExitLoop
$name = RegRead($base & "\" & $key & "\Connection", "Name")
If StringLeft($key, 1) = "{" Then GUICtrlSetData($Combo1, $name & "|")
WEnd
GUISetState(@SW_SHOW)
While 1
$msg = GuiGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $Button1
If GUICtrlRead($Combo1) <> '' Then NicToggle(1, GUICtrlRead($Combo1))
Case $Button2
If GUICtrlRead($Combo1) <> '' Then NicToggle(0, GUICtrlRead($Combo1))
Case Else
;;;;;;;
EndSwitch
WEnd
Exit
Func NicToggle($Toggle, $sConnectionName = "Local Area Connection", $sNetworkFolder = "Network Connections")
$ssfCONTROLS = 3
$sEnableVerb = "En&able"
$sDisableVerb = "Disa&ble"
$shellApp = ObjCreate("shell.application")
$oControlPanel = $shellApp.Namespace ($ssfCONTROLS)
$oNetConnections = "nothing"
For $folderitem In $oControlPanel.items
If $folderitem.name = $sNetworkFolder Then
$oNetConnections = $folderitem.getfolder
ExitLoop
EndIf
Next
If $oNetConnections = "nothing" Then
MsgBox(48, "Error", "Couldn't find " & $sNetworkFolder & " folder")
Exit
EndIf
$oLanConnection = "nothing"
For $folderitem In $oNetConnections.items
If StringLower($folderitem.name) = StringLower($sConnectionName) Then
$oLanConnection = $folderitem
ExitLoop
EndIf
Next
If $oLanConnection = "nothing" Then
MsgBox(48, "Error", "Couldn't find '" & $sConnectionName & "' item")
Exit
EndIf
$bEnabled = True
$oEnableVerb = "nothing"
$oDisableVerb = "nothing"
$s = "Verbs: " & @CRLF
For $verb In $oLanConnection.verbs
$s = $s & @CRLF & $verb.name
;enables
If $verb.name = $sEnableVerb And $Toggle = 1 Then
$oEnableVerb = $verb
$oEnableVerb.DoIt
ExitLoop
;disables
ElseIf $verb.name = $sDisableVerb And $Toggle = 0 Then
$oDisableVerb = $verb
$oDisableVerb.DoIt
ExitLoop
Else
MsgBox(48, "Error", "Tried to disable when already disabled" & @CRLF & "or enable when already enabled")
Exit
EndIf
Next
Sleep(1000)
EndFunc ;==>NicToggle