简体   繁体   中英

Retrieve the mac address of a remote pc Qt C++

I just want to know how to get the mac address of a remote computer.

void LocateAddress()
{
    QString host = "192.168.1.1";

    .....function for getting the mac address....

}

Is there a way to create a function that retrieves the Mac Address of a remote pc??? Using ng Windows OS

Using arp -a 192.168.1.1 on the command line you can get that information if you just need it once.

If you want to do it programmatically, there is a SendARP function in the windows API, documented here

Note that this only works on your local network, there must be no routers between you and the target computer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM