IsGenuineEx() returning TA_E_INVALID_FLAGS

PDetsFromPath("./TurboActivate.dat"); GENUINE_OPTIONS opts; opts.nLength = sizeof(GENUINE_OPTIONS); opts.nDaysBetweenChecks = 90; opts.nGraceDaysOnInetErr = 14; std::string s = "2b54a2cc51faca58d7c0xx.xxxxxxxx"; HRESULT hr = IsGenuineEx(s.c_str(), &opts);

You're getting that because you didn't set the flags. (C/C++ don't initialize memory to "0" -- there's just random memory sitting in there).

GENUINE_OPTIONS opts;opts.nLength = sizeof(GENUINE_OPTIONS);opts.nDaysBetweenChecks = 90;opts.nGraceDaysOnInetErr = 14;opts.flags = 0;

Okay thanks. That was the first issue I'm having with mac activation.The next is that when I pass a activation string to:HRESULT hr = CheckAndSavePKey(utf8EncodedCString, TA_SYSTEM);returns TA_E_PERMISSION (HR=15)andHRESULT hr = CheckAndSavePKey(utf8EncodedCString, TA_USER);returns 0

In both cases above this followshr = IsGenuineEx(s.c_str(), &opts);and returns TA_E_ACTIVATE

HRESULT hr = CheckAndSavePKey(utf8EncodedCString, TA_USER);returns 0

0 = TA_OK = a success

In both cases above this followshr = IsGenuineEx(s.c_str(), &opts);and returns TA_E_ACTIVATE

Did you activate? Did you call the Activate() function after CheckAndSavePKey()? If so, what did it return?

I guess I misread the instructions, and wasn't calling it. So now it seems to work...thanks. So regarding, the case where IsGenuineEx() returns (hr == TA_E_INET || hr == TA_E_INET_DELAYED)...What to do here? When my app is not activated I put up a dialog to enter a key and then validate, and if it is the wrong key I exit the application. However, when the app launches, if I don't do exit per the case above, and the user simply disconnects from the Internet then the app won't exit. The result is that the user can then run my app. Correct me if I'm wrong.I don't want my user running my app for any amount of time if it hasn't been activated, and it seems like when the Internet connection is not established I must also exit, right?

So per what I wrote above, upon further reading it seems that if the Product were previously activated then it would be okay for them to run the app, for a time if not connected to the Internet (caveat: they could continue to use the app this way if its key had been revoked for some reason). If the product were not previously activated then a lack of an Internet connection would not allow them to run it, because it would not have been activated.Sound about right?

Non-activated users will never get TA_E_INET nor TA_E_INET_DELAYED. Why? Because they're not activated. So, as we describe in TurboActivate.h, just treat those "errors" as warnings. The customer is still activated for now, but they'll need to connect to the internet eventually.