Hello,
I'm trying to get the mac address from a client which runs the c program. I have found the code which returns the MAC address on Unix but I want to do it on Windows. If anyone could help I'll thank him.
Thank you!
Hello,
I'm trying to get the mac address from a client which runs the c program. I have found the code which returns the MAC address on Unix but I want to do it on Windows. If anyone could help I'll thank him.
Thank you!
Code:// get a host's mac address BOOL GetMacAddr(SOCKADDR Host, PBYTE Mac) { ULONG smac = 6; // size of mac address // get mac address if (SendARP(((PSOCKADDR_IN) &Host)->sin_addr.S_un.S_addr,0, (PULONG)Mac,&smac) == NO_ERROR) return 1; return 0; }