manual activation API

Deat all,

we are trying to manually create an xml to request a license without any network connection and then read it.

The following snippet of code:

uint32_t taHandle = TA_GetHandle(L"ourCode");

    HRESULT hr = TA_ActivationRequestToFile(taHandle, L"C:/myfolder/licRequest.xml", NULL);
    

returns a TA_E_INVALID_HANDLE error message whereas for other API call this is not the case (e.g. TA_Deactivate(taHandle, 0); works perfectly)

Can you provide a way to fix the error and possibly some detailed C++ code to create the request for a license on the user side and then to activate the license?

Thanks

Things work fine here, so much more information is needed. Versions you're using, etc. Also a full example code.