Ah that did it! I tried with quotes, but never thought to add the L. It's working now, but one more question.
I've been testing it all out, but when I went to my dashboard and deactivated the product key I used, TurboActivate still says it's activated. Does it take time to update or something?
Here is my code:
int main(int argc, char *argv[]){ QApplication a(argc, argv); MainWindow w;
GENUINE_OPTIONS opts; opts.nLength = sizeof(GENUINE_OPTIONS); opts.nDaysBetweenChecks = 30; opts.nGraceDaysOnInetErr = 1;
opts.flags = TA_SKIP_OFFLINE;
HRESULT hr = IsGenuineEx(L"######################", &opts);
if (hr == TA_OK || hr == TA_E_FEATURES_CHANGED || hr == TA_E_INET || hr == TA_E_INET_DELAYED) { // your app is activated and genuine
w.show(); return a.exec();
if (hr == TA_E_INET || hr == TA_E_INET_DELAYED) { // TODO: show a warning to your user that this time (or recently) // the IsGenuineEx() failed to connect to the LimeLM servers. }
return a.exec(); } else { QProcess a2; a2.start("TurboActivate.exe"); a2.waitForFinished(-1); a2.close(); // TODO: Not genuine or not activated. Either way you should either // restrict the user from using your app or give the user a trial // of your app. }}