Make sure Spinneret inits and shuts down COM like a good boy.
[WebKit-https.git] / WebKitTools / Spinneret / Spinneret / Spinneret.cpp
index 720ef37260657c5be1c5a7b3da680f5a2a022ce2..ece9e81f0a4502508f4f717d7a9794a465c1113a 100755 (executable)
@@ -29,6 +29,7 @@
 #include "WebFrame.h"
 
 #include <commctrl.h>
+#include <objbase.h>
 
 #define MAX_LOADSTRING 100
 #define URLBAR_HEIGHT  24
@@ -101,6 +102,9 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
     if (!InitInstance (hInstance, nCmdShow))
         return FALSE;
 
+    // Init COM
+    CoInitialize(NULL);
+
     hURLBarWnd = CreateWindow(L"EDIT", 0,
                         WS_CHILD | WS_VISIBLE | WS_BORDER | ES_LEFT | ES_AUTOVSCROLL, 
                         0, 0, 0, 0,
@@ -137,6 +141,9 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
     _CrtDumpMemoryLeaks();
 #endif
 
+    // Shut down COM.
+    CoUninitialize();
+    
     return (int) msg.wParam;
 }