I am using the following code to get the MAC address:
IP_ADAPTER_INFO adpInfo[16];
DWORD len = sizeof(adpInfo);
GetAdaptersInfo(adpInfo, &len );
printf("%02x%02x%02x%02x%02x%02x", adpInfo[0].Address[0], adpInfo[0].Address[1], adpInfo[0].Address[2], adpInfo[0].Address[3], adpInfo[0].Address[4], adpInfo[0].Address[5]);
However, if the computer has many network adapters (for example: Ethernet and WiFi), then every time I call this code I get a different MAC address.
Is there a way to always get the same MAC address (for example: Ethernet).