What I seek here is for you to point me to the right direction.
I'm working on a quite large project. It is a dynamic link library that does a lot of things for the calling exe.
I've added loads of functions and at one point I just found out that I need to find out the path of the calling Exe (the exe with which my dll gets attached).
I've been thinking about either getting the PID and extracting the process information (on location of exe) from it... But probably there is a MUCH easier way. Maybe even a macro or some easy library.
Any kind of help will be deeply appreciated.
Platform is Windows XP/7, Compiler is GCC, It's C++.
Well, I am using this one now -
Code:char strExePath [MAX_PATH]; GetModuleFileName (NULL, strExePath, MAX_PATH); printf("%s\n", strExePath);