Passing extra activation data to LimeLM from inno setup

Hi,

I want to pass a string as extra data.Do you have a sample for inno setup?

Thanks,Gabriel Topala

Hey Gabriel,

We don't have an example showing how to pass extra data using InnoSetup, however you can copy & paste code from the Delphi example to pass the extra data along with the activation.

The TA_Activate() function is the one you would want to modify to more closely match the Delphi example.

Unfortunately, copy & paste doesn't work.Delphi example uses the Addr function (which doesn't exist in Inno Setup) begin options.nLength := SizeOf(ACTIVATE_OPTIONS); options.sExtraData := Addr(extraData[1]); ret := TurboActivateUnit.TA_Activate(self.handle, Addr(options));

I don't know. This might be a limitation in InnoSetup (namely, not having the ability to actually get the address of the the memory you're trying to access, and having no other way to pass structures). But like I said, I don't know. You could play around with code and see what works, and try googling for ways to solve this problem.

I found this thread while looking into a similar issue. In case anyone stumbles across it again, here is how we pass ACTIVATE_OPTIONS to the activation function from Inno Setup:

1) Define a record (structure) for the optional data:

type TA_Activate_Options = record nLength : longword; sExtraData : WideString; end;

2) Alter the TA_Activate function wrapper to accept the argument:

function TA_Activate(handle: longint; var options: TA_Activate_Options): longint;external 'TA_Activate@files:TurboActivate.dll,TurboActivate.dat cdecl setuponly delayload';

3) Define a "TA_Activate_Options" variable and pass it to TA_Activate:

taOptions.nLength := 8; //the size of the structure (32-bit) taOptions.sExtraData := GetComputerNameString(); ret := TA_Activate(taHandle, taOptions);

My experience with Pascal scripting is limited, but Inno Setup doesn't seem to have a size() function to set the nLength parameter. A 32-bit installer should define a structure that occupies 8 bytes and I suspect a 64-bit installer would pad the structure to 16 bytes. As Wyatt said, some trial and error may be required.