PDA

View Full Version : Path of DLL



Markus_AC
9th February 2012, 17:36
I have created a DLL which is loaded by an application out of a framework. How can I check in which path my dll is running? When I have a full application, I could use



QApplication a(argc, argv);
QString appPath = a.applicationDirPath();

ChrisW67
10th February 2012, 00:46
If I understand correctly, you want to know the exact file that your operating system has dynamically loaded when your application started? You can check outside of the application using depends.exe on Windows and ldd on UNIX (ensuring the environment is correctly set up). There's no (neat) way to do this at run time that I am aware of: especially on Windows where DLL loading can be subverted badly by manifests, side-by-side assemblies etc.

What problem are you trying to solve?