iam trying to write a C++ program for the MAC and IP addresses,,,but i need help on what exactly the program will do regarding those two addresses..if any body has a code which can help.
thanks
nse
-1
Newbie Poster
Recommended Answers
Jump to PostWell, this is heavily dependant on your OS and compiler.. this works in XP and MSVC .NET 03:
#include <windows.h> #include <Iphlpapi.h> #pragma comment ( lib, "Iphlpapi.lib" ) static void GetMACaddress(void) { IP_ADAPTER_INFO AdapterInfo[16]; // Allocate information // for up to 16 NICs DWORD dwBufLen = sizeof(AdapterInfo); …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.