I am compiling a c++ dll (and a shared object on Linux). The dll code reads data from binary files in the current directory where the dll itself is present (same directory as dll). This dll along with binary files can be copied to any location by the users.
What's the c++ function/API to get the absolute path of the DLL, from code running in the same DLL?
I am afraid that ".\" will be relative to the 3rd party executable (not the dll) to which my dll will be linked later. That's the reason I am trying to find out the path to dll at runtime. Is this the correct approach? I am asking as I have only seen the codes that read from the paths resolved at compile time.