2 Dec
2004
2 Dec
'04
2:09 a.m.
"Robert Shearman" <rob(a)codeweavers.com> wrote:
-DWORD dll_ref = 0; +LONG cLocks; ... +/********************************************************************** + * Dll lifetime tracking declaration + */ +void LockModule() +{ + InterlockedIncrement(&cLocks); +} + +void UnlockModule() +{ + InterlockedDecrement(&cLocks); +}
Perhaps it would be better to prefix both a variable and lock/unlock interfaces with a module name, in this case "DEVENUM_" since they are global and externally visible. -- Dmitry.