May be that helps a little bit.
Please give a feedback if it works or not or if you can improve it.
I use the curl library directly. Not on the command line.
{$ifdef windows}
uses sockets , winsock2;
procedure adds2( var dw : dword ; p : pointer );
var
addr : pinaddr;
begin
addr := p;
if add
I don't know how much it will help, but windows has a similar command to
linux ifconfig, only on windows it's called ipconfig.
Hope this helps.
On 9/10/2021 3:03 AM, Bo Berglund via fpc-pascal wrote:
Is there a way to enumerate the active adapters on a Windows computer with their
IPv4 and MAC
On Fri, 10 Sep 2021 09:46:11 +0200, Sven Barth via fpc-pascal
wrote:
>You can use the ipconfig command and parse its output (especially ipconfig
>/all).
I also figured that to be the case, so I will run TProcess with Ipconfig /all
and then parse the result line by line.
It looks like there is a
Op 10-9-2021 om 09:46 schreef Sven Barth via fpc-pascal:
You can use the ipconfig command and parse its output (especially
ipconfig /all).
Afaik netsh has more info.
I have several tests for this in Delphi, but they use the iphlp headers
that FPC doesn't have yet (a point on my todo list).
On Fri, 10 Sep 2021, James Richters wrote:
Well, that sure is a lot simpler than parsing the IPConfig output!
Is there a way to capture the MAC address this way as well?
I don't know, I never needed that.
uses {$IFDEF MSWINDOWS}Windows, WinSock,{$ENDIF}
Should have a ; at the end instead
Well, that sure is a lot simpler than parsing the IPConfig output!
Is there a way to capture the MAC address this way as well?
uses {$IFDEF MSWINDOWS}Windows, WinSock,{$ENDIF}
Should have a ; at the end instead of a ,
uses {$IFDEF MSWINDOWS}Windows, WinSock;{$ENDIF}
James
>You can use the ipconfig command and parse its output (especially ipconfig
>/all).
Here’s how I use ipconfig and parse the output:
https://gist.github.com/Zaaphod/d1b7bf7a29aa653e3b0b61a836a03f62
James
___
fpc-pascal maillist - fpc-pascal@lists.fr
On Fri, 10 Sep 2021, Sven Barth via fpc-pascal wrote:
Bo Berglund via fpc-pascal schrieb am
Fr., 10. Sep. 2021, 09:41:
Is there a way to enumerate the active adapters on a Windows computer with
their
IPv4 and MAC addresses?
There is an API for that, but I don't remember that right now.
Bo Berglund via fpc-pascal schrieb am
Fr., 10. Sep. 2021, 09:41:
> Is there a way to enumerate the active adapters on a Windows computer with
> their
> IPv4 and MAC addresses?
>
There is an API for that, but I don't remember that right now.
> I am trying to convert a Linux reporting script to
Is there a way to enumerate the active adapters on a Windows computer with their
IPv4 and MAC addresses?
I am trying to convert a Linux reporting script to Windows, but I have a hard
time finding a suitable Windows command. The script uses common Linux commands
and tools to get the eth0 and wlan0
10 matches
Mail list logo