TA_Activate() and TA_E_PKEYAnswered

Hello,

Recently after one of the Windows 10 updates I got some problems with licence, it stopped working. It couldn't pass TA_CheckAndSavePKey(), always returning TA_FAIL.

I've found solution here: https://wyday.com/forum/t/2756/you-must-enter-a-valid-product-key/

After [… removing implementation detail folders], TA_CheckAndSavePKey() finally returns TA_OK, but now TA_Activate() returns TA_E_PKEY (code 2) on a valid key.

I'm not sure what's the reason and what was the problem with folders listed above.

, edited

Don’t mess with implementation details you’ll get off behavior.

Use the latest version.

I've solved problem but the reason is kind of weird.

I use newest TurboActivate version (4.4.2.2). Everything worked fine for a long time, but after recent Windows 10 auto update (I don't remember the date) it stopped working. As I said, TA_CheckAndSavePKey() returned TA_FAIL no matter what. Removing [… implementation detail folders] fixed the problem (inside those folders there were some modified files), but then TA_Activate() returned TA_E_PKEY all the time. 

It was working on some computers, but some customers reported error related to  TA_CheckAndSavePKey() problem. 

To make it work I have to allow the key to be activated on virtual machines. The weird part is I don't work on VM and TA_Activate() return TA_E_PKEY, not TA_E_IN_VM (code 17), so solution was mainly a lucky guess.

, edited

I still need help with this problem. One of the customers reported problem I described: first he has problem with TA_CheckAndSavePKey() (TA_FAIL), then he removed folders from solution linked above and now he has error code 2 on TA_Activate().

Product key he uses is OK, they also unlocked ports (80, 443) and I changed settings of the key, allowing it to be activated on VM (this solved problem for me), but it still doesn't work. Any ideas?

Code looks like this:

HRESULT hr = TA_CheckAndSavePKey(taHandle, key.toStdWString().c_str(), TA_SYSTEM);

if (hr == TA_OK)
{
(...)}
else
{(..)}

When TA_CheckAndSavePKey is TA_OK:

ACTIVATE_OPTIONS opts = {0};
opts.nLength = sizeof(ACTIVATE_OPTIONS);
wchar_t tmp[255];
tmp[0]=0;
int len = extraData.toWCharArray(tmp);
tmp[len]= 0;
opts.sExtraData = tmp;

HRESULT hr = TA_Activate(taHandle, &opts);
if (hr == TA_OK)
{(...)
}
else
{(...)}

And TA_Activate returns TA_E_PKEY (error code 2).

Answer

First, use the latest TurboActivate.

Second, don't mess around with implementation details. You'll break things in unusual ways.

Third, to fix messing around with implementation details call TA_Deactivate(1) to remove the activation details and the product key.

Lastly, you need better error handling. Show actual errors to customers (not success / fail, but use the many error codes to provide better feedback to customers).

, edited