TurboActivate with VB6

How do I integrate your product with my VB6 apps?

We don't have an example project for VB6 (VB6 hasn't been updated in more than a decade). However, you can use the VB.NET example or the C++ example to find the functions you need (like IsActivated() and IsGenuine()) and write the VB6 function declarations.

Here are 2 places that will help you write the code:

I don't know how married you are to the idea of using VB6, but I would recommend at least switching to VB.NET. It's widely supported (by us too), and it's constantly improved by Microsoft. But that's just my 2 cents.

That being said, you should still be able to use TurboActivate with VB6.

Tell me if this helps.

hi, i went thru this.http://support.microsoft.com/kb/205277and tried these

Declare Function taActivate Lib "TurboActivate.dll" Alias "Activate" () As Long ' worksDeclare Function taIsActivated Lib "TurboActivate.dll" Alias "IsActivated" (ByVal AddressOfFirstCharacter As Long) As Long ' fails

infact i've been around the house trying to work out the dll calling convention for IsActivated. and then something along these lines

sUni = StrConv(GUID, vbUnicode, 0) If taActivate Then If taIsActivated(StrPtr(sUni)) Then ....

any ideas to help us?

cheers

Actually from how that's written, it actually looks like it's succeeding. However, the code using the function is slightly wrong.

The return codes for these functions isn't true or false. It's a long code that is mapped to a specific error (or success).

By default all functions return 0 (== TA_OK) on success. All other return codes are failures. (See the TurboActivate.h file in the C/C++ example code. TA_OK == 0, TA_FAIL == 1, TA_E_PKEY == 2, etc.)

So, by using code like "If taActivate Then" you're actually getting the exact opposite of what you want. Because positive numbers are "true" in VB but actually represent an error, and 0 represents "false" in VB but actually represents success in TurboActivate.

So, what are the return codes you're getting for the Activate function and the IsActivated function?

P.S. We've downloaded the Visual Basic 6 designer, and we'll be throwing together an example project. But it will probably take us a couple of weeks.

the inti returns 2. so that is bad yeah?

Not bad. It tells you what is wrong. A return code of 2 is TA_E_PKEY. And in the context of using the "Activate()" function, this means you haven't set a product key yet. You must first use the "CheckAndSavePKey()" function.

Quite honestly, it would probably be easiest if you just used the TurboActivate wizard (TurboActivate.exe) if your app is not activated. That is, launch TurboActivate.exe, and after it closes recheck if you're activated.

Like I said before, we'll be releasing a full VB6 example in the coming weeks.

TurboActivate 2.8 is out. Included is a VB6 example project. Get it on your API page (requires login).