Unable to activate using product key

Hi,

I want to add licensing support to my application using C++.I downloaded and followed the samples. However, I am unable to activate using product key. I get an error on the method TA_CheckAndSavePKey(). It says, "The specified disk or diskette cannot be accessed."Here is what I have,

taHandle = TA_GetHandle(_T("<GUID>"));if (taHandle == 0){ return ERROR_LICENSE::ACTIVATE_FAIL;}

hr = TA_CheckAndSavePKey(taHandle, productKey.c_str(), TA_SYSTEM); // failing hereif (hr == TA_OK){ printf("Product key saved successfully.\n"); // try to activate hr = TA_Activate(taHandle, NULL);

if (hr == TA_OK) { printf("Activated successfully\n"); result = ERROR_LICENSE::SUCCESS; }}

Can anyone guide me? Am I missing anything?

You're hovering over the error code in Visual Studio and it "helpfully" fills in what it thinks the error is in English. That's not the error. See the actual error code (the number in decimal or hex) and compare it to the TurboActivate.h full list of possible error codes and their explanations.

Thanks for the response!

I get this,0x0000001a : The specified disk or diskette cannot be accessed.

Not sure what's wrong.The value of hr is this, which I think is not a valid error code.

Okay, I looked at the error.It looks like the error is,TA_E_ALREADY_ACTIVATED ((HRESULT)0x0000001AL)

I have a question, to make my product available to multiple users, can I work by distributing product keys made for a single product?Please guide.

Set the number of allowed activations to anything other than 1.

See: https://wyday.com/limelm/help/activations/