If I had a DLL (foo.dll) that was LoadLibrary'd in an application (bar.exe), how do I get the bar.exe string from foo.dll?
Pass NULL as the first parameter to GetModuleFileName () .