# ReactOS WINE porting guide for 0.3
# Update this file when you port a dll/program from WINE.

The ReactOS Project shares quite a bit of code with the WINE project.
This document should provide a compleate reference for all of the
locations in the ReactOS source tree where code is shared between the
two projects. If you find something is missing from this documentation
please add it.

If you find that a function in ReactOS that is not implemented properly
and is based on WINE sources, check the latest Winehq CVS and see if
it has been fixed there. If so, please submit a patch to
ros-dev@reactos.org. Otherwise please send a patch to both
wine-patches@winehq.com and ros-dev@reactos.org

When porting a new DLL from Wine to ReactOS, please do the following steps
- Create a new directory in dll/win32/ of the same name as the new Wine DLL
- Add a new entry in dll/win32/win32.rbuild
- Follow the guide "Update process for autosync DLLs" at the bottom of this file


The following build tools are shared with Wine.

reactos/tools/unicode             # Synced to Wine-1.7.1
reactos/tools/widl                # Synced to Wine-1.5.11
reactos/tools/wpp                 # Synced to Wine-1.7.1

The following libraries are shared with Wine.

reactos/dll/directx/wine/amstream       # Synced to Wine-1.7.1
reactos/dll/directx/wine/d3d8           # Synced to Wine-1.7.1
reactos/dll/directx/wine/d3d9           # Synced to Wine-1.7.1
reactos/dll/directx/wine/d3dcompiler_43 # Synced to Wine-1.7.1
reactos/dll/directx/wine/d3dx9_24 => 43 # Synced to Wine-1.7.1
reactos/dll/directx/wine/d3dxof         # Synced to Wine-1.7.1
reactos/dll/directx/wine/ddraw          # Synced to Wine-1.7.1
reactos/dll/directx/wine/devenum        # Synced to Wine-1.7.1
reactos/dll/directx/wine/dinput         # Synced to Wine-1.7.1
reactos/dll/directx/wine/dinput8        # Synced to Wine-1.7.1
reactos/dll/directx/wine/dmusic         # Synced to Wine-1.7.1
reactos/dll/directx/wine/dplay          # Synced to Wine-1.7.1
reactos/dll/directx/wine/dplayx         # Synced to Wine-1.7.1
reactos/dll/directx/wine/dsound         # Synced to Wine-1.7.1
reactos/dll/directx/wine/dxdiagn        # Synced to Wine-1.7.1
reactos/dll/directx/wine/dxgi           # Synced to Wine-1.7.1
reactos/dll/directx/wine/msdmo          # Synced to Wine-1.7.1
reactos/dll/directx/wine/qedit          # Synced to Wine-1.7.1
reactos/dll/directx/wine/quartz         # Synced to Wine-1.7.1
reactos/dll/directx/wine/wined3d        # Synced to Wine-1.7.1

