Click to See Complete Forum and Search --> : allowing some API only in initialization


Pisto
October 25th, 2008, 09:51 AM
I have a dll (A) that loads in its initialization (init()) a runtime-generated list of other dlls. One of them, has an exported function (F()) that might be called ONLY in the initialization of the other dlls, ONLY if such initialization is called by init() (this means at load time, because A is loaded togheter with the process). So, I got to code a sort of check at the begginning of F() that tells if the above condition is true.

Is there an easier and faster solution than getting the stacktrace in F() and controlling the return addresses?