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?