Downloads  |  Buy

Using LimeLM c++ to protect a DLL from unapproved calls

Using LimeLM c++ to protect a DLL from unapproved calls

Postby binaryduke » April 15th, 2019, 1:12 pm

We deliver our software as a DLL file. It's a plug-in for various commercial software packages. Our core routines are written in C++ and we write wrappers to call the core routines based upon the commercial packages that we are integrating to. These wrappers are either written in C++ or C# .NET depending upon the APIs of the commercial software packages.

For our C++ implementations, we put our core routines into a static library and deliver a single DLL making license management quite simple. For C# however, we need to deliver our core routine C++ DLL plus a wrapper DLL.

We understand how to protect either DLL using LimeLM APIs, but we're looking to avoid our core routine C++ DLL being called by unauthorised external applications, i.e. only our wrapper can call it. As our core routines can be called multiple times per second we want to avoid frequent license checks. We're thinking more about a check per session along the lines of:

- wrapper performs full license checks
- wrapper authenticates with the core DLL using some LimeLM derived data from the license checks
- core DLL uses this data to validate against the LimeLM local key

I don't think we can use IsActivated() as the mechanism within the core DLL as this alone will not close the loophole of non-approved wrappers using our core DLL.

Is there any data returned from IsGenuine() or IsGenuineEX() that our wrapper can hold and pass to our core DLL to authenticate such that the core DLL uses a LimeLM call to validate that this data is correct?
binaryduke
 
Posts: 3
Joined: April 10th, 2018, 12:14 pm

Re: Using LimeLM c++ to protect a DLL from unapproved calls

Postby binaryduke » April 15th, 2019, 1:25 pm

...is a plausible approach to:

1. always have our wrapper deactivate the license at the end of each session
2. have our wrapper store the user's license key and activate at the start of each session
3. have our core DLL check IsActive()

?
binaryduke
 
Posts: 3
Joined: April 10th, 2018, 12:14 pm

Re: Using LimeLM c++ to protect a DLL from unapproved calls

Postby Wyatt » April 16th, 2019, 12:26 pm

I'm a bit stumped about what exactly you're asking.

>> "1. always have our wrapper deactivate the license at the end of each session"

If you're doing that, you'd be better off using TurboFloat: https://wyday.com/limelm/help/licensing-types/#floating


>> "3. have our core DLL check IsActive()"

Yeah, you could do that -- calling TA_IsActivated() will verify the activation locally.
User avatar
Wyatt
Site Admin
 
Posts: 5795
Joined: July 11th, 2007, 10:30 pm
Location: New Hampshire

Re: Using LimeLM c++ to protect a DLL from unapproved calls

Postby Guest » April 16th, 2019, 2:06 pm

I’d like to use LimeLM to ensure that my DLL is called only from applications that are known to us. What I don’t want to do is check over the internet every time our DLL is called as it may be called multiple times per second. Does this help?
Guest
 

Re: Using LimeLM c++ to protect a DLL from unapproved calls

Postby Wyatt » April 16th, 2019, 2:11 pm

Yes, in that case TA_IsActivated() is the function you're looking for. It never contacts the internet. The details and differences between TA_IsActivated() and TA_IsGenuineEx() are described here: https://wyday.com/limelm/help/using-turboactivate-with-c-plus-plus/

And in the TurboActivate.h file.
User avatar
Wyatt
Site Admin
 
Posts: 5795
Joined: July 11th, 2007, 10:30 pm
Location: New Hampshire


Return to LimeLM, TurboActivate, & TurboFloat Support