Dmitry Timoshkov wrote:
"Robert Shearman" rob@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.
Do we still need to worry about that crap even though we don't link directly to other DLLs anymore?
Rob