DllCanUnloadNow janitorial

James Hawkins truiken at gmail.com
Wed Oct 6 12:56:40 CDT 2004


Hi,

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?

static HRESULT WINAPI SFCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
	IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
	FIXME("(%p)->(%d),stub!\n",This,dolock);
	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