MAC-ID

MAC-ID

Hi,

I have to read the Mac-ID of the network interface card. One solution is "ipconfig /all >a.txt" and then read the number from "a.txt". My question is, if there is a more elegant solution to get the mac-id number.

Yours sincerely
Frank

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

See this article.

James

Hi James,

thank you for the information. I want to translate the code from C to CVF. I found the NCB structure in dfwinty.f90 (T_NCB). My problem is, how should I call the 'Netbios' function. I found this function only in the library 'netapi32.lib' and this is a library with C-functions. Have anywhere a example, where I can see how I have to call the Netbios function from CVF?

Thanks Frank

Add the following code to your header:

INTERFACE
   INTEGER(1) FUNCTION Netbios(NCB)
   !DEC$ATTRIBUTES STDCALL, ALIAS: "_Netbios@4":: Netbios
   USE DFWINTY, ONLY: T_NCB
   !DEC$ATTRIBUTES REFERENCE:: NCB
   TYPE(T_NCB):: NCB
   END FUNCTION
END INTERFACE

...and, of course, specify netapi32.lib in project settings.

Most of libs in VC98/Lib are not "C-function libraries", but import libraries for system dlls, accessible from both VC++ and CVF. The problem is that all C headers are not translated to Fortran (DFWIN & friends) by Compaq, so, from time to time, you have to roll your own.

Jugoslav

Jugoslav
www.xeffort.com

Leave a Comment

Please sign in to add a comment. Not a member? Join today