x86 and/or x64Answered

I automatically build 32- and 64-bit versions of my VB.NET app on my 64-bit operating system (Windows 11). Which version(s) of TurboActivate should I include with my project?

I suspect this is related to using the AnyCPU platform target. If so, then WHERE do I add the "custom constant" TA_BOTH_DLL=TRUE (do this for both Debug and Release builds), please?

ago, edited ago
Answer

Honestly, it's not worth supporting 32-bit. This was more advice that was applicable 20 years ago. Every modern PC/laptop/server from the last 21+ years is 64-bit. I would just use the 64-bit DLL and compiler your app as 64-bit only.

ago

Since my product is an Excel add-in, I think I still have to cater for people hanging on to 32-bit Office installations.  Does that make sense?  If so, then I'd still need to know where to create that “custom constant”.  THANKS

ago, edited ago

You put constants in the project properties. Right click the project node in Visual Studio and click properties and one of the entries allows you to define constants.

ago

Thanks, Wyatt.  I put it under “Advanced Compile Options…” / “Custom Constants” and then ticked the boxes for “Define DEBUG constant” and “Define TRACE constant”.  Let me know if that sounds right.  Much appreciated!

ago

Hello again.

Using the custom constant above, I just did my first “build” with integrated licensing code, which threw up no issues.  However, on start up, I get the following error message…  

Initialization [Error] DnaLibrary AutoOpen Error : TargetInvocationException - Exception has been thrown by the target of an invocation.

When stepping through the code in VB.NET's DEBUG mode, it seems to falter on the following line in the “UseTrial” sub:

                Throw taHresultToExcep(ret, "UseTrial")

When I then press “Continue”, the debugger carries on and I get the message that a Trial could not be initiated with error code 17.

Does this ring any bells for anyone? 

ago

Yes, and the exception will be VM exception:

/*
 MessageId: TA_E_IN_VM
 Message code (in Hex): 0x11
 Message code (in Decimal): 17

 MessageText:

 The function failed because this instance of your program
 if running inside a virtual machine / hypervisor and you've
 prevented the function from running inside a VM.
*/
#define TA_E_IN_VM ((HRESULT)0x00000011L)

https://wyday.com/limelm/help/faq/#in-vm

ago

Thanks again, Wyatt.  I can see you've had this discussion before :-)

I see you suggested to others to: “allow VM activations (set it at the version level in LimeLM or per-key).”  Is that still my best solution, if I don't want to switch to TurboFloat?  I'll try it, since I'm using “hardware lock” anyway.

ago

I've worked out that the very first error I get in the “built” solution actually comes from the “object creation" step:

        Try
           If bLic_Testing Then MsgBox("Create license object")

           'GUID comes from the version page at LimeLM
           objLicence = New TurboActivate("<myCodeString>")

           If bLic_Testing Then MsgBox("CheckTrial")
           'Start or check for a trial period...
           CheckTrial()

           … etc.

The “Try” does not go to “Catch”, though!

Could this also be related to VM issues, or perhaps to that “custom constant” I set (see above)?

ago