LOSTWAGES: add COM janitorial task

Mike McCormack mike at codeweavers.com
Tue Sep 14 05:22:08 CDT 2004


ChangeLog:
* add COM janitorial task
-------------- next part --------------
Index: templates/en/janitorial.template
===================================================================
RCS file: /home/wine/lostwages/templates/en/janitorial.template,v
retrieving revision 1.40
diff -u -r1.40 janitorial.template
--- templates/en/janitorial.template	2 Sep 2004 19:07:49 -0000	1.40
+++ templates/en/janitorial.template	14 Sep 2004 08:49:35 -0000
@@ -7,6 +7,55 @@
   Janitor's List</a>), and it's high time that we have one too.
   What is there to clean up? Well, lots of things! :)
 
+  <h2>COM objects</h2>
+
+  <h3>Use Interlocked functions in AddRef and Release methods</h3>
+
+  Most OLE objects should be threadsafe, which requires use of the thread-safe
+  increment and decrement functions <tt>InterlockedIncrement(&This->ref)</tt>
+  and <tt>InterlockedDecrement(&This->ref)</tt> instead of <tt>This->ref++</tt>
+  or <tt>This->ref--</tt>.  See an example
+  <a href="http://www.winehq.org/hypermail/wine-patches/2004/09/0248.html">patch</a>
+  of how to fix this problem.<p>
+
+  As of Sept 14, 2004), there are at least 32 files that appear to use thread
+   unsafe operations:<br>
+  <tt>find . -name \*.c -exec grep ef-- {} \; -ls</tt>
+  <ul>
+    <li>dlls/avifil32/avifile.c
+    <li>dlls/oleaut32/tests/vartype.c
+    <li>dlls/oleaut32/olefont.c
+    <li>dlls/oleaut32/olepicture.c
+    <li>dlls/oleaut32/dispatch.c
+    <li>dlls/oleaut32/connpt.c
+    <li>dlls/dsound/buffer.c
+    <li>dlls/ole32/datacache.c
+    <li>dlls/ole32/oleobj.c
+    <li>dlls/ole32/stg_stream.c
+    <li>dlls/ole32/defaulthandler.c
+    <li>dlls/ole32/storage.c
+    <li>dlls/ole32/storage32.c
+    <li>dlls/ole32/hglobalstream.c
+    <li>dlls/ole32/antimoniker.c
+    <li>dlls/ole32/filemoniker.c
+    <li>dlls/ole32/bindctx.c
+    <li>dlls/ole32/oleproxy.c
+    <li>dlls/ole32/clipboard.c
+    <li>dlls/ole32/memlockbytes.c
+    <li>dlls/ole32/memlockbytes16.c
+    <li>dlls/ole32/itemmoniker.c
+    <li>dlls/ole32/moniker.c
+    <li>dlls/ole32/compositemoniker.c
+    <li>dlls/ole32/marshal.c
+    <li>dlls/ole32/rpc.c
+    <li>dlls/dinput/mouse.c
+    <li>dlls/dinput/joystick_linux.c
+    <li>dlls/dinput/device.c
+    <li>dlls/dinput/joystick_linuxinput.c
+    <li>dlls/dinput/keyboard.c
+    <li>dlls/urlmon/umon.c
+  </ul>
+
   <h2>Tools</h2>
 
   <h3>Smatch</h3>


More information about the wine-patches mailing list