Hey John,
Can you give me any hints on how to integrate TurboActivate into it? I could even work with some clues about which examples you already have that might be the most useful for me.
Sure, there are a few resources you can use. One resource is AutoIt's documentation (Start -> AutoIt 3 -> AutoIt Help File). Then go to the DllCall help article. This gives you an in-depth intro into what you need to do to call TurboActivate dll functions.
So then the question becomes, what are the function definitions. For that you can download the Windows TurboActivate pack on your API page. Then look in the API/C folder for the TurboActivate.h file. This lists all the functions, their return codes, and what they do.
For example, the "CheckAndSavePKey()" function is listed as the following:
TURBOACTIVATE_API HRESULT TA_CC CheckAndSavePKey(STRCTYPE productKey, uint32_t flags);
In AutoIt this translates to the following:
DllCall($ta_dll, "int:cdecl", "CheckAndSavePKey", "wstr", $pkey, "UINT", $flags)
But in AutoIt there's the added complication that you need to open the TurboActivate.dll before you use any functions, and then leave it open until the close of your application. So to open TurboActivate.dll do it like this:
; Open the TurboActivate dll on a global scope (so it can be used throughout your appGlobal $ta_dll = DllOpen("TurboActivate.dll")
Then, at the close of your application you can release the TurboActivate dll like this:
; Close the TurboActivate dll somewhere when your app closes.DllClose($ta_dll)
So an example using CheckAndSavePKey() might look like this:
Local $pkey = "ABCD-EFGH-IJKL-MNOP-QRST"Local $result = DllCall($ta_dll, "int:cdecl", "CheckAndSavePKey", "wstr", $pkey, "UINT", 1)
Does that make sense?