From c41d0c9a4bf8e03832139794ddd8b9f7966f05ee Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Mon, 25 Oct 2004 21:48:44 +0000 Subject: [PATCH] - Remove bogus use of nStatCounter and hOleAut32 in CoSetState. - Remove a comment about protecting per thread data by a critical section. --- dlls/ole32/compobj.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 412b633c883..45d1374afe6 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -1962,9 +1962,6 @@ HRESULT WINAPI CoInitializeWOW(DWORD x,DWORD y) { return 0; } -static int nStatCounter = 0; /* global */ -static HMODULE hOleAut32 = 0; /* global */ - /*********************************************************************** * CoGetState [OLE32.@] * @@ -1990,7 +1987,6 @@ HRESULT WINAPI CoGetState(IUnknown ** ppv) /*********************************************************************** * CoSetState [OLE32.@] * - * NOTES: FIXME: protect this with a crst */ HRESULT WINAPI CoSetState(IUnknown * pv) { @@ -2002,15 +1998,11 @@ HRESULT WINAPI CoSetState(IUnknown * pv) if (pv) { IUnknown_AddRef(pv); - nStatCounter++; - if (nStatCounter == 1) LoadLibraryA("OLEAUT32.DLL"); } if (apt->state) { TRACE("-- release %p now\n", apt->state); IUnknown_Release(apt->state); - nStatCounter--; - if (!nStatCounter) FreeLibrary(hOleAut32); } apt->state = pv; return S_OK;