OK, I have a library, mylib.dll. It can be loaded from various applications. What i would like to know is when it is loaded, and some function is called, how do i find the path to the executable that just loaded it?
Consequencially, I am also wondering if there is a good way to go about making sure that the code accessing my library is in fact code i have writen. Right now I am using a MD5 hash of the calling executable, and comparing it to an approved list in the DLL, however this approach is far from perfect, and quite labor intensive. How do i go about assuring communication is between trusted components and not third party immitations?