| 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
|