On Fri, 18 Jun 2021 15:00:18 +0200, Jean SUZINEAU via fpc-pascal <fpc-pascal@lists.freepascal.org> wrote:
>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 ? > On command line (grep is available from a delphi): C:\>route print | grep 10.117 File STDIN: 10.117.3.0 255.255.255.0 On-link 10.117.3.2 281 10.117.3.2 255.255.255.255 On-link 10.117.3.2 281 10.117.3.255 255.255.255.255 On-link 10.117.3.2 281 224.0.0.0 240.0.0.0 On-link 10.117.3.2 281 255.255.255.255 255.255.255.255 On-link 10.117.3.2 281 If I know beforehand which will be the IP address of the VPN network I could use this... -- Bo Berglund Developer in Sweden _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal