Click to See Complete Forum and Search --> : EXE name from DLL


shalini
December 3rd, 1998, 05:17 AM
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

Pavithra
December 6th, 1998, 08:01 PM
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);



}