reactos/dll/win32/activeds         # Synced to Wine-1.1.43?
reactos/dll/win32/actxprxy         # Synced to Wine-1.5.26
reactos/dll/win32/advpack          # Synced to Wine-1.7.1
reactos/dll/win32/atl              # Synced to Wine-1.7.1
reactos/dll/win32/atl100           # Synced to Wine-1.7.1
reactos/dll/win32/atl80            # Synced to Wine-1.7.1
reactos/dll/win32/avifil32         # Synced to Wine-1.7.1
reactos/dll/win32/bcrypt           # Synced to Wine-1.5.26
reactos/dll/win32/browseui         # Out of sync
reactos/dll/win32/cabinet          # Synced to Wine-1.5.26
reactos/dll/win32/clusapi          # Synced to Wine-1.7.1
reactos/dll/win32/comcat           # Synced to Wine-1.7.1
reactos/dll/win32/comctl32         # Synced to Wine 1.7.1
reactos/dll/win32/comdlg32         # Synced to Wine 1.7.1
reactos/dll/win32/compstui         # Synced to Wine-1.5.19
reactos/dll/win32/credui           # Synced to Wine-1.7.1
reactos/dll/win32/crypt32          # Synced to Wine-1.7.1
reactos/dll/win32/cryptdlg         # Synced to Wine-1.7.1
reactos/dll/win32/cryptdll         # Synced to Wine-1.7.1
reactos/dll/win32/cryptnet         # Synced to Wine-1.7.1
reactos/dll/win32/cryptui          # Synced to Wine-1.7.1
reactos/dll/win32/dbghelp          # Synced to Wine-1.7.1
reactos/dll/win32/dciman32         # Synced to Wine-1.7.1
reactos/dll/win32/dwmapi           # Synced to Wine-1.7.1
reactos/dll/win32/faultrep         # Synced to Wine-1.7.1
reactos/dll/win32/fusion           # Synced to Wine-1.7.1
reactos/dll/win32/gdiplus          # Synced to Wine-1.7.1
reactos/dll/win32/hhctrl.ocx       # Synced to Wine-1.7.1
reactos/dll/win32/hlink            # Synced to Wine-1.7.1
reactos/dll/win32/hnetcfg          # Synced to Wine-1.7.1
reactos/dll/win32/httpapi          # Synced to Wine-1.7.1
reactos/dll/win32/iccvid           # Synced to Wine-1.7.1
reactos/dll/win32/icmp             # Synced to Wine-0_9_10
reactos/dll/win32/ieframe          # Synced to Wine-1.7.1
reactos/dll/win32/imaadp32.acm     # Synced to Wine-1.7.1
reactos/dll/win32/imagehlp         # Synced to Wine-1.7.1
reactos/dll/win32/imm32            # Synced to Wine-1.5.19
reactos/dll/win32/inetcomm         # Synced to Wine-1.7.1
reactos/dll/win32/inetmib1         # Synced to Wine-1.7.1
reactos/dll/win32/initpki          # Synced to Wine-1.7.1
reactos/dll/win32/inseng           # Synced to Wine-1.7.1
reactos/dll/win32/iphlpapi         # Out of sync
reactos/dll/win32/itircl           # Synced to Wine-1.7.1
reactos/dll/win32/itss             # Synced to Wine-1.7.1
reactos/dll/win32/jscript          # Synced to Wine-1.7.1
reactos/dll/win32/loadperf         # Synced to Wine-1.7.1
reactos/dll/win32/localspl         # Synced to Wine-1.7.1
reactos/dll/win32/localui          # Synced to Wine-1.7.1
reactos/dll/win32/lz32             # Synced to Wine-1.5.19
reactos/dll/win32/mapi32           # Synced to Wine-1.7.1
reactos/dll/win32/mciavi32         # Synced to Wine-1.7.1
reactos/dll/win32/mcicda           # Synced to Wine-1.5.19
reactos/dll/win32/mciqtz32         # Synced to Wine-1.7.1
reactos/dll/win32/mciseq           # Synced to Wine-1.7.1
reactos/dll/win32/mciwave          # Synced to Wine-1.5.19
reactos/dll/win32/mlang            # Synced to Wine-1.7.1
reactos/dll/win32/mmdevapi         # Synced to Wine-1.7.1
reactos/dll/win32/mpr              # Synced to Wine-1.7.1
reactos/dll/win32/mprapi           # Synced to Wine-1.5.19
reactos/dll/win32/msacm32          # Synced to Wine-1.7.1
reactos/dll/win32/msadp32.acm      # Synced to Wine-1.7.1
reactos/dll/win32/mscat32          # Synced to Wine-1.7.1
reactos/dll/win32/mscms            # Synced to Wine-1.7.1
reactos/dll/win32/mscoree          # Synced to Wine-1.5.4
reactos/dll/win32/msctf            # Synced to Wine-1.7.1
reactos/dll/win32/msftedit         # Synced to Wine-1.5.19
reactos/dll/win32/msg711.acm       # Synced to Wine-1.7.1
reactos/dll/win32/msgsm32.acm      # Synced to Wine-1.7.1
reactos/dll/win32/mshtml           # Synced to Wine-1.7.1
reactos/dll/win32/mshtml.tlb       # Synced to Wine-1.5.26
reactos/dll/win32/msi              # Synced to Wine-1.7.1
reactos/dll/win32/msimg32          # Synced to Wine-1.5.19
reactos/dll/win32/msimtf           # Synced to Wine-1.7.1
reactos/dll/win32/msisip           # Synced to Wine-1.7.1
reactos/dll/win32/msisys.ocx       # Synced to Wine-1.7.1
reactos/dll/win32/msnet32          # Synced to Wine-1.5.19
reactos/dll/win32/msrle32          # Synced to Wine-1.7.1
reactos/dll/win32/mssign32         # Synced to Wine-1.7.1
reactos/dll/win32/mssip32          # Synced to Wine-1.7.1
reactos/dll/win32/mstask           # Synced to Wine-1.7.1
reactos/dll/win32/msvcrt20         # Out of sync
reactos/dll/win32/msvcrt40         # Out of sync
reactos/dll/win32/msvfw32          # Synced to Wine-1.7.1
reactos/dll/win32/msvidc32         # Synced to Wine-1.7.1
reactos/dll/win32/msxml            # Synced to Wine-1.5.19
reactos/dll/win32/msxml2           # Synced to Wine-1.5.19
reactos/dll/win32/msxml3           # Synced to Wine-1.7.1
reactos/dll/win32/msxml4           # Synced to Wine-1.5.19
reactos/dll/win32/msxml6           # Synced to Wine-1.5.19
reactos/dll/win32/nddeapi          # Synced to Wine-1.5.19
reactos/dll/win32/netapi32         # Forked at Wine-1.3.34
reactos/dll/win32/ntdsapi          # Synced to Wine-1.5.19
reactos/dll/win32/ntprint          # Synced to Wine-1.7.1
reactos/dll/win32/objsel           # Synced to Wine-1.5.19
reactos/dll/win32/odbc32           # Out of sync. Depends on port of Linux ODBC.
reactos/dll/win32/odbccp32         # Synced to Wine-1.5.19
reactos/dll/win32/ole32            # Synced to Wine-1.7.1
reactos/dll/win32/oleacc           # Autosync
reactos/dll/win32/oleaut32         # Synced to Wine-1.7.1
reactos/dll/win32/olecli32         # Synced to Wine-1.5.19
reactos/dll/win32/oledlg           # Synced to Wine-1.7.1
reactos/dll/win32/olepro32         # Synced to Wine-1.7.1
reactos/dll/win32/olesvr32         # Synced to Wine-1.5.19
reactos/dll/win32/olethk32         # Synced to Wine-1.5.19
reactos/dll/win32/pdh              # Synced to Wine-1.7.1
reactos/dll/win32/pidgen           # Synced to Wine-1.5.19
reactos/dll/win32/powrprof         # Forked at Wine-1.0rc5
reactos/dll/win32/printui          # Synced to Wine-1.7.1
reactos/dll/win32/propsys          # Synced to Wine-1.5.26
reactos/dll/win32/pstorec          # Synced to Wine-1.7.1
reactos/dll/win32/qmgr             # Synced to Wine-1.7.1
reactos/dll/win32/qmgrprxy         # Synced to Wine-1.5.26
reactos/dll/win32/query            # Synced to Wine-1.7.1
reactos/dll/win32/rasapi32         # Synced to Wine-1.5.4
reactos/dll/win32/resutils         # Synced to Wine-1.5.19
reactos/dll/win32/riched20         # Synced to Wine-1.7.1
reactos/dll/win32/riched32         # Synced to Wine-1.7.1
reactos/dll/win32/rpcrt4           # Synced to Wine-1.3.26
reactos/dll/win32/rsabase          # Autosync
reactos/dll/win32/rsaenh           # Synced to Wine-1.7.1
reactos/dll/win32/sccbase          # Synced to Wine-1.7.1
reactos/dll/win32/schannel         # Synced to Wine-1.5.19
reactos/dll/win32/scrrun           # Synced to Wine-1.7.1
reactos/dll/win32/secur32          # Forked
reactos/dll/win32/security         # Forked (different .spec)
reactos/dll/win32/sensapi          # Synced to Wine-1.7.1
reactos/dll/win32/setupapi         # Forked at Wine-20050524
reactos/dll/win32/shdoclc          # Synced to Wine-1.5.19
reactos/dll/win32/shdocvw          # Synced to Wine-1.7.1
reactos/dll/win32/shell32          # Forked at Wine-20071011
reactos/dll/win32/shfolder         # Synced to Wine-1.7.1
reactos/dll/win32/shlwapi          # Synced to Wine-1.7.1
reactos/dll/win32/slbcsp           # Synced to Wine-1.7.1
reactos/dll/win32/snmpapi          # Synced to Wine-1.7.1
reactos/dll/win32/softpub          # Synced to Wine-1.5.19
reactos/dll/win32/spoolss          # Synced to Wine-1.7.1
reactos/dll/win32/stdole2.tlb      # Synced to Wine-1.5.19
reactos/dll/win32/stdole32.tlb     # Synced to Wine-1.5.19
reactos/dll/win32/sti              # Synced to Wine-1.7.1
reactos/dll/win32/sxs              # Synced to Wine-1.7.1
reactos/dll/win32/tapi32           # Synced to Wine-1.7.1
reactos/dll/win32/traffic          # Synced to Wine-1.5.19
reactos/dll/win32/twain_32         # Out of sync
reactos/dll/win32/unicows          # Synced to Wine-1.3.32 (Win9x only, why do we need this?!)
reactos/dll/win32/updspapi         # Synced to Wine-1.5.4
reactos/dll/win32/url              # Synced to Wine-1.5.19
reactos/dll/win32/urlmon           # Synced to Wine-1.7.1
reactos/dll/win32/usp10            # Synced to Wine-1.7.1
reactos/dll/win32/uxtheme          # Forked
reactos/dll/win32/vbscript         # Synced to Wine-1.7.1
reactos/dll/win32/version          # Autosync
reactos/dll/win32/wbemprox         # Synced to Wine-1.7.1
reactos/dll/win32/wer              # Autosync
reactos/dll/win32/windowscodecs    # Synced to Wine-1.7.1
reactos/dll/win32/windowscodecsext # Synced to Wine-1.7.1
reactos/dll/win32/winemp3.acm      # Synced to Wine-1.7.1
reactos/dll/win32/wing32           # Out of sync
reactos/dll/win32/winhttp          # Synced to Wine-1.7.1
reactos/dll/win32/wininet          # Synced to Wine-1.7.1
reactos/dll/win32/winmm            # Forked at Wine-20050628
reactos/dll/win32/winmm/midimap    # Forked at Wine-20050628
reactos/dll/win32/winmm/wavemap    # Forked at Wine-20050628
reactos/dll/win32/wintrust         # Synced to Wine-1.7.1
reactos/dll/win32/wldap32          # Synced to Wine-1.7.1
reactos/dll/win32/wmi              # Synced to Wine-1.7.1
reactos/dll/win32/wtsapi32         # Synced to Wine-1.7.1
reactos/dll/win32/wuapi            # Synced to Wine-1.7.1
reactos/dll/win32/xinput1_1        # Synced to Wine-1.7.1
reactos/dll/win32/xinput1_2        # Synced to Wine-1.7.1
reactos/dll/win32/xinput1_3        # Synced to Wine-1.7.1
reactos/dll/win32/xinput9_1_0      # Synced to Wine-1.7.1
reactos/dll/win32/xmllite          # Synced to Wine-1.7.1

