Silverfrost Forums

Welcome to our forums

Getting the hardware MAC address and IP address from Fortran

10 Jan 2007 4:38 #1504

Is there a way of getting the hardware (eg ethernet card_ MAC address and IP address from within a Fortran program without calling ipconfig ?

I can do it via call system('ipconfig /all >ip.txt') but this flashes up a DOS box because of the call to ipconfig.

I would like to use a Win API call to get this in a completely 'silent' way

11 Jan 2007 1:18 #1510

The way to do this via the Win32 API is to use GetAdaptersInfo. You may find it easier (maybe even neccessary) to use C for the task. Info about the routine can be found at:

http://msdn2.microsoft.com/en-us/library/aa366062.aspx

Please login to reply.