stop vent... Dette virker fandeme!!!
#include <windows.h>
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
cout << "MAC address is: ";
// Ask COM to create a UUID for us. If this machine has an Ethernet
// adapter, the last six bytes of the UUID (bytes 2-7 inclusive in
// the Data4 element) should be the MAC address of the local
// Ethernet adapter.
GUID uuid;
CoCreateGuid(&uuid);
// Spit the address out
char mac_addr[18];
sprintf(mac_addr,"%02X:%02X:%02X:%02X:%02X:%02X",
uuid.Data4[2],uuid.Data4[3],uuid.Data4[4],
uuid.Data4[5],uuid.Data4[6],uuid.Data4[7]);
cout << mac_addr << endl;
getch();
return 0;
}
Linket her som arne_v har postet:
http://bdn.borland.com/article/0,1410,26040,00.html
ligger sku en kode.
Jeg havde allerede været derinde før, men syntes ik jeg kunne få det til at virke....
Tak for hjælpen arne_v og jer andre...