[OLE #2] Provide Reference Implementation of DllCanUnloadNow

Dmitry Timoshkov dmitry at baikal.ru
Wed Dec 1 20:09:18 CST 2004


"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.

-- 
Dmitry.




More information about the wine-devel mailing list