Unsolved Release app with another mac address in Qt
-
Hello friends. I have a application that works with the system MAC address. If the Mac address is not the same, the application will not work. I want to release this application with another MAC address in my Qt. But I can not because it says the MAC address is not the same.
How do I solve this problem? -
@SeyMohsenFls if its your code you should be able to fix it? You didn't show any code we can work with.
-
bool check=false; foreach(QNetworkInterface netInterface, QNetworkInterface::allInterface) { if(!(netInterface.flag() & QNetworkInterface::IsLoopBack)) { if(netInterface.HardwareAddress()=="00:00:00:00:00:00") { check=true; break; } } if(check==true) { chart *w=new Chart(nullptr); w->show(); } else{ QMessageBox::warning(nullptr,"Error","Mac address error"); } }
-
@SeyMohsenFls said in Release app with another mac address in Qt:
If the Mac address is not the same
Same as what? Do you mean your app should only work if the MAC address has a specific value? So, it should only work on one specific machine? If so, you can use define at compile time: -DMAC="00:00:00:00:00:00" and then use MAC in your code.
-
Hi
Do you know the next MAC address the app should work on?If this is for app protection it won't be very solid.
Can you explain why you did this check ?