For Programmers: Free Programming Magazines  


Home > Archive > MSDN > October 2005 > How to protect a multiple function dll ? .....









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to protect a multiple function dll ? .....
mariacri@gmail.com

2005-10-29, 6:59 pm


Hi all,

I want to ask something. If I have a simple not ActiveX dll
written in VC++ wich exports multiple functions. I want to ask
something like... A VB6 program calls a function from the dll and
registers to that dll with a serial number...
After that the VB program makes other stuff and after a while calls the
second function from the dll. The dll will be loaded again in the VB
exe process or it is already loaded from the first call of the
function? My problem is how can I protect the dll if it has more than 1
function and to register per dll session and not per function call
session. A program can call 100 functions from a DLL so what is the
best method to protect such a dll.

If I will use a global variable between all functions let's say
bRegistered between f1,f2,..f100. First time when a function is called
if the caller will register I will put the global bRegistered on true.
After first call maybe the calling program will call again the dll with
the second function after 5 minutes. My global bRegistered will be true
or I will find it on false because the dll is reloaded in the calling
process space?

Thanks a lot,
Virgil

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com