| www.delorie.com/archives/browse.cgi | search |
| From: | Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Getting MAC address within C/C++-program |
| Date: | Sat, 31 Aug 2002 08:12:00 +0100 |
| Lines: | 23 |
| Message-ID: | <3D706C40.1C7B6085@phekda.freeserve.co.uk> |
| References: | <akktt3$1jlh9p$1 AT ID-79865 DOT news DOT dfncis DOT de> |
| NNTP-Posting-Host: | modem-43.uranium.dialup.pol.co.uk |
| Mime-Version: | 1.0 |
| X-Trace: | news7.svr.pol.co.uk 1030779930 12308 62.136.65.171 (31 Aug 2002 07:45:30 GMT) |
| NNTP-Posting-Date: | 31 Aug 2002 07:45:30 GMT |
| X-Complaints-To: | abuse AT theplanet DOT net |
| X-Mailer: | Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586) |
| X-Accept-Language: | de,fr |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Hello.
Alex Vinokur wrote:
> Is it possible to get MAC address within C/C++-program ?
On which operating system? There is no method that will work on DOS and all
versions of Windows.
You can use RegDos to read the registry on Windows '95, '98 and ME. Then you
can obtain the MAC address. See:
http://www.phekda.freeserve.co.uk/richdawe/dl/winnetip.htm
There are other methods, but they are for Windows programs. The Winsock
Programmer's FAQ details how.
You could write a small helper Windows program to return the MAC address. Then
your program would run the helper program, to get the MAC address.
HTH, bye,
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |