Rob Shearman : ole32: Remove some dead code.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 16 16:27:16 CDT 2007


Module: wine
Branch: master
Commit: d845022819ae37c8888a873510d027b1b9192744
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d845022819ae37c8888a873510d027b1b9192744

Author: Rob Shearman <rob at codeweavers.com>
Date:   Mon Jul 16 15:00:26 2007 +0100

ole32: Remove some dead code.

CoFreeUnusedLibraries doesn't do anything and COM_FlushMessageQueue 
won't actually allow any RPCs to be processed as the apartment has 
already been destroyed.

---

 dlls/ole32/compobj.c |   31 -------------------------------
 1 files changed, 0 insertions(+), 31 deletions(-)

diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index 11b08fe..662b42a 100644
--- a/dlls/ole32/compobj.c
+++ b/dlls/ole32/compobj.c
@@ -1056,31 +1056,6 @@ HRESULT WINAPI CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
   return hr;
 }
 
-/* On COM finalization for a STA thread, the message queue is flushed to ensure no
-   pending RPCs are ignored. Non-COM messages are discarded at this point.
- */
-static void COM_FlushMessageQueue(void)
-{
-    MSG message;
-    APARTMENT *apt = COM_CurrentApt();
-
-    if (!apt || !apt->win) return;
-
-    TRACE("Flushing STA message queue\n");
-
-    while (PeekMessageA(&message, NULL, 0, 0, PM_REMOVE))
-    {
-        if (message.hwnd != apt->win)
-        {
-            WARN("discarding message 0x%x for window %p\n", message.message, message.hwnd);
-            continue;
-        }
-
-        TranslateMessage(&message);
-        DispatchMessageA(&message);
-    }
-}
-
 /***********************************************************************
  *           CoUninitialize   [OLE32.@]
  *
@@ -1131,12 +1106,6 @@ void WINAPI CoUninitialize(void)
     TRACE("() - Releasing the COM libraries\n");
 
     RunningObjectTableImpl_UnInitialize();
-
-    /* This will free the loaded COM Dlls  */
-    CoFreeAllLibraries();
-
-    /* This ensures we deal with any pending RPCs */
-    COM_FlushMessageQueue();
   }
   else if (lCOMRefCnt<1) {
     ERR( "CoUninitialize() - not CoInitialized.\n" );




More information about the wine-cvs mailing list