reactos/dll/cpl/inetcpl            # Synced to Wine-1.3.21

ReactOS shares the following programs with Winehq.

reactos/base/applications/cmdutils/xcopy  # Synced to Wine-1.3.37
reactos/base/applications/games/winmine   # Forked at Wine-1_3_5
reactos/base/applications/extrac32        # Autosync
reactos/base/applications/iexplore        # Synced to Wine-1.5.26
reactos/base/applications/notepad         # Forked at Wine-20041201
reactos/base/applications/reg             # Autosync
reactos/base/applications/regedit         # Out of sync
reactos/base/applications/winhlp32        # Synced to Wine-1.5.26
reactos/base/applications/wordpad         # Synced to Wine-1.5.26
reactos/base/services/rpcss               # Synced to Wine-1.7.1
reactos/base/system/expand                # Synced to Wine-1.5.26
reactos/base/system/msiexec               # Synced to Wine-1.5.26
reactos/modules/rosapps/winfile           # Autosync

In addition the following libs, dlls and source files are mostly based on code ported
from Winehq CVS. If you are looking to update something in these files
check Wine current souces first as it may already be fixed.

reactos/lib/3rdparty/strmbase             # Synced to Wine-1.7.1
reactos/lib/sdk/uuid                      # Synced to Wine-1.1.42

