TurboActivate: isGenuine() returns success, isGenuineEx() returns code 16

Hi, I've run into an issue with TurboActivate. When using hr = IsGenuine(TA_GUID); everything works properly (checked on multiple systems).

However, when using hr = IsGenuineEx( TA_GUID, &opts ); I get error code 16 (TA_E_INVALID_FLAGS).

I've checked over my code multiple times and I only ever use the TA_USER flag, and I'm not sure why IsGenuineEx() would return this error while IsGenuine() wouldn't.

Here is the relevant code (pretty much the example code):

================CHECK ACTIVATION:================

HRESULT hr;GENUINE_OPTIONS opts;opts.nLength = sizeof(GENUINE_OPTIONS);

opts.nDaysBetweenChecks = 90;opts.nGraceDaysOnInetErr = 14;

hr = IsGenuineEx( TA_GUID, &opts );

if (hr == TA_OK || hr == TA_E_FEATURES_CHANGED || hr == TA_E_INET || hr == TA_E_INET_DELAYED){....// MAKE IT WORK

....if (hr == TA_E_INET || hr == TA_E_INET_DELAYED)........cout << "Activated but failed to connect << endl;}else // not activated or genuine{....uint32_t trialDays = 0;....hr = UseTrial(TA_USER);

....if (hr == TA_OK)....{........// Get the number of trial days remaining.........hr = TrialDaysRemaining(TA_GUID, &trialDays);

........if (hr == TA_OK)........{............cout << "Trial days remaining: " << trialDays << endl;............// MAKE IT WORK........}........else............cout << "Failed to get the trial days remaining: hr = " << hr << endl;....}....else........//call ACTIVATION here

==========ACTIVATION:==========

HRESULT hr;

hr = CheckAndSavePKey(bKey.asWChar(), TA_USER);cout << hr << endl;

if (hr == TA_OK){....cout << "Product key saved successfully." << endl;

....// try to activate....hr = Activate();

....if (hr == TA_OK)........cout << "Activated successfully" << endl; ....else........cout << "Activation failed: hr = " << hr << endl;}else....cout << "Product key failed to save: hr = " << hr << endl;

Does anyone have insight into this issue and how I might solve it? Thanks in advance!

From TurboActivate.h, you can see that 16 decimal (0x10 in hex) is :

/* MessageId: TA_E_INVALID_FLAGS Message code (in Hex): 0x10 Message code (in Decimal): 16

MessageText:

The flags you passed to TA_CheckAndSavePKey(...) or TA_UseTrial(...) were invalid (or missing). Flags like "TA_SYSTEM" and "TA_USER" are mutually exclusive -- you can only use one or the other.*/#define TA_E_INVALID_FLAGS ((HRESULT)0x00000010L)

Because you're passing invalid flags. So, set the "flags" property of the "GENUINE_OPTIONS opts" variable.

'doh, worked like a charm. Thanks!