Index: /trunk/src/VBox/Main/glue/vboxapi.py
===================================================================
--- /trunk/src/VBox/Main/glue/vboxapi.py	(revision 19901)
+++ /trunk/src/VBox/Main/glue/vboxapi.py	(revision 19902)
@@ -128,4 +128,13 @@
         return obj.__getattr__(field)
 
+    def initPerThread(self):
+        import pythoncom
+        # or with pythoncom.COINIT_APARTMENTTHREADED?
+        pythoncom.CoInitializeEx()
+
+    def deinitPerThread(self):
+        import pythoncom
+        pythoncom.CoUninitialize()
+
 
 class PlatformXPCOM:
@@ -156,4 +165,10 @@
     def getArray(self, obj, field):
         return obj.__getattr__('get'+field.capitalize())()
+
+    def initPerThread(self):
+        pass
+
+    def deinitPerThread(self):
+        pass
 
 class PlatformWEBSERVICE:
@@ -189,5 +204,10 @@
     def getArray(self, obj, field):
         return obj.__getattr__(field)
-           
+    
+    def initPerThread(self):
+        pass
+
+    def deinitPerThread(self):
+        pass
 
 class SessionManager:
@@ -226,2 +246,8 @@
         if hasattr(self, "vbox"):
             del self.vbox
+
+    def initPerThread(self):
+        self.platform.initPerThread()
+
+    def deinitPerThread(self):
+        self.platform.deinitPerThread()
