I'm trying to get the following code to work with dev c++. I'm using version
4.9.9.2
Any thoughts ?
static void GetMACaddress(void)
{
IP_ADAPTER_INFO AdapterInfo[16]; // Allocate information
// for up to 16 NICs
DWORD dwBufLen = sizeof(AdapterInfo); // Save memory size of buffer
DWORD dwStatus = GetAdaptersInfo( // Call GetAdapterInfo
AdapterInfo, // [out] buffer to receive data
&dwBufLen); // [in] size of receive data buffer
assert(dwStatus == ERROR_SUCCESS); // Verify return value is
// valid, no buffer overflow
PIP_ADAPTER_INFO pAdapterInfo = AdapterInfo; // Contains pointer to
// current adapter info
do {
PrintMACaddress(pAdapterInfo->Address); // Print MAC address
pAdapterInfo = pAdapterInfo->Next; // Progress through
// linked list
}
while(pAdapterInfo); // Terminate if last adapter
}
My objective is to get the macaddress or hardware ID so allow me to create
some sort of passcode requirement for this software. Any help would be greatly
appreciated.
If there is some other well established free method of doing this , I would be
pleased to hear.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
I'm trying to get the following code to work with dev c++. I'm using version
4.9.9.2
Any thoughts ?
My objective is to get the macaddress or hardware ID so allow me to create
some sort of passcode requirement for this software. Any help would be greatly
appreciated.
If there is some other well established free method of doing this , I would be
pleased to hear.
Giver us a clue! In what way does it not work? Fail to compile? Fail to run as
you expect? What did you expect? Post the compile log text (all of it).