Reg : Win32 DLL - License Verfication not working in Production

I created a simple win32 dll to verify license using Turboactivate. However application runs locally but when i try to run in production, dll is getting initatiated but functions like TA_IsActivated(), TA_GenuineEx() are not able to execute in the production server. Application simply hangs while executing the above mentioned methods.

Here are the following components used

1)Used Visual studio 2015 - VC++ to build the DLL2)Used Turbo Activate Static Library for Visual Studio 20153)In the Production machine VC++ Redistributable VC2015 is installed

What more Iam missing?

I also tried the example console application provided for c/c++ here https://wyday.com/limelm/help/using-turboactivate-with-c-plus-plus/

This works good in both local and production machines. License verifcation is doing good. But when comes to dll based license verfication it works locally and not in production machines (Tried various production machines results are same with the dll based license verification except the local)

More information is needed. Preferably a way to reproduce what you're seeing. Try using the dynamic libraries in the meantime (because it sounds like that's working fine for you).

When using TuboActivate static libraries you need to take care that you're not overwriting memory or including conflicting libraries. With the dynamic libraries you don't have to worry about that -- the dynamic libraries are more or less self-contained (it's more complicated than that, but that's broadly true).

So, what we need from you: a way to reproduce what you're seeing. Also, version numbers are very important when reporting problems (we don't know what OS version you're on, what version of TA you're using, etc. -- we can guess but that's not very useful).

Iam trying to create amibroker (www.amibroker.com) dll plugins using amibroker adk http://www.amibroker.com/devlog/2006/12/15/amibroker-development-kit-adk-for-cc-now-available-to-everyone/ and licensing it with LimeLM. Just to mention that Iam a junior when comes to VC++ coding.

Local Machine OS : Win10Tested Machine OS : Win7 and Win 2008 Server

Here is the modal dllmain function which iam testing with created amibroker dll plugin.

// dllmain.cpp : Defines the entry point for the DLL application.#include "stdafx.h"#include <stdio.h>#include <stdlib.h>#include <Windows.h>

// Support Unicode compilation and non-Windows compilation#ifdef _WIN32#include <tchar.h>#else#define _T(x) xtypedef char TCHAR;#endif

// To use the static version of TurboActivate then uncomment the next line//#define TURBOACTIVATE_STATIC

#define TURBOACTIVATE_STATIC#include "TurboActivate.h"#pragma comment(lib, "TurboActivate-MD.lib")

static int i = 0;uint32_t taHandle;/* The handle used for TurboActivate function calls. */

void CheckLicense() {

//MessageBox(NULL, _T("Valid License1"), _T("message"), MB_OK | MB_SYSTEMMODAL);

uint32_t trialFlags = TA_VERIFIED_TRIAL | TA_SYSTEM;

/* Used to store TurboActivate responses. */ HRESULT hr; GENUINE_OPTIONS opts = { 0 }; opts.nLength = sizeof(GENUINE_OPTIONS);

// In this example we won't show an error if the activation // was done offline by passing the TA_SKIP_OFFLINE flag opts.flags = TA_SKIP_OFFLINE;

// How often to verify with the LimeLM servers (90 days) opts.nDaysBetweenChecks = 1;

// The grace period if TurboActivate couldn't connect to the servers. // after the grace period is over TA_IsGenuineEx() will return TA_FAIL instead of // TA_E_INET or TA_E_INET_DELAYED opts.nGraceDaysOnInetErr = 1;

/* Get the handle that will be used for TurboActivate function calls.

TODO: paste your Version GUID here. */ taHandle = TA_GetHandle(_T("MYGUID")); if (taHandle == 0) {

MessageBox(NULL, _T("Failed to get the handle for the Version GUID specified"), _T("message"), MB_OK | MB_SYSTEMMODAL); ExitProcess(1); }

MessageBox(NULL, _T("Before Activation Entry"), _T("message"), MB_OK | MB_SYSTEMMODAL); hr = TA_IsActivated(taHandle); MessageBox(NULL, _T("Before Activation Exit"), _T("message"), MB_OK | MB_SYSTEMMODAL);

if (hr == TA_OK || hr == TA_E_FEATURES_CHANGED || hr == TA_E_INET || hr == TA_E_INET_DELAYED) {

MessageBox(NULL, _T("Valid License"), _T("message"), MB_OK | MB_SYSTEMMODAL);

} else { MessageBox(NULL, _T("InValid License"), _T("message"), MB_OK | MB_SYSTEMMODAL); ExitProcess(1); }

}

BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved){

switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH:

break;

}

if(i==0) { i++; CheckLicense(); } return TRUE;}

Let me know if you need more details.

When i tried to use Turboactivate dynamic libraries - Amibroker failed to load the dll. That forced me to try to static version of VC2015. With the static library Amibroker application is able to detect and load the dll. However this works good only with my local machine and remote machines amibroker hangs while loading the dll whenever the methods TA_IsActivated(), TA_IsGenuineEx(), TA_IsGenuine() are invoked.