advapi32 -
  reactos/dll/win32/advapi32/crypt/*.c          # Unknown
  reactos/dll/win32/advapi32/sec/cred.c         # Out of Sync
  reactos/dll/win32/advapi32/sec/sid.c          # Out of Sync

gdi32 -
  reactos/dll/win32/gdi32/objects/linedda.c     # Synced at 20090410

kernel32 -
  reactos/dll/win32/kernel32/wine/actctx.c               # Partly synced
  reactos/dll/win32/kernel32/wine/comm.c                 # Synced in r52754
  reactos/dll/win32/kernel32/wine/lzexpand.c             # Synced in r52754
  reactos/dll/win32/kernel32/wine/profile.c              # Synced in r52754
  reactos/dll/win32/kernel32/wine/res.c                  # Synced in r52754
  reactos/dll/win32/kernel32/winnls/string/casemap.c     # Synced in r52754
  reactos/dll/win32/kernel32/winnls/string/chartype.c    # Synced in r52754
  reactos/dll/win32/kernel32/winnls/string/collation.c   # Synced in r52754
  reactos/dll/win32/kernel32/winnls/string/format_msg.c  # Synced to Wine-1.5.4
  reactos/dll/win32/kernel32/winnls/string/lang.c        # Synced in r52754
  reactos/dll/win32/kernel32/winnls/string/lcformat.c    # Synced in r52754
  reactos/dll/win32/kernel32/winnls/string/nls.c         # Synced in r52754
  reactos/dll/win32/kernel32/winnls/string/sortkey.c     # Synced in r52754

msvcrt -
  reactos/lib/sdk/crt/except/cpp.c              # Synced at 20080528
  reactos/lib/sdk/crt/except/cppexcept.c        # Synced at 20071111
  reactos/lib/sdk/crt/string/scanf.c/h          # Synced to Wine-1_1_27
  reactos/lib/sdk/crt/strings/wcs.c             # Synced at 20080611
  reactos/lib/sdk/crt/wine/heap.c               # Synced at 20080529
  reactos/lib/sdk/crt/wine/undname.c            # Synced at 20081130
  reactos/lib/sdk/crt/thread/thread.c           # Synced at 20080604

User32 -
  reactos/dll/win32/user32/controls/button.c    # Synced to Wine-1_1_39
  reactos/dll/win32/user32/controls/combo.c     # Synced to Wine-1.5.10
  reactos/dll/win32/user32/controls/edit.c      # Synced to Wine-1_1_40
  reactos/dll/win32/user32/controls/icontitle.c # Synced to Wine-1_1_39
  reactos/dll/win32/user32/controls/listbox.c   # Synced to Wine-1_1_39
  reactos/dll/win32/user32/controls/scrollbar.c # Forked
  reactos/dll/win32/user32/controls/static.c    # Synced to Wine-1_1_39

  reactos/dll/win32/user32/include/dde_private.h # Synced to wine 1.1.24

  reactos/dll/win32/user32/misc/dde.c           # Synced to wine 1.1.24 (dde_misc.c)
  reactos/dll/win32/user32/misc/ddeclient.c     # Synced to Wine-1_1_23
  reactos/dll/win32/user32/misc/ddeserver.c     # Synced to Wine-1_1_23
  reactos/dll/win32/user32/misc/exticon.c       # Synced to Wine-1_1_22
  reactos/dll/win32/user32/misc/resources.c     # Forked?
  reactos/dll/win32/user32/misc/winhelp.c       # Last sync date unknown
  reactos/dll/win32/user32/misc/wsprintf.c      # Synced to Wine-1_1_23

  reactos/dll/win32/user32/windows/cursoricon   # Forked from wine 1.2-rc7
  reactos/dll/win32/user32/windows/defwnd.c     # Forked
  reactos/dll/win32/user32/windows/draw.c       # Forked at Wine-20020904 (uitools.c)
  reactos/dll/win32/user32/windows/mdi.c        # Synced to Wine-1_1_40
  reactos/dll/win32/user32/windows/menu.c       # Forked
  reactos/dll/win32/user32/windows/messagebox.c # Forked
  reactos/dll/win32/user32/windows/rect.c       # Forked (uitools.c)
  reactos/dll/win32/user32/windows/spy.c        # Synced to Wine-1_1_40
  reactos/dll/win32/user32/windows/text.c       # Forked (lstr.c)
  reactos/dll/win32/user32/windows/winpos.c     # Forked

ws2_32 -
  reactos/dll/win32/ws2_32/misc/async.c         # Synced to Wine-1.5.4

Update process for autosync DLLs

*** This process can only be done on Microsoft Windows ***
- Download wineimport.cmd at svn://svn.reactos.org/project-tools/trunk/
- Download cvs command line program and be sure to put it in your path
  (available at http://ftp.gnu.org/non-gnu/cvs/binary/stable/x86-woe/ )
- Download svn command line program and be sure to put it in your path
  (available at http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91 )
- Download patch command line program and be sure to put it in your path
  (available at http://gnuwin32.sourceforge.net/packages/patch.htm )
- Optionally, download junction.exe and put it in your path
  (available at http://www.sysinternals.com/Utilities/Junction.html )
- Cd to the directory containing wineimport.cmd
- Run
  "wineimport.cmd fullprocessing {path_to_your_reactos_directory} {name_of_the_wine_dll}"
- In case of error, you can
  1) add missing definitions to ReactOS headers
  2) fix {name_of_the_wine_dll}_ros.diff patch file, by removing outdated changes
  3) or modify Wine code, by adding a {name_of_the_wine_dll}_ros.diff patch,
     which will be applied after Wine source checkout
     DO NOT DIRECTLY MODIFY WINE SOURCE CODE
- Once Wine DLL compiles, install and run ReactOS and search for regressions
- In case of regression, you can
  1) Fix ReactOS code (not in the shared DLL)
  2) or update the {name_of_the_wine_dll}_ros.diff patch file
- Commit your changes with the "Autosyncing with Wine HEAD" commit message
