[fpc-pascal] How to check if a network is available?

Jean SUZINEAU jean.suzineau at wanadoo.fr
Fri Jun 18 15:00:18 CEST 2021


May be you can get some information with the "route" command .

If you run "route print" in cmd command prompt, you can get information 
on the different networks available.

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/route_ws2008

(I couldn't find the doc for Windows 10, but "route print" works on 
Windows 10 Pro)

May be you can run the command "route print 0.0.0.0 " with TProcess and 
parse the output ?



More information about the fpc-pascal mailing list