Shared DLL problem with Mutex
Posted on 1999-01-19
I'm writing a shared DLL with mutex.
DWORD MyDLLFunction(int param1, int param2)
HANDLE hMutex ;
hMutex = OpenMutex(SYNCHRONIZE,false,MUTEX_NAME_INIT) ;
dwEvent = WaitForSingleObject(hMutex, MUTEX_TIMEOUT) ;
if ((dwEvent == WAIT_TIMEOUT) ||
(dwEvent == WAIT_FAILED))
return MAINlLastError ;
// do some treatment ...
return tValRet ;
The first application works fine. When I launched the second, I received a WAIT_TIMEOUT from the WaitSingleObject().
What do I need to do ?
Does anyone know where I can find some info about DLL shared between applications.
Thanks in advance