Integration TurboActivate with Windev

Dear WDay Team,Im Sergio Cionini and im new of LIMELM system.my need is to offer my customers, the possibility to activate online the demo version (5 days) of my Application (a 32 bit windows application) and after, when it is expired,Automatically to buy the full version of my software with paypal payment. I saw that LIMELM may be the right choice to integrate into my software, but I do not understand how to integrate the LIMELM (TurboActivate) system with WINDEV.Is it possible to have a complete example written for WINDEV ?

Nb Windev (www.windev.com or www.pcsoft.fr) is a rad case tools like to Delphy or Real Basic (xojo) and can call external DLL fonctions

Thanks and Best Regards,

Hi Sergio,

my need is to offer my customers, the possibility to activate online the demo version (5 days) of my Application (a 32 bit windows application) and after, when it is expired,Automatically to buy the full version of my software with paypal payment.

Yep, LimeLM and TurboActivate will handle all of that.

but I do not understand how to integrate the LIMELM (TurboActivate) system with WINDEV.

I know we have at least 2 customers using PCSoft/Windev. The best place to start is by using looking at the "Using TurboActivate with C/C++" article. That will introduce you to the basic functions you'll be using.

Then, after download the Main TurboActivate package for Windows on your API page, go to the "API\C" folder. Open the "Example.c" and "TurboActivate.h" files in your favorite text editor. The functions in the TurboActivate.h file are the functions you'll be calling from your Windev app. To see how to call dll functions see the Windev article: API (Function) - Windev. There are more examples throughout the web. Here's one.

A few things to note:

- TurboActivate only uses unicode strings on Windows. That's UTF16 string (double-byte characters) on Windows. On all other platforms (Linux/Mac/Android/Solaris/etc.) TurboActivate uses UTF-8 string (char*).

- All functions returns "HRESULT" which is just a 4-byte integer.

- Apparently Windev doesn't care about the calling convention of the functions, but if you need to know, on Windows we use the Cdecl calling convention (that's what the "TA_CC" means).

For example, take this function from TurboActivate.h:

TURBOACTIVATE_API HRESULT TA_CC IsGenuineEx(STRCTYPE versionGUID, PGENUINE_OPTIONS options);

This is the "IsGenuineEx" function that takes 2 parameters:

  1. A Unicode string "versionGUID"
  2. A pointer to a structure of "GENUINE_OPTIONS" type.

And it returns a 4-byte (32-bit) signed integer.

The GENUINE_OPTIONS structure in TurboActivate.h (scroll near the top of the file to see it):

typedef struct _GENUINE_OPTIONS {    /* The size, in bytes, of this structure. Set this value to    the size of the GENUINE_OPTIONS structure. */    uint32_t nLength;


    /* Flags to pass to IsGenuineEx() to control its behavior. */    uint32_t flags;


    /* How often to contact the LimeLM servers for validation. 90 days recommended. */    uint32_t nDaysBetweenChecks;


    /* If the call fails because of an internet error,    how long, in days, should the grace period last (before    returning deactivating and returning TA_FAIL).


    14 days is recommended. */    uint32_t nGraceDaysOnInetErr;} GENUINE_OPTIONS, *PGENUINE_OPTIONS;

Which just means there are 4 members to the structure all of 4-byte unsigned integers. So it might look something like this in Windev:

GenuineOptions is structure    nLength is unsigned int    flags is unsigned int    nDaysBetweenChecks is unsigned int    nGraceDaysOnInetErr is unsigned intEND

That should get you started. Tell me if you have any questions.