Geldao sam taj link pre nego sto sam otvorio temu!!
Pokusao sam da prevedem kod sa Dev C++ 5 i sa C++ Bulider 6 i nisam uspeo!!
Code:
#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;
}
Greska: Undefined Reference to CoCreateGuid !! - Dev C++
C++ Bulider 6
[Linker Error] Unresolved external '__InitVCL' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\CP32MTI.LIB|crtlvcl
[Linker Error] Unresolved external '__ExitVCL' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\CP32MTI.LIB|crtlvcl
Takodje i druga dva primera ne funkcionisu !!