Commit b0534c12 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

quartz: Implement IClassFactory::LockServer.

parent d6afd45e
......@@ -29,6 +29,8 @@ extern HRESULT WINAPI QUARTZ_DllGetClassObject(REFCLSID, REFIID, LPVOID *) DECLS
extern HRESULT WINAPI QUARTZ_DllCanUnloadNow(void) DECLSPEC_HIDDEN;
extern BOOL WINAPI QUARTZ_DllMain(HINSTANCE, DWORD, LPVOID) DECLSPEC_HIDDEN;
static LONG server_locks = 0;
/* For the moment, do nothing here. */
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
......@@ -142,6 +144,10 @@ static HRESULT WINAPI DSCF_LockServer(IClassFactory *iface, BOOL dolock)
{
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
FIXME("(%p)->(%d),stub!\n",This,dolock);
if(dolock)
InterlockedIncrement(&server_locks);
else
InterlockedDecrement(&server_locks);
return S_OK;
}
......@@ -204,7 +210,9 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
*/
HRESULT WINAPI DllCanUnloadNow(void)
{
return QUARTZ_DllCanUnloadNow();
if(server_locks == 0 && QUARTZ_DllCanUnloadNow() == S_OK)
return S_OK;
return S_FALSE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment