-
How to get Mac address of a Windows machine?
Folks,
I have IP address of a Windows (95/98/NT/2K) machine. How do I get mac address
of the same machine. Any method is OK. Please, throw all the methods you
know
from your experience.
Hoping for an early response,
Lokesh
-
Re: How to get Mac address of a Windows machine?
"Lokesh" <klokesh@mailexcite.com> wrote:
>
>Folks,
>I have IP address of a Windows (95/98/NT/2K) machine. How do I get mac address
>of the same machine. Any method is OK. Please, throw all the methods you
>know
>from your experience.
>
>Hoping for an early response,
>Lokesh
Checkout article Q118623 (via MSDN etc)
-
Re: How to get Mac address of a Windows machine?
Hello
I have a method ..this will give u the host name when u supply the ip address.
eg suppoxe u give xxx.xx.x.xxx u get www.xxx.com
Use the code given below ... i have not enclosed error correction u can use
that ....
WORD wVersionRequested;
WSADATA wsaData;
wVersionRequested = MAKEWORD( 2, 2 );
WSAStartup( wVersionRequested, &wsaData );
long ad = inet_addr("xxx.xx.x.xxx" /*here u insert the ip add*/);
HOSTENT * host = gethostbyaddr((const char*)&ad , 4 , AF_INET );
cout << host->h_name << endl; // will give u the host name
I hope this works ..thanks
nilabja
-
Re: How to get Mac address of a Windows machine?
Hello
I have a method ..this will give u the host name when u supply the ip address.
eg suppoxe u give xxx.xx.x.xxx u get www.xxx.com
Use the code given below ... i have not enclosed error correction u can use
that ....
WORD wVersionRequested;
WSADATA wsaData;
wVersionRequested = MAKEWORD( 2, 2 );
WSAStartup( wVersionRequested, &wsaData );
long ad = inet_addr("xxx.xx.x.xxx" /*here u insert the ip add*/);
HOSTENT * host = gethostbyaddr((const char*)&ad , 4 , AF_INET );
cout << host->h_name << endl; // will give u the host name
WSACleanup();
I hope this works ..thanks
nilabja
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks