GetTrialId() not returning a value

I am trying to test all aspects of version 3 in my application and having trouble retrieving the trial ID
I have a verified trial, which I have confirmed on the dashboard.
The following syntax returns an empty string for trialID

StringBuilder ID = new StringBuilder();//these three lines get the trialID
LexActivator.GetTrialId( ID, 40);
string trialID = ID.ToString();

Hi Vil,

For all the Get functions you should assign some initial size to the string builder in fact always make it 256,

StringBuilder ID = new StringBuilder(256);
if(LexActivator.GetTrialId( ID, 256) == LA_OK) {
    string trialID = ID.ToString();
}

I changed the code slightly as follows to make syntax comply and debugging easier

string trialID = “”;
StringBuilder ID = new StringBuilder(256);
int status = LexActivator.GetTrialId(ID, 256);
if ( status == LexActivator.StatusCodes.LA_OK)
{
trialID = ID.ToString();
}

status returns 0 ie LA_OK but ID and trialID is still an empty string ie “”.

Confirming it is a bug.

It has been fixed now, but for existing trial activations you will need to call ActivateTrial() function again. For new trials it should work fine.