[OLE #2] Provide Reference Implementation of DllCanUnloadNow
Robert Shearman
rob at codeweavers.com
Wed Dec 1 21:41:42 CST 2004
Dmitry Timoshkov wrote:
>"Robert Shearman" <rob at 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
More information about the wine-devel
mailing list