quartz: Implement IClassFactory::LockServer.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d6afd45e71
commit
b0534c12c0
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue