implementing DllCanUnloadNow questions

James Hawkins truiken at
Tue Nov 30 14:08:52 CST 2004

I sent this message a couple months ago, but I got no response so I'll
try again.

I would like to work on the DllCanUnloadNow janitorial task, but I was
wondering if there are any patches or examples of dll's that correctly
implement this so that I can do it right.

Is LockServer(TRUE/FALSE) the same as this example?

       IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
       return S_OK;

If they are the same, what is needed to complete this stub?  I would
think that there would be a refCount variable that is incremented if
dolock is true and decremented if dolock is false.  Also, should the
LockServer functions be listed in the spec files of the dlls?

After implementing LockServer, it should be an easy matter to do a
check for refCount == 0 to see if the dll can be unloaded or not.  Am
I heading in the right direction?

James Hawkins

More information about the wine-devel mailing list