[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 461
  • Last Modified:

Retrieving a MAC address

I can retrieve a MAC address in dos by typing "getmac" followed by the machine name?  Is there an windows API or MFC equivalent that will retrieve the machine address?
0
JHaack
Asked:
JHaack
1 Solution
 
mbhaktaCommented:
This is a win 95 code grabbed from the MSDN

mov  ah, 16h           ; Windows multiplex function
mov  al, 8Eh           ; VM Title
mov  di, seg VMTitle   ; see below
mov  es, di
mov  di, offset VMTitle
mov  cx, Size          ; see below
mov  dx, 3             ; Get Virtual Machine Title
int  2Fh
cmp  ax, 1
je   success


0
 
JHaackAuthor Commented:
I am not looking for the machine title.  I am looking for the MAC address, given the machine title.  In MSDOS, the MAC is retrieved with the getmac command followed by the machine title.  How is this done in C++/MFC?
0
 
vinniewCommented:
You might check out the ARP cache.  You would access it using SMTP protocols.

V

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
JHaackAuthor Commented:
Let me elaborate.  I am looking for a function which will retrieve a unique identification number for a specific computer.  I want to use the unique identification number to create an application which will execute only on my machine.  Is there a simple API or MFC call which will retrieve such information?
0
 
jabaCommented:
Get source of program recivigd MAC address from my ftp
ftp://194.87.205.60/macaddr
You cant use www browser for it, because my ftp not allowed for anonymous
Use login:jaba password:goout

0
 
JHaackAuthor Commented:
The effort is worth 100 points.  However, I don't have the netbios header file, so I can't compile it.  I'll give you 100 points now.  I'll give you another 100 if we can get it to work properly.  For now, we simply need "netbios.h".
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now