Mail Archives: cygwin/1999/01/06/06:59:54
> -----Message d'origine-----
> De: Ian Collins [SMTP:ianc AT kiwiplan DOT co DOT nz]
> Date: Wednesday, January 06, 1999 04:08
> À: Gnu-Win32 (E-mail)
> Objet: uname and machine identity
>
> I need to get a unique system identity from an application running on
> b20.1.
> On other Unixes, I use,
>
> typedef struct utsname UTS
>
> UTS uts;
>
> uname(uts)
>
> and the unique machine identity is found in uts.machine (on AIX), or
> uts.idnumber (on HPUX), etc.
>
> Does anyone know how to get such information on B20.1, as the output
> of
> uname is very limited.
>
> Regards,
> Ian Collins.
>
I had the same problem (although under mingw32), but on Losedows there's
no such unique machine identifier (blame IBM for their carazy, minimal,
PC hardware design...). I resort to using the ethernet address (not the
IP one that may change too often but the 48-bit hardware address) then
hash-it to reduce it to 32 bits. I don't remember how to read it but you
should find this in VC++ doc. If you can't find it I can send a small
code snipped (but I'll have to search in my code and I'm quite busy...)
I use the ethernet address based on the assumption that (for the users
of my real-time object-oriented development tools and kernel) tehere
will always be one on the system (quite a safe bet as I need NT-4).
Hope this helps,
Bernard
------------------------------------------------------------------------
------
Bernard Dautrevaux
Microprocess Ingéniérie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel: +33 (0) 1 47 68 80 80
Fax: +33 (0) 1 47 88 97 85
e-mail: dautrevaux AT microprocess DOT com
b DOT dautrevaux AT usa DOT net
------------------------------------------------------------------------
------
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -