VB6.0 and TurboActivate.dll

I'm trying to add TurboActivate.dll reference to my VB6.0 code and I'm getting a "Can't add a reference to the specified file" error.

Any ideas?Sorry I'm a newby to LimeLM!

TurboActivate.dll is not an ActiveX dll, it's a C dll. This means you don't add it in the "normal" way. You instead include it in the same folder as your output *.exe file, and you use the function definitions we have in the example VB6 app.

Tell me if this helps.

Thank you for your reply.

I've added "TurboActivate.dll" to your TurboActivate\API\VB6 sample app and it works fine as a complied EXE but i can't run it in stepped debug mode.

CheersSteve

What error are you getting?

Run-time error '49'Bad DLL calling convertion

stops in Form_Load at Select Case taIsActivated(StrPtr(taGUID))

Ah.. that's because TurboActivate uses the CDECL calling convention and VB6 doesn't support this calling convention. We don't officially support VB6 (because the language is so ancient) which is why we don't have an article showing how to use TA with VB6.

That being said, you have a few options:

  1. Switch to VB.NET.
  2. Switch to RealBasic.
  3. Use a VB6 class that works around this CDECL problem to call the TurboActivate function. See: http://planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=49776&lngWId=1. I've also attached the example code to this forum post just in case that link ends up dead.

[attachment=0]Call_CDECL_From_VB6.zip[/attachment] This code has not been tested by anyone here at wyDay. Use at your own discretion.

Tell me if this helps.

Hi,

thanks for your suggestions but I'm suck with VB6.

You've said you don't support VB6 yet there is an example in the TurboActivate.zip file VB6 directory.

CheersSteve

You've said you don't support VB6 yet there is an example in the TurboActivate.zip file VB6 directory.

That was a quick and dirty example we threw together for a customer that ended up upgrading to VB.NET.

An alternative to the "Call_CDECL_From_VB6.zip" example is to create a simple C or C++ dll that has a STDCALL interface that calls TurboActivate functions.

hi

i want to activate a product.... how to do it... I have TurboActivation.dat and TurboActivation.dll from the program directory. How can i create a key for this Application. Its a 30 Day limitation software. It ask Activation code.Please help me activate the software

We've created a STDCALL version of TurboActivate (meaning it can be used in VB6 and other ancient unflexible languages). Read the VBA tutorial for how to use it. If you have any specific questions we'll be glad to help.