In-proc server is FTM. Multiple instances of this in-proc server could
be running at same time. In-proc server's DLL is calling Logger.dll,
and logger.dll is in turn calling waitForSingleObject(). Is there a
chance for dead-lock?
If so how can I prevent it?
Inproc.dll
--------------
CLogLibrary gblLogger; //exported from Logger.dll
DllMain()
{
if(DLL_ATTACH)
{
gblLogger.Initialize( "C:\\", "my.log");
}
}
Logger.dll
---------------
CLogger::Initialize( dir, file)
{
CreateMutex(0,false,file); //creating mutex using Filename as name.
WaitForSingleObjct()
{
CreateFile(); //write to log file
WriteFile();
ReleaseMutex();
}
CloseHandle();
}
Thanks
Ramesh