-
EXE name from DLL
Thanks for your response
since I know only the name of my DLL. so I retrieved handle to myDLL
and tried GetModuleFileName(). But that func returned the complete path
where my DLL was residing.
Whereas, I was expecting the name of the EXE which loaded my DLL.
looking forward for your reply
-
Re: EXE name from DLL
This piece of Code Works For Me
extern "C" DllExport void __stdcall GetProcessName()
{
// TODO: Add your dispatch handler code here
char * strL;
strL = new char[100];
GetModuleFileName(NULL, strL, 100) ;
AfxMessageBox(strL);
}