Maybe WMI or using another technique, find out if a computer is LAN or dynamically (usually by DHCP) ? How?
Maybe WMI or using another technique, find out if a computer is LAN or dynamically (usually by DHCP) ? How?
We can always check the registry to see if the device is using DHCP or not:
Uses Registry;
var
Reg:TRegistry;
begin
Reg:=TRegistry.Create;
Reg.RootKey:=HKEY_LOCAL_MACHINE;
Reg.OpenKey('SYSTEM\ControlSet001\services\Tcpip\Parameters\Interfaces\{GUID da sua placa de rede}', False);
if Reg.ReadInteger('EnableDHCP') = 0 then
showmessage('Sem DHCP')
else
showmessage('Com DHCP');
Reg.CloseKey;
Reg.Free;
end;
So you have the status of the device through the registry.