sync trunk head (37032)
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 27 Oct 2008 21:51:13 +0000 (21:51 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 27 Oct 2008 21:51:13 +0000 (21:51 +0000)
svn path=/branches/ros-amd64-bringup/; revision=37034

63 files changed:
1  2 
reactos/ReactOS-amd64.rbuild
reactos/ReactOS-i386.rbuild
reactos/base/applications/network/ping/ping.rbuild
reactos/base/applications/regedit/regedit.rbuild
reactos/boot/bootdata/packages/reactos.dff
reactos/dll/cpl/access/display.c
reactos/dll/cpl/appwiz-new/appwiz.rbuild
reactos/dll/cpl/appwiz/appwiz.rbuild
reactos/dll/cpl/desk/desk.rbuild
reactos/dll/cpl/input/input.rbuild
reactos/dll/cpl/intl/intl.rbuild
reactos/dll/cpl/joy/joy.rbuild
reactos/dll/cpl/main/main.rbuild
reactos/dll/cpl/main/mouse.c
reactos/dll/cpl/mmsys/mmsys.rbuild
reactos/dll/cpl/ncpa/ncpa.rbuild
reactos/dll/cpl/odbccp32/odbccp32.rbuild
reactos/dll/cpl/powercfg/powercfg.rbuild
reactos/dll/cpl/sysdm/sysdm.rbuild
reactos/dll/cpl/telephon/telephon.rbuild
reactos/dll/cpl/timedate/timedate.rbuild
reactos/dll/cpl/usrmgr/usrmgr.rbuild
reactos/dll/directx/ddraw/ddraw.rbuild
reactos/dll/directx/dsound/dsound.rbuild
reactos/dll/ntdll/ntdll.rbuild
reactos/dll/shellext/deskadp/deskadp.rbuild
reactos/dll/shellext/deskmon/deskmon.rbuild
reactos/dll/shellext/fontext/fontext.rbuild
reactos/dll/win32/advapi32/advapi32.rbuild
reactos/dll/win32/advapi32/reg/reg.c
reactos/dll/win32/advapi32/sec/misc.c
reactos/dll/win32/advapi32/service/sctrl.c
reactos/dll/win32/comctl32/comctl32.rbuild
reactos/dll/win32/crtdll/crtdll.rbuild
reactos/dll/win32/dhcpcsvc/dhcpcsvc.rbuild
reactos/dll/win32/fmifs/fmifs.rbuild
reactos/dll/win32/gdi32/gdi32.rbuild
reactos/dll/win32/icmp/icmp.rbuild
reactos/dll/win32/kernel32/kernel32.rbuild
reactos/dll/win32/lsasrv/lsasrv.rbuild
reactos/dll/win32/msvcrt/msvcrt.rbuild
reactos/dll/win32/msvcrt20/msvcrt20.rbuild
reactos/dll/win32/rpcrt4/rpcrt4.rbuild
reactos/dll/win32/secur32/secur32.rbuild
reactos/dll/win32/user32/misc/dde.c
reactos/dll/win32/user32/misc/stubs.c
reactos/dll/win32/user32/user32.rbuild
reactos/dll/win32/userenv/userenv.rbuild
reactos/dll/win32/winmm/midimap/midimap.rbuild
reactos/dll/win32/winspool/winspool.rbuild
reactos/dll/win32/ws2_32/ws2_32.rbuild
reactos/drivers/network/afd/afd/main.c
reactos/drivers/network/tcpip/tcpip/fileobjs.c
reactos/include/ddk/winddk.h
reactos/include/ndk/asm.h
reactos/include/psdk/intrin_x86.h
reactos/include/psdk/winnt.h
reactos/include/psdk/winuser.h
reactos/include/reactos/win32k/ntuser.h
reactos/lib/sdk/crt/crt.rbuild
reactos/subsystems/win32/csrss/api/process.c
reactos/subsystems/win32/csrss/csrss.rbuild
reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild

index cab9b3e,0000000..3cb37da
mode 100644,000000..100644
--- /dev/null
@@@ -1,182 -1,0 +1,231 @@@
 +<?xml version="1.0"?>
 +<!DOCTYPE project SYSTEM "tools/rbuild/project.dtd">
 +<project name="ReactOS" makefile="makefile-amd64.auto" xmlns:xi="http://www.w3.org/2001/XInclude">
 +      <xi:include href="config-amd64.rbuild">
 +              <xi:fallback>
 +                      <xi:include href="config-amd64.template.rbuild" />
 +              </xi:fallback>
 +      </xi:include>
 +
 +      <define name="_M_AMD64" />
 +      <define name="_AMD64_" />
 +      <define name="_M_AXP64" />
 +      <define name="__x86_64__" />
 +      <define name="_X86AMD64_" />
 +      <define name="_WIN64" />
++      <define name="TARGET_amd64" host="true" />
 +
 +      <property name="PLATFORM" value="PC"/>
 +      <property name="usewrc" value="false"/>
 +      <property name="WINEBUILD_FLAGS" value="--kill-at"/>
 +      <property name="NTOSKRNL_SHARED" value="-shared"/>
 +      <linkerflag>-enable-stdcall-fixup</linkerflag>
 +      <compilerflag>-U_X86_</compilerflag>
 +
 +      <if property="OPTIMIZE" value="1">
 +              <compilerflag>-Os</compilerflag>
 +              <compilerflag>-ftracer</compilerflag>
 +              <compilerflag>-momit-leaf-frame-pointer</compilerflag>
 +      </if>
 +      <if property="OPTIMIZE" value="2">
 +              <compilerflag>-Os</compilerflag>
 +      </if>
 +      <if property="OPTIMIZE" value="3">
 +              <compilerflag>-O1</compilerflag>
 +      </if>
 +      <if property="OPTIMIZE" value="4">
 +              <compilerflag>-O2</compilerflag>
 +      </if>
 +      <if property="OPTIMIZE" value="5">
 +              <compilerflag>-O3</compilerflag>
 +      </if>
 +
 +      <compilerflag>-mpreferred-stack-boundary=4</compilerflag>
 +      <compilerflag>-fno-strict-aliasing</compilerflag>
 +      <compilerflag>-Wno-strict-aliasing</compilerflag>
 +      <compilerflag>-Wpointer-arith</compilerflag>
 +      <compilerflag>-Wno-uninitialized</compilerflag>
 +      <linkerflag>-enable-stdcall-fixup</linkerflag>
 +      <linkerflag>-s</linkerflag>
 +      <linkerflag>-static</linkerflag>
 +
 +<!-- Here starts <xi:include href="ReactOS-generic.rbuild" /> -->
 +
 +      <xi:include href="baseaddress.rbuild" />
 +
 +      <define name="__REACTOS__" />
 +      <if property="DBG" value="1">
 +              <define name="DBG">1</define>
 +              <define name="_SEH_ENABLE_TRACE" />
 +              <property name="DBG_OR_KDBG" value="true" />
 +      </if>
 +      <if property="KDBG" value="1">
 +              <define name="KDBG">1</define>
 +              <property name="DBG_OR_KDBG" value="true" />
 +      </if>
 +
++      <!-- The version target valid values are: Nt4 , NT5 , NT51 -->
++      <property name="VERSION_TARGET" value="NT52" />
++
++      <if property="VERSION_TARGET" value="NT4">
++              <define name="WINVER" overridable="true">0x400</define>
++              <define name="_WIN32_IE">0x600</define>
++              <define name="_WIN32_WINNT" overridable="true">0x400</define>
++              <define name="_WIN32_WINDOWS">0x400</define>
++              <define name="_SETUPAPI_VER">0x400</define>
++      </if>
++
++      <if property="VERSION_TARGET" value="NT5">
++              <define name="WINVER" overridable="true">0x500</define>
++              <define name="_WIN32_IE">0x600</define>
++              <define name="_WIN32_WINNT" overridable="true">0x500</define>
++              <define name="_WIN32_WINDOWS">0x500</define>
++              <define name="_SETUPAPI_VER">0x500</define>
++      </if>
++
++      <if property="VERSION_TARGET" value="NT51">
++              <define name="WINVER" overridable="true">0x501</define>
++              <define name="_WIN32_IE">0x600</define>
++              <define name="_WIN32_WINNT" overridable="true">0x501</define>
++              <define name="_WIN32_WINDOWS">0x501</define>
++              <define name="_SETUPAPI_VER">0x501</define>
++      </if>
++
++      <if property="VERSION_TARGET" value="NT52">
++              <define name="WINVER" overridable="true">0x502</define>
++              <define name="_WIN32_IE">0x600</define>
++              <define name="_WIN32_WINNT" overridable="true">0x502</define>
++              <define name="_WIN32_WINDOWS">0x502</define>
++              <define name="_SETUPAPI_VER">0x502</define>
++      </if>
++
++      <if property="VERSION_TARGET" value="NT6">
++              <define name="WINVER" overridable="true">0x600</define>
++              <define name="_WIN32_IE">0x600</define>
++              <define name="_WIN32_WINNT" overridable="true">0x600</define>
++              <define name="_WIN32_WINDOWS">0x600</define>
++              <define name="_SETUPAPI_VER">0x600</define>
++      </if>
++
 +      <include>.</include>
 +      <include>include</include>
 +      <include root="intermediate">include</include>
 +      <include>include/psdk</include>
 +      <include root="intermediate">include/psdk</include>
 +      <include>include/dxsdk</include>
 +      <include root="intermediate">include/dxsdk</include>
 +      <include>include/crt</include>
 +      <include>include/crt/mingw32</include>
 +      <include>include/ddk</include>
 +      <include>include/GL</include>
 +      <include>include/ndk</include>
 +      <include>include/reactos</include>
 +      <include root="intermediate">include/reactos</include>
 +      <include root="intermediate">include/reactos/mc</include>
 +      <include>include/reactos/libs</include>
 +
++      <include host="true">include</include>
++      <include host="true" root="intermediate">include</include>
++      <include host="true">include/reactos</include>
++      <include host="true">include/reactos/wine</include>
++
 +      <!-- directory name="base">
 +              <xi:include href="base/base.rbuild" />
 +      </directory -->
 +
 +      <directory name="boot">
 +              <xi:include href="boot/boot.rbuild" />
 +      </directory>
 +
 +      <!-- directory name="dll">
 +              <xi:include href="dll/dll.rbuild" />
 +      </directory -->
 +
 +      <directory name="drivers">
 +              <directory name="base">
 +                      <xi:include href="drivers/base/directory.rbuild" />
 +              </directory>
 +              <directory name="filesystems">
 +                      <directory name="cdfs">
 +                              <xi:include href="drivers/filesystems/cdfs/cdfs.rbuild" />
 +                      </directory>
 +                      <directory name="fastfat">
 +                              <xi:include href="drivers/filesystems/fastfat/vfatfs.rbuild" />
 +                      </directory>
 +                      <directory name="ext2">
 +                              <!-- xi:include href="drivers/filesystems/ext2/ext2.rbuild" / -->
 +                      </directory>
 +              </directory>
 +              <directory name="input">
 +                      <xi:include href="drivers/input/directory.rbuild" />
 +              </directory>
 +              <directory name="network">
 +                      <directory name="ndis">
 +                              <xi:include href="drivers/network/ndis/ndis.rbuild" />
 +                      </directory>
 +                      <directory name="tcpip">
 +                              <xi:include href="drivers/network/tcpip/tcpip.rbuild" />
 +                      </directory>
 +              </directory>
 +              <directory name="setup">
 +                      <xi:include href="drivers/setup/directory.rbuild" />
 +              </directory>
 +              <directory name="storage">
 +                      <directory name="class">
 +                              <directory name="cdrom">
 +                                      <xi:include href="drivers/storage/class/cdrom/cdrom.rbuild" />
 +                              </directory>
 +                              <directory name="class2">
 +                                      <xi:include href="drivers/storage/class/class2/class2.rbuild" />
 +                              </directory>
 +                              <directory name="disk">
 +                                      <xi:include href="drivers/storage/class/disk/disk.rbuild" />
 +                              </directory>
 +                      </directory>
 +                      <directory name="floppy">
 +                              <xi:include href="drivers/storage/floppy/floppy.rbuild" />
 +                      </directory>
 +                      <directory name="ide">
 +                              <directory name="atapi">
 +                                      <xi:include href="drivers/storage/ide/atapi/atapi.rbuild" />
 +                              </directory>
 +                      </directory>
 +                      <directory name="port">
 +                              <xi:include href="drivers/storage/port/directory.rbuild" />
 +                      </directory>
 +                      <directory name="scsiport">
 +                              <xi:include href="drivers/storage/scsiport/scsiport.rbuild" />
 +                      </directory>
 +              </directory>
 +      </directory>
 +
 +      <directory name="hal">
 +              <xi:include href="hal/hal.rbuild" />
 +      </directory>
 +
 +      <directory name="include">
 +              <xi:include href="include/directory.rbuild" />
 +      </directory>
 +      <directory name="lib">
 +              <xi:include href="lib/lib.rbuild" />
 +      </directory>
 +
 +      <directory name="media">
 +              <xi:include href="media/media.rbuild" />
 +      </directory>
 +
 +      <directory name="ntoskrnl">
 +              <xi:include href="ntoskrnl/ntoskrnl-amd64hack.rbuild" />
 +      </directory>
 +
 +      <!-- directory name="subsystems">
 +              <xi:include href="subsystems/subsystems.rbuild" />
 +      </directory -->
 +
 +      <directory name="tools">
 +              <xi:include href="tools/tools.rbuild" />
 +      </directory>
 +
 +<!-- Here ends <xi:include href="ReactOS-generic.rbuild" /> -->
 +
 +</project>
        <define name="_M_IX86" />
        <define name="_X86_" />
        <define name="__i386__" />
+       <define name="TARGET_i386" host="true" />
  
        <property name="NTOSKRNL_SHARED" value="-file-alignment=0x1000 -section-alignment=0x1000 -shared"/>
 +      <property name="PLATFORM" value="PC"/>
  
        <if property="OPTIMIZE" value="1">
                <compilerflag>-Os</compilerflag>
@@@ -1,10 -1,8 +1,8 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
 -<module name="ping" type="win32cui" installbase="system32" installname="ping.exe">
 +<module name="ping" type="win32cui" installbase="system32" installname="ping.exe" allowwarnings="true">
        <include base="ping">.</include>
        <define name="__USE_W32_SOCKETS" />
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
        <library>kernel32</library>
        <library>ws2_32</library>
        <file>ping.c</file>
@@@ -1,17 -1,16 +1,15 @@@
  <?xml version="1.0"?>
  <!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
  <group xmlns:xi="http://www.w3.org/2001/XInclude">
 -<module name="regedit" type="win32gui" installname="regedit.exe">
 +<module name="regedit" type="win32gui" installname="regedit.exe" allowwarnings="true">
        <include base="regedit">.</include>
        <define name="UNICODE" />
        <define name="_UNICODE" />
-       <define name="_WIN32_IE">0x0501</define>
-       <define name="_WIN32_WINNT">0x0600</define>
        <library>uuid</library>
        <library>kernel32</library>
        <library>user32</library>
        <library>gdi32</library>
        <library>advapi32</library>
 -      <library>comdlg32</library>
        <library>ole32</library>
        <library>shell32</library>
        <library>comctl32</library>
@@@ -30,651 -30,635 +30,636 @@@ Signature = "$ReactOS$
  
  
  ; Base files
 -base\applications\cacls\cacls.exe                       1
 -base\applications\calc\calc.exe                         1
 -base\applications\charmap\charmap.exe                   1
 -base\applications\cmdutils\dbgprint\dbgprint.exe        1
 -base\applications\cmdutils\doskey\doskey.exe            1
 -base\applications\cmdutils\find\find.exe                1
 -base\applications\cmdutils\hostname\hostname.exe        1
 -base\applications\cmdutils\more\more.exe                1
 -base\applications\cmdutils\xcopy\xcopy.exe              1
 -base\applications\control\control.exe                   1
 -base\applications\mscutils\devmgmt\devmgmt.exe          1
 -base\applications\mscutils\eventvwr\eventvwr.exe        1
 -base\applications\games\solitaire\sol.exe               1
 -base\applications\games\winemine\winemine.exe           1
 -base\applications\hh\hh.exe                             1
 -base\applications\kbswitch\kbswitch.exe                 1
 -base\applications\kbswitch\kbsdll\kbsdll.dll            1
 -base\applications\logoff\logoff.exe                     1
 -base\applications\msconfig\msconfig.exe                 1
 -base\applications\mstsc\mstsc.exe                       1
 -base\applications\network\arp\arp.exe                   1
 -base\applications\network\dwnl\dwnl.exe                 1
 -base\applications\network\route\route.exe               1
 -base\applications\network\finger\finger.exe             1
 -base\applications\network\ftp\ftp.exe                   1
 -base\applications\network\ipconfig\ipconfig.exe         1
 -base\applications\network\netstat\netstat.exe           1
 -base\applications\network\ping\ping.exe                 1
 -base\applications\network\telnet\telnet.exe             1
 -base\applications\network\tracert\tracert.exe           1
 -base\applications\network\whois\whois.exe               1
 -base\applications\notepad\notepad.exe                   1
 -base\applications\regedit\regedit.exe                   4
 -base\applications\regedit\clb\clb.dll                   1
 -base\applications\sc\sc.exe                             1
 -base\applications\screensavers\3dtext\3dtext.scr        1
 -base\applications\screensavers\logon\logon.scr          1
 -base\applications\mscutils\servman\servman.exe          1
 -base\applications\shutdown\shutdown.exe                 1
 -base\applications\sndvol32\sndvol32.exe                 1
 -base\applications\taskmgr\taskmgr.exe                   1
 -base\applications\winhlp32\winhlp32.exe                 1
 -base\applications\wordpad\wordpad.exe                   1
 -
 -base\services\audiosrv\audiosrv.exe                 1
 -base\services\dhcp\dhcp.exe                         1
 -base\services\eventlog\eventlog.exe                 1
 -base\services\rpcss\rpcss.exe                       1
 -base\services\spoolsv\spoolsv.exe                   1
 -base\services\tcpsvcs\tcpsvcs.exe                   1
 -base\services\tcpsvcs\quotes                        5
 -base\services\umpnpmgr\umpnpmgr.exe                 1
 -
 -base\setup\setup\setup.exe                          1
 -base\setup\vmwinst\vmwinst.exe                      1
 -
 -base\shell\cmd\cmd.exe                              1
 -base\shell\explorer\explorer.exe                    4
 -base\shell\explorer\explorer-cfg-template.xml       4
 -base\shell\explorer\notifyhook\notifyhook.dll       1
 -base\shell\explorer-new\explorer_new.exe            4   optional
 -
 -base\system\autochk\autochk.exe                     1
 -base\system\bootok\bootok.exe                       1
 -base\system\format\format.exe                       1
 -base\system\lsass\lsass.exe                         1
 -base\system\msiexec\msiexec.exe                     1
 -base\system\regsvr32\regsvr32.exe                   1
 -base\system\rundll32\rundll32.exe                   1
 -base\system\services\services.exe                   1
 -base\system\userinit\userinit.exe                   1
 -base\system\winlogon\winlogon.exe                   1
 -base\system\expand\expand.exe                       1
 -base\system\smss\smss.exe                           1
 +;base\applications\cacls\cacls.exe                       1
 +;base\applications\calc\calc.exe                         1
 +;base\applications\charmap\charmap.exe                   1
 +;base\applications\cmdutils\dbgprint\dbgprint.exe        1
 +;base\applications\cmdutils\doskey\doskey.exe            1
 +;base\applications\cmdutils\find\find.exe                1
 +;base\applications\cmdutils\hostname\hostname.exe        1
 +;base\applications\cmdutils\more\more.exe                1
 +;base\applications\cmdutils\xcopy\xcopy.exe              1
 +;base\applications\control\control.exe                   1
 +;base\applications\mscutils\devmgmt\devmgmt.exe          1
 +;base\applications\mscutils\eventvwr\eventvwr.exe        1
 +;base\applications\games\solitaire\sol.exe               1
 +;base\applications\games\winemine\winemine.exe           1
 +;base\applications\hh\hh.exe                             1
 +;base\applications\kbswitch\kbswitch.exe                 1
 +;base\applications\kbswitch\kbsdll\kbsdll.dll            1
 +;base\applications\logoff\logoff.exe                     1
 +;base\applications\msconfig\msconfig.exe                 1
 +;base\applications\mstsc\mstsc.exe                       1
 +;base\applications\network\arp\arp.exe                   1
 +;base\applications\network\dwnl\dwnl.exe                 1
 +;base\applications\network\route\route.exe               1
 +;base\applications\network\finger\finger.exe             1
 +;base\applications\network\ftp\ftp.exe                   1
 +;base\applications\network\ipconfig\ipconfig.exe         1
 +;base\applications\network\netstat\netstat.exe           1
 +;base\applications\network\ping\ping.exe                 1
 +;base\applications\network\telnet\telnet.exe             1
 +;base\applications\network\tracert\tracert.exe           1
 +;base\applications\network\whois\whois.exe               1
 +;base\applications\notepad\notepad.exe                   1
 +;base\applications\regedit\regedit.exe                   4
 +;base\applications\regedit\clb\clb.dll                   1
 +;base\applications\sc\sc.exe                             1
 +;base\applications\screensavers\3dtext\3dtext.scr        1
 +;base\applications\screensavers\logon\logon.scr          1
 +;base\applications\mscutils\servman\servman.exe          1
 +;base\applications\shutdown\shutdown.exe                 1
 +;base\applications\sndvol32\sndvol32.exe                 1
 +;base\applications\taskmgr\taskmgr.exe                   1
 +;base\applications\winhlp32\winhlp32.exe                 1
 +;base\applications\wordpad\wordpad.exe                   1
 +
 +;base\services\audiosrv\audiosrv.exe                 1
 +;base\services\dhcp\dhcp.exe                         1
 +;base\services\eventlog\eventlog.exe                 1
 +;base\services\rpcss\rpcss.exe                       1
 +;base\services\spoolsv\spoolsv.exe                   1
 +;base\services\tcpsvcs\tcpsvcs.exe                   1
 +;base\services\tcpsvcs\quotes                        5
 +;base\services\umpnpmgr\umpnpmgr.exe                 1
 +;base\services\audiosrv\audiosrv.exe                 1
 +
 +;base\setup\setup\setup.exe                          1
 +;base\setup\vmwinst\vmwinst.exe                      1
 +
 +;base\shell\cmd\cmd.exe                              1
 +;base\shell\explorer\explorer.exe                    4
 +;base\shell\explorer\explorer-cfg-template.xml       4
 +;base\shell\explorer\notifyhook\notifyhook.dll       1
 +;base\shell\explorer-new\explorer_new.exe            4   optional
 +
 +;base\system\autochk\autochk.exe                     1
 +;base\system\bootok\bootok.exe                       1
 +;base\system\format\format.exe                       1
 +;base\system\lsass\lsass.exe                         1
 +;base\system\msiexec\msiexec.exe                     1
 +;base\system\regsvr32\regsvr32.exe                   1
 +;base\system\rundll32\rundll32.exe                   1
 +;base\system\services\services.exe                   1
 +;base\system\userinit\userinit.exe                   1
 +;base\system\winlogon\winlogon.exe                   1
 +;base\system\expand\expand.exe                       1
 +;base\system\smss\smss.exe                           1
  
  
  ; Dynamic Link Libraries
 -dll\3rdparty\freetype\freetype.dll                  1
 -dll\3rdparty\mesa32\mesa32.dll                      1
 -dll\3rdparty\dxtn\dxtn.dll                          1   optional
 -
 -dll\cpl\access\access.cpl                           1
 -dll\cpl\appwiz\appwiz.cpl                           1
 -dll\cpl\console\console.dll                         1
 -dll\cpl\desk\desk.cpl                               1
 -dll\cpl\intl\intl.cpl                               1
 -dll\cpl\main\main.cpl                               1
 -dll\cpl\mmsys\mmsys.cpl                             1
 -dll\cpl\ncpa\ncpa.cpl                               1
 -dll\cpl\powercfg\powercfg.cpl                       1
 -dll\cpl\sysdm\sysdm.cpl                             1
 -dll\cpl\timedate\timedate.cpl                       1
 -dll\cpl\input\input.dll                             1
 -dll\cpl\joy\joy.cpl                                 1
 -
 -dll\directx\dinput\dinput.dll                       1
 -dll\directx\dinput8\dinput8.dll                     1
 -dll\directx\dplay\dplay.dll                         1
 -dll\directx\dplayx\dplayx.dll                       1
 -dll\directx\dsound\dsound.dll                       1
 -dll\directx\dxdiagn\dxdiagn.dll                     1
 -dll\directx\ddraw\ddraw.dll                         1
 -dll\directx\d3d8thk\d3d8thk.dll                     1
 -dll\directx\devenum\devenum.dll                     1
 -dll\directx\ksproxy\ksproxy.ax                      1
 -dll\directx\ksuser\ksuser.dll                       1
 -dll\directx\msdmo\msdmo.dll                         1
 -dll\directx\quartz\quartz.dll                       1
 -dll\directx\qedit\qedit.dll                         1
 -dll\directx\wine\d3d8\d3d8.dll                      1
 -dll\directx\wine\wined3d\wined3d.dll                1
 -dll\directx\wine\d3d9\d3d9.dll                      1
 -
 -dll\keyboard\kbda1\kbda1.dll                        1
 -dll\keyboard\kbda2\kbda2.dll                        1
 -dll\keyboard\kbda3\kbda3.dll                        1
 -dll\keyboard\kbdal\kbdal.dll                        1
 -dll\keyboard\kbdarme\kbdarme.dll                    1
 -dll\keyboard\kbdarmw\kbdarmw.dll                    1
 -dll\keyboard\kbdaze\kbdaze.dll                      1
 -dll\keyboard\kbdazel\kbdazel.dll                    1
 -dll\keyboard\kbdbgm\kbdbgm.dll                      1
 -dll\keyboard\kbdbgt\kbdbgt.dll                      1
 -dll\keyboard\kbdblr\kbdblr.dll                      1
 -dll\keyboard\kbdbr\kbdbr.dll                        1
 -dll\keyboard\kbdbga\kbdbga.dll                      1
 -dll\keyboard\kbdbe\kbdbe.dll                        1
 -dll\keyboard\kbdbur\kbdbur.dll                      1
 -dll\keyboard\kbdcan\kbdcan.dll                      1
 -dll\keyboard\kbdcr\kbdcr.dll                        1
 -dll\keyboard\kbdcz1\kbdcz1.dll                      1
 -dll\keyboard\kbdda\kbdda.dll                        1
 -dll\keyboard\kbddv\kbddv.dll                        1
 -dll\keyboard\kbdes\kbdes.dll                        1
 -dll\keyboard\kbdest\kbdest.dll                      1
 -dll\keyboard\kbdfc\kbdfc.dll                        1
 -dll\keyboard\kbdfi\kbdfi.dll                        1
 -dll\keyboard\kbdfr\kbdfr.dll                        1
 -dll\keyboard\kbdgeo\kbdgeo.dll                      1
 -dll\keyboard\kbdgerg\kbdgerg.dll                    1
 -dll\keyboard\kbdgneo\kbdgneo.dll                    1
 -dll\keyboard\kbdgrist\kbdgrist.dll                  1
 -dll\keyboard\kbdgr\kbdgr.dll                        1
 -dll\keyboard\kbdhe\kbdhe.dll                        1
 -dll\keyboard\kbdheb\kbdheb.dll                      1
 -dll\keyboard\kbdhu\kbdhu.dll                        1
 -dll\keyboard\kbdic\kbdic.dll                        1
 -dll\keyboard\kbdinasa\kbdinasa.dll                  1
 -dll\keyboard\kbdinben\kbdinben.dll                  1
 -dll\keyboard\kbdindev\kbdindev.dll                  1
 -dll\keyboard\kbdinguj\kbdinguj.dll                  1
 -dll\keyboard\kbdinmal\kbdinmal.dll                  1
 -dll\keyboard\kbdir\kbdir.dll                        1
 -dll\keyboard\kbdit\kbdit.dll                        1
 -dll\keyboard\kbdja\kbdja.dll                        1
 -dll\keyboard\kbdkaz\kbdkaz.dll                      1
 -dll\keyboard\kbdla\kbdla.dll                        1
 -dll\keyboard\kbdlt\kbdlt.dll                        1
 -dll\keyboard\kbdlv\kbdlv.dll                        1
 -dll\keyboard\kbdmac\kbdmac.dll                      1
 -dll\keyboard\kbdne\kbdne.dll                        1
 -dll\keyboard\kbdno\kbdno.dll                        1
 -dll\keyboard\kbdpl1\kbdpl1.dll                      1
 -dll\keyboard\kbdpo\kbdpo.dll                        1
 -dll\keyboard\kbdro\kbdro.dll                        1
 -dll\keyboard\kbdru\kbdru.dll                        1
 -dll\keyboard\kbdru1\kbdru1.dll                      1
 -dll\keyboard\kbdsg\kbdsg.dll                        1
 -dll\keyboard\kbdsk\kbdsk.dll                        1
 -dll\keyboard\kbdsk1\kbdsk1.dll                      1
 -dll\keyboard\kbdsw\kbdsw.dll                        1
 -dll\keyboard\kbdtat\kbdtat.dll                      1
 -dll\keyboard\kbdth0\kbdth0.dll                      1
 -dll\keyboard\kbdth1\kbdth1.dll                      1
 -dll\keyboard\kbdth2\kbdth2.dll                      1
 -dll\keyboard\kbdth3\kbdth3.dll                      1
 -dll\keyboard\kbdtuf\kbdtuf.dll                      1
 -dll\keyboard\kbdtuq\kbdtuq.dll                      1
 -dll\keyboard\kbduk\kbduk.dll                        1
 -dll\keyboard\kbdur\kbdur.dll                        1
 -dll\keyboard\kbdurs\kbdurs.dll                      1
 -dll\keyboard\kbdus\kbdus.dll                        1
 -dll\keyboard\kbdusa\kbdusa.dll                      1
 -dll\keyboard\kbdusl\kbdusl.dll                      1
 -dll\keyboard\kbdusr\kbdusr.dll                      1
 -dll\keyboard\kbdusx\kbdusx.dll                      1
 -dll\keyboard\kbduzb\kbduzb.dll                      1
 -dll\keyboard\kbdvntc\kbdvntc.dll                    1
 -dll\keyboard\kbdycc\kbdycc.dll                      1
 -dll\keyboard\kbdycl\kbdycl.dll                      1
 -dll\keyboard\kbdko\kbdko.dll                        1
 -
 -dll\ntdll\ntdll.dll                                 1
 -
 -dll\win32\acledit\acledit.dll                       1
 -dll\win32\aclui\aclui.dll                           1
 -dll\win32\advapi32\advapi32.dll                     1
 -dll\win32\advpack\advpack.dll                       1
 -dll\win32\atl\atl.dll                               1
 -dll\win32\authz\authz.dll                           1
 -dll\win32\avifil32\avifil32.dll                     1
 -dll\win32\beepmidi\beepmidi.dll                     1
 -dll\win32\browseui\browseui.dll                     1
 -dll\win32\cabinet\cabinet.dll                       1
 -dll\win32\cards\cards.dll                           1
 -dll\win32\cfgmgr32\cfgmgr32.dll                     1
 -dll\win32\clusapi\clusapi.dll                       1
 -dll\win32\comcat\comcat.dll                         1
 -dll\win32\comctl32\comctl32.dll                     1
 -dll\win32\comdlg32\comdlg32.dll                     1
 -dll\win32\compstui\compstui.dll                     1
 -dll\win32\credui\credui.dll                         1
 -dll\win32\crtdll\crtdll.dll                         1
 -dll\win32\crypt32\crypt32.dll                       1
 -dll\win32\cryptdll\cryptdll.dll                     1
 -dll\win32\cryptnet\cryptnet.dll                     1
 -dll\win32\cryptui\cryptui.dll                       1
 -dll\win32\dbghelp\dbghelp.dll                       1
 -dll\win32\dciman32\dciman32.dll                     1
 -dll\win32\devmgr\devmgr.dll                         1
 -dll\win32\dhcpcsvc\dhcpcsvc.dll                     1
 -dll\win32\dnsapi\dnsapi.dll                         1
 -dll\win32\fmifs\fmifs.dll                           1
 -dll\win32\fusion\fusion.dll                         1
 -dll\win32\gdi32\gdi32.dll                           1
 -dll\win32\gdiplus\gdiplus.dll                       1
 -dll\win32\getuname\getuname.dll                     1
 -dll\win32\glu32\glu32.dll                           1
 -dll\win32\hhctrl.ocx\hhctrl.ocx                     1
 -dll\win32\hid\hid.dll                               1
 -dll\win32\hlink\hlink.dll                           1
 -dll\win32\icmp\icmp.dll                             1
 -dll\win32\imagehlp\imagehlp.dll                     1
 -dll\win32\imm32\imm32.dll                           1
 -dll\win32\inetcomm\inetcomm.dll                     1
 -dll\win32\inetmib1\inetmib1.dll                     1
 -dll\win32\iphlpapi\iphlpapi.dll                     1
 -dll\win32\jscript\jscript.dll                       1
 -dll\win32\kernel32\kernel32.dll                     1
 -dll\win32\lsasrv\lsasrv.dll                         1
 -dll\win32\lz32\lz32.dll                             1
 -dll\win32\mapi32\mapi32.dll                         1
 -dll\win32\mlang\mlang.dll                           1
 -dll\win32\mmdrv\mmdrv.dll                           1
 -dll\win32\modemui\modemui.dll                       1
 -dll\win32\mpr\mpr.dll                               1
 -dll\win32\mprapi\mprapi.dll                         1
 -dll\win32\msacm32\msacm32.dll                       1
 -dll\win32\msafd\msafd.dll                           1
 -dll\win32\mscoree\mscoree.dll                       1
 -dll\win32\msgina\msgina.dll                         1
 -dll\win32\mshtml\mshtml.dll                         1
 -dll\win32\mshtml.tlb\mshtml.tlb                     1
 -dll\win32\msi\msi.dll                               1
 -dll\win32\msimg32\msimg32.dll                       1
 -dll\win32\mstask\mstask.dll                         1
 -dll\win32\msvcrt\msvcrt.dll                         1
 -dll\win32\msvcrt20\msvcrt20.dll                     1
 -dll\win32\msvcrt40\msvcrt40.dll                     1
 -dll\win32\msvfw32\msvfw32.dll                       1
 -dll\win32\mswsock\mswsock.dll                       1
 -dll\win32\msxml3\msxml3.dll                         1
 -dll\win32\nddeapi\nddeapi.dll                       1
 -dll\win32\netapi32\netapi32.dll                     1
 -dll\win32\netcfgx\netcfgx.dll                       1
 -dll\win32\netid\netid.dll                           1
 -dll\win32\netshell\netshell.dll                     1
 -dll\win32\newdev\newdev.dll                         1
 -dll\win32\ntdsapi\ntdsapi.dll                       1
 -dll\win32\ntmarta\ntmarta.dll                       1
 -dll\win32\objsel\objsel.dll                         1
 -dll\win32\odbc32\odbc32.dll                         1
 -dll\win32\odbccp32\odbccp32.dll                     1
 -dll\win32\ole32\ole32.dll                           1
 -dll\win32\oleacc\oleacc.dll                         1
 -dll\win32\oleaut32\oleaut32.dll                     1
 -dll\win32\oledlg\oledlg.dll                         1
 -dll\win32\olepro32\olepro32.dll                     1
 -dll\win32\opengl32\opengl32.dll                     1
 -dll\win32\pdh\pdh.dll                               1
 -dll\win32\powrprof\powrprof.dll                     1
 -dll\win32\printui\printui.dll                       1
 -dll\win32\psapi\psapi.dll                           1
 -dll\win32\pstorec\pstorec.dll                       1
 -dll\win32\rasapi32\rasapi32.dll                     1
 -dll\win32\rasdlg\rasdlg.dll                         1
 -dll\win32\rasman\rasman.dll                         1
 -dll\win32\riched20\riched20.dll                     1
 -dll\win32\riched32\riched32.dll                     1
 -dll\win32\rpcrt4\rpcrt4.dll                         1
 -dll\win32\rsabase\rsabase.dll                       1
 -dll\win32\rsaenh\rsaenh.dll                         1
 -dll\win32\samlib\samlib.dll                         1
 -dll\win32\samsrv\samsrv.dll                         1
 -dll\win32\schannel\schannel.dll                     1
 -dll\win32\secur32\secur32.dll                       1
 -dll\win32\security\security.dll                     1
 -dll\win32\sensapi\sensapi.dll                       1
 -dll\win32\serialui\serialui.dll                     1
 -dll\win32\setupapi\setupapi.dll                     1
 -dll\win32\sfc\sfc.dll                               1
 -dll\win32\sfc_os\sfc_os.dll                         1
 -dll\win32\shdocvw\shdocvw.dll                       1
 -dll\win32\shell32\shell32.dll                       1
 -dll\win32\shfolder\shfolder.dll                     1
 -dll\win32\shimgvw\shimgvw.dll                       1
 -dll\win32\shlwapi\shlwapi.dll                       1
 -dll\win32\smdll\smdll.dll                           1
 -dll\win32\snmpapi\snmpapi.dll                       1
 -dll\win32\stdole2.tlb\stdole2.tlb                   1
 -dll\win32\stdole32.tlb\stdole32.tlb                 1
 -dll\win32\sxs\sxs.dll                               1
 -dll\win32\syssetup\syssetup.dll                     1
 -dll\win32\tapi32\tapi32.dll                         1
 -dll\win32\tapiui\tapiui.dll                         1
 -dll\win32\twain_32\twain_32.dll                     1
 -dll\win32\uext2\uext2.dll                           1
 -dll\win32\ufat\ufat.dll                             1
 -dll\win32\ufatx\ufatx.dll                           1   optional
 -dll\win32\untfs\untfs.dll                           1
 -dll\win32\urlmon\urlmon.dll                         1
 -dll\win32\user32\user32.dll                         1
 -dll\win32\userenv\userenv.dll                       1
 -dll\win32\usp10\usp10.dll                           1
 -dll\win32\uxtheme\uxtheme.dll                       1
 -dll\win32\vdmdbg\vdmdbg.dll                         1
 -dll\win32\version\version.dll                       1
 -dll\win32\winfax\winfax.dll                         1
 -dll\win32\winhttp\winhttp.dll                       1
 -dll\win32\wininet\wininet.dll                       1
 -dll\win32\winmm\winmm.dll                           1
 -dll\win32\winspool\winspool.drv                     1
 -dll\win32\winsta\winsta.dll                         1
 -dll\win32\wintrust\wintrust.dll                     1
 -dll\win32\wldap32\wldap32.dll                       1
 -dll\win32\ws2_32\ws2_32.dll                         1
 -dll\win32\ws2help\ws2help.dll                       1
 -dll\win32\wshirda\wshirda.dll                       1
 -dll\win32\wshtcpip\wshtcpip.dll                     1
 -dll\win32\wsock32\wsock32.dll                       1
 -dll\win32\wtsapi32\wtsapi32.dll                     1
 -dll\win32\winmm\midimap\midimap.dll                 1
 -dll\win32\winmm\wavemap\msacm32.drv                 1   optional
 +;dll\3rdparty\freetype\freetype.dll                  1
 +;dll\3rdparty\mesa32\mesa32.dll                      1
 +;dll\3rdparty\dxtn\dxtn.dll                          1   optional
 +
 +;dll\cpl\access\access.cpl                           1
 +;dll\cpl\appwiz\appwiz.cpl                           1
 +;dll\cpl\console\console.dll                         1
 +;dll\cpl\desk\desk.cpl                               1
 +;dll\cpl\intl\intl.cpl                               1
 +;dll\cpl\main\main.cpl                               1
 +;dll\cpl\mmsys\mmsys.cpl                             1
 +;dll\cpl\ncpa\ncpa.cpl                               1
 +;dll\cpl\powercfg\powercfg.cpl                       1
 +;dll\cpl\sysdm\sysdm.cpl                             1
 +;dll\cpl\timedate\timedate.cpl                       1
 +;dll\cpl\input\input.dll                             1
 +;dll\cpl\joy\joy.cpl                                 1
 +
 +;dll\directx\dinput\dinput.dll                       1
 +;dll\directx\dinput8\dinput8.dll                     1
 +;dll\directx\dplay\dplay.dll                         1
 +;dll\directx\dplayx\dplayx.dll                       1
 +;dll\directx\dsound\dsound.dll                       1
 +;dll\directx\dxdiagn\dxdiagn.dll                     1
 +;dll\directx\ddraw\ddraw.dll                         1
 +;dll\directx\d3d8thk\d3d8thk.dll                     1
 +;dll\directx\devenum\devenum.dll                     1
 +;dll\directx\ksproxy\ksproxy.ax                      1
 +;dll\directx\ksuser\ksuser.dll                       1
 +;dll\directx\msdmo\msdmo.dll                         1
 +;dll\directx\quartz\quartz.dll                       1
 +;dll\directx\qedit\qedit.dll                         1
 +;dll\directx\wine\d3d8\d3d8.dll                      1
 +;dll\directx\wine\wined3d\wined3d.dll                1
 +;dll\directx\wine\d3d9\d3d9.dll                      1
 +
 +;dll\keyboard\kbda1\kbda1.dll                        1
 +;dll\keyboard\kbda2\kbda2.dll                        1
 +;dll\keyboard\kbda3\kbda3.dll                        1
 +;dll\keyboard\kbdal\kbdal.dll                        1
 +;dll\keyboard\kbdarme\kbdarme.dll                    1
 +;dll\keyboard\kbdarmw\kbdarmw.dll                    1
 +;dll\keyboard\kbdaze\kbdaze.dll                      1
 +;dll\keyboard\kbdazel\kbdazel.dll                    1
 +;dll\keyboard\kbdbgm\kbdbgm.dll                      1
 +;dll\keyboard\kbdbgt\kbdbgt.dll                      1
 +;dll\keyboard\kbdblr\kbdblr.dll                      1
 +;dll\keyboard\kbdbr\kbdbr.dll                        1
 +;dll\keyboard\kbdbga\kbdbga.dll                      1
 +;dll\keyboard\kbdbe\kbdbe.dll                        1
 +;dll\keyboard\kbdbur\kbdbur.dll                      1
 +;dll\keyboard\kbdcan\kbdcan.dll                      1
 +;dll\keyboard\kbdcr\kbdcr.dll                        1
 +;dll\keyboard\kbdcz1\kbdcz1.dll                      1
 +;dll\keyboard\kbdda\kbdda.dll                        1
 +;dll\keyboard\kbddv\kbddv.dll                        1
 +;dll\keyboard\kbdes\kbdes.dll                        1
 +;dll\keyboard\kbdest\kbdest.dll                      1
 +;dll\keyboard\kbdfc\kbdfc.dll                        1
 +;dll\keyboard\kbdfi\kbdfi.dll                        1
 +;dll\keyboard\kbdfr\kbdfr.dll                        1
 +;dll\keyboard\kbdgeo\kbdgeo.dll                      1
 +;dll\keyboard\kbdgerg\kbdgerg.dll                    1
 +;dll\keyboard\kbdgneo\kbdgneo.dll                    1
 +;dll\keyboard\kbdgrist\kbdgrist.dll                  1
 +;dll\keyboard\kbdgr\kbdgr.dll                        1
 +;dll\keyboard\kbdhe\kbdhe.dll                        1
 +;dll\keyboard\kbdheb\kbdheb.dll                      1
 +;dll\keyboard\kbdhu\kbdhu.dll                        1
 +;dll\keyboard\kbdic\kbdic.dll                        1
 +;dll\keyboard\kbdinasa\kbdinasa.dll                  1
 +;dll\keyboard\kbdinben\kbdinben.dll                  1
 +;dll\keyboard\kbdindev\kbdindev.dll                  1
 +;dll\keyboard\kbdinguj\kbdinguj.dll                  1
 +;dll\keyboard\kbdinmal\kbdinmal.dll                  1
 +;dll\keyboard\kbdir\kbdir.dll                        1
 +;dll\keyboard\kbdit\kbdit.dll                        1
 +;dll\keyboard\kbdja\kbdja.dll                        1
 +;dll\keyboard\kbdkaz\kbdkaz.dll                      1
 +;dll\keyboard\kbdla\kbdla.dll                        1
 +;dll\keyboard\kbdlt\kbdlt.dll                        1
 +;dll\keyboard\kbdlv\kbdlv.dll                        1
 +;dll\keyboard\kbdmac\kbdmac.dll                      1
 +;dll\keyboard\kbdne\kbdne.dll                        1
 +;dll\keyboard\kbdno\kbdno.dll                        1
 +;dll\keyboard\kbdpl1\kbdpl1.dll                      1
 +;dll\keyboard\kbdpo\kbdpo.dll                        1
 +;dll\keyboard\kbdro\kbdro.dll                        1
 +;dll\keyboard\kbdru\kbdru.dll                        1
 +;dll\keyboard\kbdru1\kbdru1.dll                      1
 +;dll\keyboard\kbdsg\kbdsg.dll                        1
 +;dll\keyboard\kbdsk\kbdsk.dll                        1
 +;dll\keyboard\kbdsk1\kbdsk1.dll                      1
 +;dll\keyboard\kbdsw\kbdsw.dll                        1
 +;dll\keyboard\kbdtat\kbdtat.dll                      1
 +;dll\keyboard\kbdth0\kbdth0.dll                      1
 +;dll\keyboard\kbdth1\kbdth1.dll                      1
 +;dll\keyboard\kbdth2\kbdth2.dll                      1
 +;dll\keyboard\kbdth3\kbdth3.dll                      1
 +;dll\keyboard\kbdtuf\kbdtuf.dll                      1
 +;dll\keyboard\kbdtuq\kbdtuq.dll                      1
 +;dll\keyboard\kbduk\kbduk.dll                        1
 +;dll\keyboard\kbdur\kbdur.dll                        1
 +;dll\keyboard\kbdurs\kbdurs.dll                      1
 +;dll\keyboard\kbdus\kbdus.dll                        1
 +;dll\keyboard\kbdusa\kbdusa.dll                      1
 +;dll\keyboard\kbdusl\kbdusl.dll                      1
 +;dll\keyboard\kbdusr\kbdusr.dll                      1
 +;dll\keyboard\kbdusx\kbdusx.dll                      1
 +;dll\keyboard\kbduzb\kbduzb.dll                      1
 +;dll\keyboard\kbdvntc\kbdvntc.dll                    1
 +;dll\keyboard\kbdycc\kbdycc.dll                      1
 +;dll\keyboard\kbdycl\kbdycl.dll                      1
 +;dll\keyboard\kbdko\kbdko.dll                        1
 +
 +;dll\nt;dll\ntdll.dll                                 1
 +
 +;dll\win32\acledit\acledit.dll                       1
 +;dll\win32\aclui\aclui.dll                           1
 +;dll\win32\advapi32\advapi32.dll                     1
 +;dll\win32\advpack\advpack.dll                       1
 +;dll\win32\atl\atl.dll                               1
 +;dll\win32\authz\authz.dll                           1
 +;dll\win32\avifil32\avifil32.dll                     1
 +;dll\win32\beepmidi\beepmidi.dll                     1
 +;dll\win32\browseui\browseui.dll                     1
 +;dll\win32\cabinet\cabinet.dll                       1
 +;dll\win32\cards\cards.dll                           1
 +;dll\win32\cfgmgr32\cfgmgr32.dll                     1
 +;dll\win32\clusapi\clusapi.dll                       1
 +;dll\win32\comcat\comcat.dll                         1
 +;dll\win32\comctl32\comctl32.dll                     1
 +;dll\win32\comdlg32\comdlg32.dll                     1
 +;dll\win32\compstui\compstui.dll                     1
 +;dll\win32\credui\credui.dll                         1
 +;dll\win32\crtdll\crtdll.dll                         1
 +;dll\win32\crypt32\crypt32.dll                       1
 +;dll\win32\cryptdll\cryptdll.dll                     1
 +;dll\win32\cryptnet\cryptnet.dll                     1
 +;dll\win32\cryptui\cryptui.dll                       1
 +;dll\win32\dbghelp\dbghelp.dll                       1
 +;dll\win32\dciman32\dciman32.dll                     1
 +;dll\win32\devmgr\devmgr.dll                         1
 +;dll\win32\dhcpcsvc\dhcpcsvc.dll                     1
 +;dll\win32\dnsapi\dnsapi.dll                         1
 +;dll\win32\fmifs\fmifs.dll                           1
 +;dll\win32\fusion\fusion.dll                         1
 +;dll\win32\gdi32\gdi32.dll                           1
 +;dll\win32\gdiplus\gdiplus.dll                       1
 +;dll\win32\getuname\getuname.dll                     1
 +;dll\win32\glu32\glu32.dll                           1
 +;dll\win32\hhctrl.ocx\hhctrl.ocx                     1
 +;dll\win32\hid\hid.dll                               1
 +;dll\win32\hlink\hlink.dll                           1
 +;dll\win32\icmp\icmp.dll                             1
 +;dll\win32\imagehlp\imagehlp.dll                     1
 +;dll\win32\imm32\imm32.dll                           1
 +;dll\win32\inetcomm\inetcomm.dll                     1
 +;dll\win32\inetmib1\inetmib1.dll                     1
 +;dll\win32\iphlpapi\iphlpapi.dll                     1
 +;dll\win32\jscript\jscript.dll                       1
 +;dll\win32\kernel32\kernel32.dll                     1
 +;dll\win32\lsasrv\lsasrv.dll                         1
 +;dll\win32\lz32\lz32.dll                             1
 +;dll\win32\mapi32\mapi32.dll                         1
 +;dll\win32\mlang\mlang.dll                           1
 +;dll\win32\mmdrv\mmdrv.dll                           1
 +;dll\win32\modemui\modemui.dll                       1
 +;dll\win32\mpr\mpr.dll                               1
 +;dll\win32\mprapi\mprapi.dll                         1
 +;dll\win32\msacm32\msacm32.dll                       1
 +;dll\win32\msafd\msafd.dll                           1
 +;dll\win32\mscoree\mscoree.dll                       1
 +;dll\win32\msgina\msgina.dll                         1
 +;dll\win32\mshtml\mshtml.dll                         1
 +;dll\win32\mshtml.tlb\mshtml.tlb                     1
 +;dll\win32\msi\msi.dll                               1
 +;dll\win32\msimg32\msimg32.dll                       1
 +;dll\win32\mstask\mstask.dll                         1
 +;dll\win32\msvcrt\msvcrt.dll                         1
 +;dll\win32\msvcrt20\msvcrt20.dll                     1
 +;dll\win32\msvcrt40\msvcrt40.dll                     1
 +;dll\win32\msvfw32\msvfw32.dll                       1
 +;dll\win32\mswsock\mswsock.dll                       1
 +;dll\win32\msxml3\msxml3.dll                         1
 +;dll\win32\nddeapi\nddeapi.dll                       1
 +;dll\win32\netapi32\netapi32.dll                     1
 +;dll\win32\netcfgx\netcfgx.dll                       1
 +;dll\win32\netid\netid.dll                           1
 +;dll\win32\netshell\netshell.dll                     1
 +;dll\win32\newdev\newdev.dll                         1
 +;dll\win32\ntdsapi\ntdsapi.dll                       1
 +;dll\win32\ntmarta\ntmarta.dll                       1
 +;dll\win32\objsel\objsel.dll                         1
 +;dll\win32\odbc32\odbc32.dll                         1
 +;dll\win32\odbccp32\odbccp32.dll                     1
 +;dll\win32\ole32\ole32.dll                           1
 +;dll\win32\oleacc\oleacc.dll                         1
 +;dll\win32\oleaut32\oleaut32.dll                     1
 +;dll\win32\oledlg\oledlg.dll                         1
 +;dll\win32\olepro32\olepro32.dll                     1
 +;dll\win32\opengl32\opengl32.dll                     1
 +;dll\win32\pdh\pdh.dll                               1
 +;dll\win32\powrprof\powrprof.dll                     1
 +;dll\win32\printui\printui.dll                       1
 +;dll\win32\psapi\psapi.dll                           1
 +;dll\win32\pstorec\pstorec.dll                       1
 +;dll\win32\rasapi32\rasapi32.dll                     1
 +;dll\win32\rasdlg\rasdlg.dll                         1
 +;dll\win32\rasman\rasman.dll                         1
 +;dll\win32\riched20\riched20.dll                     1
 +;dll\win32\riched32\riched32.dll                     1
 +;dll\win32\rpcrt4\rpcrt4.dll                         1
 +;dll\win32\rsabase\rsabase.dll                       1
 +;dll\win32\rsaenh\rsaenh.dll                         1
 +;dll\win32\samlib\samlib.dll                         1
 +;dll\win32\samsrv\samsrv.dll                         1
 +;dll\win32\schannel\schannel.dll                     1
 +;dll\win32\secur32\secur32.dll                       1
 +;dll\win32\security\security.dll                     1
 +;dll\win32\sensapi\sensapi.dll                       1
 +;dll\win32\serialui\serialui.dll                     1
 +;dll\win32\setupapi\setupapi.dll                     1
 +;dll\win32\sfc\sfc.dll                               1
 +;dll\win32\sfc_os\sfc_os.dll                         1
 +;dll\win32\shdocvw\shdocvw.dll                       1
 +;dll\win32\shell32\shell32.dll                       1
 +;dll\win32\shfolder\shfolder.dll                     1
 +;dll\win32\shimgvw\shimgvw.dll                       1
 +;dll\win32\shlwapi\shlwapi.dll                       1
 +;dll\win32\smdll\smdll.dll                           1
 +;dll\win32\snmpapi\snmpapi.dll                       1
 +;dll\win32\stdole2.tlb\stdole2.tlb                   1
 +;dll\win32\stdole32.tlb\stdole32.tlb                 1
 +;dll\win32\sxs\sxs.dll                               1
 +;dll\win32\syssetup\syssetup.dll                     1
 +;dll\win32\tapi32\tapi32.dll                         1
 +;dll\win32\tapiui\tapiui.dll                         1
 +;dll\win32\twain_32\twain_32.dll                     1
 +;dll\win32\uext2\uext2.dll                           1
 +;dll\win32\ufat\ufat.dll                             1
 +;dll\win32\ufatx\ufatx.dll                           1   optional
 +;dll\win32\untfs\untfs.dll                           1
 +;dll\win32\urlmon\urlmon.dll                         1
 +;dll\win32\user32\user32.dll                         1
 +;dll\win32\userenv\userenv.dll                       1
 +;dll\win32\usp10\usp10.dll                           1
 +;dll\win32\uxtheme\uxtheme.dll                       1
 +;dll\win32\vdmdbg\vdmdbg.dll                         1
 +;dll\win32\version\version.dll                       1
 +;dll\win32\winfax\winfax.dll                         1
 +;dll\win32\winhttp\winhttp.dll                       1
 +;dll\win32\wininet\wininet.dll                       1
 +;dll\win32\winmm\winmm.dll                           1
 +;dll\win32\winspool\winspool.drv                     1
 +;dll\win32\winsta\winsta.dll                         1
 +;dll\win32\wintrust\wintrust.dll                     1
 +;dll\win32\wldap32\wldap32.dll                       1
 +;dll\win32\ws2_32\ws2_32.dll                         1
 +;dll\win32\ws2help\ws2help.dll                       1
 +;dll\win32\wshirda\wshirda.dll                       1
 +;dll\win32\wshtcpip\wshtcpip.dll                     1
 +;dll\win32\wsock32\wsock32.dll                       1
 +;dll\win32\wtsapi32\wtsapi32.dll                     1
 +;dll\win32\winmm\midimap\midimap.dll                 1
 +;dll\win32\winmm\wavemap\msacm32.drv                 1   optional
  
  ; Shell Extensions
 -dll\shellext\deskadp\deskadp.dll                    1
 -dll\shellext\deskmon\deskmon.dll                    1
 +;dll\shellext\deskadp\deskadp.dll                    1
 +;dll\shellext\deskmon\deskmon.dll                    1
  
  ; Drivers
 -drivers\base\bootvid\bootvid.dll                    1
 -drivers\base\beep\beep.sys                          2
 -drivers\base\null\null.sys                          2
 +;drivers\base\bootvid\bootvid.dll                    1
 +;drivers\base\beep\beep.sys                          2
 +;drivers\base\null\null.sys                          2
  
 -drivers\bus\isapnp\isapnp.sys                       2
 +;drivers\bus\isapnp\isapnp.sys                       2
  
 -drivers\directx\dxapi\dxapi.sys                     2
 -drivers\directx\dxg\dxg.sys                         2
 -drivers\directx\dxgthk\dxgthk.sys                   2
 +;drivers\directx\dxapi\dxapi.sys                     2
 +;drivers\directx\dxg\dxg.sys                         2
 +;drivers\directx\dxgthk\dxgthk.sys                   2
  
 -drivers\filesystems\fs_rec\fs_rec.sys               2
 -drivers\filesystems\msfs\msfs.sys                   2
 -drivers\filesystems\mup\mup.sys                     2
 -drivers\filesystems\npfs\npfs.sys                   2
 +;drivers\filesystems\fs_rec\fs_rec.sys               2
 +;drivers\filesystems\msfs\msfs.sys                   2
 +;drivers\filesystems\mup\mup.sys                     2
 +;drivers\filesystems\npfs\npfs.sys                   2
  
 -drivers\input\mouclass\mouclass.sys                 2
 -drivers\input\sermouse\sermouse.sys                 2
 +;drivers\input\mouclass\mouclass.sys                 2
 +;drivers\input\sermouse\sermouse.sys                 2
  
 -drivers\network\afd\afd.sys                         2
 -drivers\network\ndis\ndis.sys                       2
 -drivers\network\tcpip\tcpip.sys                     2
 -drivers\network\tdi\tdi.sys                         2
 -drivers\network\dd\ne2000\ne2000.sys                2
 -drivers\network\dd\pcnet\pcnet.sys                  2
 +;drivers\network\afd\afd.sys                         2
 +;drivers\network\ndis\ndis.sys                       2
 +;drivers\network\tcpip\tcpip.sys                     2
 +;drivers\network\tdi\tdi.sys                         2
 +;drivers\network\dd\ne2000\ne2000.sys                2
 +;drivers\network\dd\pcnet\pcnet.sys                  2
  
 -drivers\serial\serenum\serenum.sys                  2
 -drivers\serial\serial\serial.sys                    2
 +;drivers\serial\serenum\serenum.sys                  2
 +;drivers\serial\serial\serial.sys                    2
  
 -drivers\storage\ide\pciide\pciide.sys               2
 -drivers\storage\ide\pciidex\pciidex.sys             2
 +;drivers\storage\ide\pciide\pciide.sys               2
 +;drivers\storage\ide\pciidex\pciidex.sys             2
  
 -;drivers\usb\miniport\usbohci\usbohci.sys           2
 -;drivers\usb\miniport\usbuhci\usbuhci.sys           2
 -;drivers\usb\usbhub\usbhub.sys                      2
 -;drivers\usb\usbport\usbport.sys                    2
 -drivers\usb\nt4compat\usbdriver\usbdriver.sys       2
 +;;drivers\usb\miniport\usbohci\usbohci.sys           2
 +;;drivers\usb\miniport\usbuhci\usbuhci.sys           2
 +;;drivers\usb\usbhub\usbhub.sys                      2
 +;;drivers\usb\usbport\usbport.sys                    2
 +;drivers\usb\nt4compat\usbdriver\usbdriver.sys       2
  
 -drivers\video\displays\vga\vgaddi.dll               1
 -drivers\video\displays\framebuf\framebuf.dll        1
 -drivers\video\miniport\vga\vgamp.sys                2
 -drivers\video\miniport\vbe\vbemp.sys                2
 -drivers\video\videoprt\videoprt.sys                 2
 +;drivers\video\displays\vga\vgaddi.dll               1
 +;drivers\video\displays\framebuf\framebuf.dll        1
 +;drivers\video\miniport\vga\vgamp.sys                2
 +;drivers\video\miniport\vbe\vbemp.sys                2
 +;drivers\video\videoprt\videoprt.sys                 2
  
 -drivers\wmi\wmilib.sys                              2
 +;drivers\wmi\wmilib.sys                              2
  
  ; Media
 -media\fonts\DejaVuSans.ttf                          3
 -media\fonts\DejaVuSans-Bold.ttf                     3
 -media\fonts\DejaVuSans-BoldOblique.ttf              3
 -media\fonts\DejaVuSansMono.ttf                      3
 -media\fonts\DejaVuSansMono-Bold.ttf                 3
 -media\fonts\DejaVuSansMono-BoldOblique.ttf          3
 -media\fonts\DejaVuSansMono-Oblique.ttf              3
 -media\fonts\DejaVuSans-Oblique.ttf                  3
 -media\fonts\DejaVuSerif.ttf                         3
 -media\fonts\DejaVuSerif-Bold.ttf                    3
 -media\fonts\DejaVuSerif-BoldItalic.ttf              3
 -media\fonts\DejaVuSerif-Italic.ttf                  3
 -
 -media\fonts\FreeMono.ttf                            3
 -media\fonts\FreeMonoBold.ttf                        3
 -media\fonts\FreeMonoBoldOblique.ttf                 3
 -media\fonts\FreeMonoOblique.ttf                     3
 -
 -media\fonts\LiberationMono-Bold.ttf                 3
 -media\fonts\LiberationMono-BoldItalic.ttf           3
 -media\fonts\LiberationMono-Italic.ttf               3
 -media\fonts\LiberationMono-Regular.ttf              3
 -media\fonts\LiberationSans-Bold.ttf                 3
 -media\fonts\LiberationSans-BoldItalic.ttf           3
 -media\fonts\LiberationSans-Italic.ttf               3
 -media\fonts\LiberationSans-Regular.ttf              3
 -media\fonts\LiberationSerif-Bold.ttf                3
 -media\fonts\LiberationSerif-BoldItalic.ttf          3
 -media\fonts\LiberationSerif-Italic.ttf              3
 -media\fonts\LiberationSerif-Regular.ttf             3
 -
 -media\fonts\Marlett.ttf                             3
 -media\fonts\tahoma.ttf                              3
 -media\fonts\tahomabd.ttf                            3
 -
 -media\nls\c_037.nls                                 1
 -media\nls\c_500.nls                                 1
 -media\nls\c_737.nls                                 1
 -media\nls\c_775.nls                                 1
 -media\nls\c_850.nls                                 1
 -media\nls\c_852.nls                                 1
 -media\nls\c_855.nls                                 1
 -media\nls\c_856.nls                                 1
 -media\nls\c_857.nls                                 1
 -media\nls\c_860.nls                                 1
 -media\nls\c_861.nls                                 1
 -media\nls\c_862.nls                                 1
 -media\nls\c_863.nls                                 1
 -media\nls\c_864.nls                                 1
 -media\nls\c_865.nls                                 1
 -media\nls\c_866.nls                                 1
 -media\nls\c_869.nls                                 1
 -media\nls\c_874.nls                                 1
 -media\nls\c_875.nls                                 1
 -media\nls\c_878.nls                                 1
 -media\nls\c_932.nls                                 1
 -media\nls\c_936.nls                                 1
 -media\nls\c_949.nls                                 1
 -media\nls\c_950.nls                                 1
 -media\nls\c_1006.nls                                1
 -media\nls\c_1026.nls                                1
 -media\nls\c_1250.nls                                1
 -media\nls\c_1251.nls                                1
 -media\nls\c_1253.nls                                1
 -media\nls\c_1254.nls                                1
 -media\nls\c_1255.nls                                1
 -media\nls\c_1256.nls                                1
 -media\nls\c_1257.nls                                1
 -media\nls\c_1258.nls                                1
 -media\nls\c_10000.nls                               1
 -media\nls\c_10006.nls                               1
 -media\nls\c_10007.nls                               1
 -media\nls\c_10029.nls                               1
 -media\nls\c_10079.nls                               1
 -media\nls\c_10081.nls                               1
 -media\nls\c_20866.nls                               1
 -media\nls\c_28591.nls                               1
 -media\nls\c_28592.nls                               1
 -media\nls\c_28593.nls                               1
 -media\nls\c_28594.nls                               1
 -media\nls\c_28595.nls                               1
 -media\nls\c_28596.nls                               1
 -media\nls\c_28597.nls                               1
 -media\nls\c_28598.nls                               1
 -media\nls\c_28599.nls                               1
 -media\drivers\etc\services                          5
 -media\inf\acpi.inf                                  6
 -media\inf\cdrom.inf                                 6
 -media\inf\display.inf                               6
 -media\inf\font.inf                                  6
 -media\inf\hdc.inf                                   6
 -media\inf\intl.inf                                  6
 -media\inf\layout.inf                                6
 -media\inf\machine.inf                               6
 -media\inf\msmouse.inf                               6
 -media\inf\keyboard.inf                              6
 -media\inf\NET_NIC.inf                               6
 -media\inf\netamd.inf                                6
 -media\inf\netisa.inf                                6
 -media\inf\netrtpnt.inf                              6
 -media\inf\nettcpip.inf                              6
 -media\inf\ports.inf                                 6
 -media\inf\scsi.inf                                  6
 -media\inf\syssetup.inf                              6
 -media\inf\usbport.inf                               6
 -media\inf\usb.inf                                   6
 -media\inf\usbstor.inf                               6
 -media\inf\xboxdisp.inf                              6
 +;media\fonts\DejaVuSans.ttf                          3
 +;media\fonts\DejaVuSans-Bold.ttf                     3
 +;media\fonts\DejaVuSans-BoldOblique.ttf              3
 +;media\fonts\DejaVuSansMono.ttf                      3
 +;media\fonts\DejaVuSansMono-Bold.ttf                 3
 +;media\fonts\DejaVuSansMono-BoldOblique.ttf          3
 +;media\fonts\DejaVuSansMono-Oblique.ttf              3
 +;media\fonts\DejaVuSans-Oblique.ttf                  3
 +;media\fonts\DejaVuSerif.ttf                         3
 +;media\fonts\DejaVuSerif-Bold.ttf                    3
 +;media\fonts\DejaVuSerif-BoldItalic.ttf              3
 +;media\fonts\DejaVuSerif-Italic.ttf                  3
 +
 +;media\fonts\FreeMono.ttf                            3
 +;media\fonts\FreeMonoBold.ttf                        3
 +;media\fonts\FreeMonoBoldOblique.ttf                 3
 +;media\fonts\FreeMonoOblique.ttf                     3
 +
 +;media\fonts\LiberationMono-Bold.ttf                 3
 +;media\fonts\LiberationMono-BoldItalic.ttf           3
 +;media\fonts\LiberationMono-Italic.ttf               3
 +;media\fonts\LiberationMono-Regular.ttf              3
 +;media\fonts\LiberationSans-Bold.ttf                 3
 +;media\fonts\LiberationSans-BoldItalic.ttf           3
 +;media\fonts\LiberationSans-Italic.ttf               3
 +;media\fonts\LiberationSans-Regular.ttf              3
 +;media\fonts\LiberationSerif-Bold.ttf                3
 +;media\fonts\LiberationSerif-BoldItalic.ttf          3
 +;media\fonts\LiberationSerif-Italic.ttf              3
 +;media\fonts\LiberationSerif-Regular.ttf             3
 +
 +;media\fonts\Marlett.ttf                             3
 +;media\fonts\tahoma.ttf                              3
 +;media\fonts\tahomabd.ttf                            3
 +
 +;media\nls\c_037.nls                                 1
 +;media\nls\c_500.nls                                 1
 +;media\nls\c_737.nls                                 1
 +;media\nls\c_775.nls                                 1
 +;media\nls\c_850.nls                                 1
 +;media\nls\c_852.nls                                 1
 +;media\nls\c_855.nls                                 1
 +;media\nls\c_856.nls                                 1
 +;media\nls\c_857.nls                                 1
 +;media\nls\c_860.nls                                 1
 +;media\nls\c_861.nls                                 1
 +;media\nls\c_862.nls                                 1
 +;media\nls\c_863.nls                                 1
 +;media\nls\c_864.nls                                 1
 +;media\nls\c_865.nls                                 1
 +;media\nls\c_866.nls                                 1
 +;media\nls\c_869.nls                                 1
 +;media\nls\c_874.nls                                 1
 +;media\nls\c_875.nls                                 1
 +;media\nls\c_878.nls                                 1
 +;media\nls\c_932.nls                                 1
 +;media\nls\c_936.nls                                 1
 +;media\nls\c_949.nls                                 1
 +;media\nls\c_950.nls                                 1
 +;media\nls\c_1006.nls                                1
 +;media\nls\c_1026.nls                                1
 +;media\nls\c_1250.nls                                1
 +;media\nls\c_1251.nls                                1
 +;media\nls\c_1253.nls                                1
 +;media\nls\c_1254.nls                                1
 +;media\nls\c_1255.nls                                1
 +;media\nls\c_1256.nls                                1
 +;media\nls\c_1257.nls                                1
 +;media\nls\c_1258.nls                                1
 +;media\nls\c_10000.nls                               1
 +;media\nls\c_10006.nls                               1
 +;media\nls\c_10007.nls                               1
 +;media\nls\c_10029.nls                               1
 +;media\nls\c_10079.nls                               1
 +;media\nls\c_10081.nls                               1
 +;media\nls\c_20866.nls                               1
 +;media\nls\c_28591.nls                               1
 +;media\nls\c_28592.nls                               1
 +;media\nls\c_28593.nls                               1
 +;media\nls\c_28594.nls                               1
 +;media\nls\c_28595.nls                               1
 +;media\nls\c_28596.nls                               1
 +;media\nls\c_28597.nls                               1
 +;media\nls\c_28598.nls                               1
 +;media\nls\c_28599.nls                               1
 +;media\drivers\etc\services                          5
 +;media\inf\acpi.inf                                  6
 +;media\inf\cdrom.inf                                 6
 +;media\inf\display.inf                               6
 +;media\inf\font.inf                                  6
 +;media\inf\hdc.inf                                   6
 +;media\inf\intl.inf                                  6
 +;media\inf\layout.inf                                6
 +;media\inf\machine.inf                               6
 +;media\inf\msmouse.inf                               6
 +;media\inf\keyboard.inf                              6
 +;media\inf\NET_NIC.inf                               6
 +;media\inf\netamd.inf                                6
 +;media\inf\netisa.inf                                6
 +;media\inf\netrtpnt.inf                              6
 +;media\inf\nettcpip.inf                              6
 +;media\inf\ports.inf                                 6
 +;media\inf\scsi.inf                                  6
 +;media\inf\syssetup.inf                              6
 +;media\inf\usbport.inf                               6
 +;media\inf\usb.inf                                   6
 +;media\inf\usbstor.inf                               6
 +;media\inf\xboxdisp.inf                              6
  
  ; Subsystems
 -subsystems\win32\csrss\csrss.exe                    1
 -subsystems\win32\csrss\win32csr\win32csr.dll        1
 -subsystems\ntvdm\ntvdm.exe                          1
 -subsystems\win32\win32k\win32k.sys                  1
 +;subsystems\win32\csrss\csrss.exe                    1
 +;subsystems\win32\csrss\win32csr\win32csr.dll        1
- ;subsystems\csr\csr.exe                              1   optional
- ;subsystems\csr\csrsrv\csrsrv.dll                    1   optional
- ;subsystems\win\basesrv\basesrv.dll                  1   optional
- ;subsystems\win\winsrv\winsrv.dll                    1   optional
 +;subsystems\ntvdm\ntvdm.exe                          1
 +;subsystems\win32\win32k\win32k.sys                  1
  boot\bootdata\bootcdregtest\testboot.bat            7   optional
- tools\dbgprint\dbgprint.exe                         7   optional
  
  ; Modules
- ;modules\os2\server\os2srv.dll                                              1   optional
- ;modules\os2\dll\win32\doscalls\doscalls.dll                                1   optional
- ;modules\posix\server\psxsrv.dll                                            1   optional
- ;modules\posix\dll\win32\psxdll\psxdll.dll                                  1   optional
- ;modules\rosky\dll\win32\libsky\libsky.dll                                  1   optional
- ;modules\rosky\dll\win32\libskygi\libskygi.dll                              1   optional
- ;modules\vms\server\vmssrv.dll                                              1   optional
- ;modules\vms\dll\win32\vmsdll\vmsdll.dll                                    1   optional
 -modules\rosapps\applications\screensavers\cylfrac\cylfrac.scr              1   optional
 -modules\rosapps\applications\screensavers\matrix\matrix.scr                1   optional
 -modules\rosapps\applications\screensavers\blankscr\scrnsave.scr            1   optional
 -modules\rosapps\applications\screensavers\starfield\starfield.scr          1   optional
 -modules\rosapps\applications\screensavers\mazescr\mazescr.scr              1   optional
 -modules\rosapps\applications\screensavers\butterflies\butterflies.scr      1   optional
 -modules\rosapps\applications\cmdutils\comp\comp.exe                                     1   optional
 -modules\rosapps\applications\cmdutils\mode\mode.exe                                     1   optional
 -modules\rosapps\applications\cmdutils\sort\sort.exe                                     1   optional
 -modules\rosapps\applications\cmdutils\tee\tee.exe                                       1   optional
 -modules\rosapps\applications\cmdutils\touch\touch.exe                                   1   optional
 -modules\rosapps\applications\cmdutils\uptime\uptime.exe                                 1   optional
 -modules\rosapps\applications\cmdutils\y\y.exe                                           1   optional
 -modules\rosapps\applications\devutils\gdb2\gdb2.exe                                     1   optional
 -modules\rosapps\applications\devutils\gdihv\gdihv.exe                                   1   optional
 -modules\rosapps\applications\devutils\genguid\genguid.exe                               1   optional
 -modules\rosapps\applications\sysutils\gettype\gettype.exe                               1   optional
 -modules\rosapps\applications\devutils\roswebparser\roswebparser.exe                     1   optional
 -modules\rosapps\applications\devutils\zoomin\zoomin.exe                                 1   optional
 -modules\rosapps\applications\downloader\downloader.exe                                  1   optional
 -modules\rosapps\applications\downloader\downloader.xml                                  1   optional
 -modules\rosapps\applications\fontview\fontview.exe                                      1   optional
 -modules\rosapps\applications\imagesoft\imagesoft.exe                                    1   optional
 -modules\rosapps\applications\net\ncftp\ncftp.exe                                        1   optional
 -modules\rosapps\applications\net\netreg\netreg.exe                                      1   optional
 -modules\rosapps\applications\net\niclist\niclist.exe                                    1   optional
 -modules\rosapps\applications\net\roshttpd\roshttpd.exe                                  1   optional
 -modules\rosapps\applications\notevil\notevil.exe                                        1   optional
 -modules\rosapps\applications\magnify\magnify.exe                                        1   optional
 -modules\rosapps\applications\packmgr\cmd-line\rosget.exe                                1   optional
 -modules\rosapps\applications\packmgr\gui\packmgr.exe                                    1   optional
 -modules\rosapps\applications\packmgr\lib\package.dll                                    1   optional
 -modules\rosapps\applications\sysutils\chkdsk\chkdsk.exe                                 1   optional
 -modules\rosapps\applications\sysutils\systeminfo\systeminfo.exe                         1   optional
 -modules\rosapps\applications\sysutils\chklib\chklib.exe                                 1   optional
 -modules\rosapps\applications\sysutils\ctm\ctm.exe                                       1   optional
 -modules\rosapps\applications\sysutils\dosfsck\dosfsck.exe                                       1   optional
 -modules\rosapps\applications\sysutils\kill\kill.exe                                     1   optional
 -modules\rosapps\applications\sysutils\lsdd\lsdd.exe                                     1   optional
 -modules\rosapps\applications\sysutils\man\man.exe                                       1   optional
 -modules\rosapps\applications\sysutils\pedump\pedump.exe                                 1   optional
 -modules\rosapps\applications\sysutils\regexpl\regexpl.exe                               1   optional
 -modules\rosapps\applications\sysutils\tcat\tcat.exe                                     1   optional
 -modules\rosapps\applications\sysutils\tlist\tlist.exe                                   1   optional
 -modules\rosapps\applications\sysutils\screenshot\screenshot.exe                         1   optional
 -modules\rosapps\applications\sysutils\utils\binpatch\binpatch.exe                       1   optional
 -modules\rosapps\applications\sysutils\utils\cat\cat.exe                                 1   optional
 -modules\rosapps\applications\sysutils\utils\driver\load\load.exe                        1   optional
 -modules\rosapps\applications\sysutils\utils\driver\unload\unload.exe                    1   optional
 -modules\rosapps\applications\sysutils\utils\infinst\infinst.exe                         1   optional
 -modules\rosapps\applications\sysutils\utils\nts2w32err\nts2w32err.exe                   1   optional
 -modules\rosapps\applications\sysutils\utils\objdir\objdir.exe                           1   optional
 -modules\rosapps\applications\sysutils\utils\partinfo\partinfo.exe                       1   optional
 -modules\rosapps\applications\sysutils\utils\ps\ps.exe                                   1   optional
 -modules\rosapps\applications\sysutils\utils\rosperf\rosperf.exe                         1   optional
 -modules\rosapps\applications\sysutils\utils\stats\stats.exe                             1   optional
 -modules\rosapps\applications\sysutils\utils\tickcount\tickcount.exe                     1   optional
 -modules\rosapps\applications\winfile\winfile.exe                                        1   optional
 -modules\rosapps\applications\winver\winver.exe                                          1   optional
 -modules\rosapps\applications\write\write.exe                                            1   optional
 -modules\rosapps\demos\ddraw\ddraw_demo.exe                                 1   optional
 -modules\rosapps\demos\maze\maze.exe                                        1   optional
 -modules\rosapps\dflat32\edit.exe                                           1   optional
 -modules\rosapps\drivers\avtest\avtest.sys                                  1   optional
 -modules\rosapps\drivers\ramdrv\ramdrv.sys                                  1   optional
 -modules\rosapps\drivers\green\green.sys                                    1   optional
 -modules\rosapps\templates\dialog\dialog.exe                                       1   optional
 -modules\rostests\winetests\advapi32\advapi32_winetest.exe                  7   optional
 -modules\rostests\winetests\advpack\advpack_winetest.exe                    7   optional
 -modules\rostests\winetests\browseui\browseui_winetest.exe                  7   optional
 -modules\rostests\winetests\cabinet\cabinet_winetest.exe                    7   optional
 -modules\rostests\winetests\comcat\comcat_winetest.exe                      7   optional
 -modules\rostests\winetests\comctl32\comctl32_winetest.exe                  7   optional
 -modules\rostests\winetests\comdlg32\comdlg32_winetest.exe                  7   optional
 -modules\rostests\winetests\gdi32\gdi32_winetest.exe                        7   optional
 -modules\rostests\winetests\gdiplus\gdiplus_winetest.exe                    7   optional
 -modules\rostests\winetests\hlink\hlink_winetest.exe                        7   optional
 -modules\rostests\winetests\icmp\icmp_winetest.exe                          7   optional
 -modules\rostests\winetests\kernel32\kernel32_winetest.exe                  7   optional
 -modules\rostests\winetests\lz32\lz32_winetest.exe                          7   optional
 -modules\rostests\winetests\mapi32\mapi32_winetest.exe                      7   optional
 -modules\rostests\winetests\mlang\mlang_winetest.exe                        7   optional
 -modules\rostests\winetests\mshtml\mshtml_winetest.exe                      7   optional
 -modules\rostests\winetests\msi\msi_winetest.exe                            7   optional
 -modules\rostests\winetests\mstask\mstask_winetest.exe                      7   optional
 -modules\rostests\winetests\msvcrt\msvcrt_winetest.exe                      7   optional
 -modules\rostests\winetests\netapi32\netapi32_winetest.exe                  7   optional
 -modules\rostests\winetests\ntdll\ntdll_winetest.exe                        7   optional
 -modules\rostests\winetests\odbccp32\odbccp32_winetest.exe                  7   optional
 -modules\rostests\winetests\ole32\ole32_winetest.exe                        7   optional
 -modules\rostests\winetests\oleaut32\oleaut32_winetest.exe                  7   optional
 -modules\rostests\winetests\powrprof\powrprof_winetest.exe                  7   optional
 -modules\rostests\winetests\psapi\psapi_winetest.exe                        7   optional
 -modules\rostests\winetests\riched20\riched20_winetest.exe                  7   optional
 -modules\rostests\winetests\rpcrt4\rpcrt4_winetest.exe                      7   optional
 -modules\rostests\winetests\rsabase\rsabase_winetest.exe                    7   optional
 -modules\rostests\winetests\rsaenh\rsaenh_winetest.exe                      7   optional
 -modules\rostests\winetests\schannel\schannel_winetest.exe                  7   optional
 -modules\rostests\winetests\secur32\secur32_winetest.exe                    7   optional
 -modules\rostests\winetests\setupapi\setupapi_winetest.exe                  7   optional
 -modules\rostests\winetests\shdocvw\shdocvw_winetest.exe                    7   optional
 -modules\rostests\winetests\shell32\shell32_winetest.exe                    7   optional
 -modules\rostests\winetests\shlwapi\shlwapi_winetest.exe                    7   optional
 -modules\rostests\winetests\urlmon\urlmon_winetest.exe                      7   optional
 -modules\rostests\winetests\user32\user32_winetest.exe                      7   optional
 -modules\rostests\winetests\usp10\usp10_winetest.exe                        7   optional
 -modules\rostests\winetests\uxtheme\uxtheme_winetest.exe                    7   optional
 -modules\rostests\winetests\version\version_winetest.exe                    7   optional
 -modules\rostests\winetests\winhttp\winhttp_winetest.exe                    7   optional
 -modules\rostests\winetests\wininet\wininet_winetest.exe                    7   optional
 -modules\wallpaper\lake.bmp                                                 4   optional
 +;modules\rosapps\applications\screensavers\cylfrac\cylfrac.scr              1   optional
 +;modules\rosapps\applications\screensavers\matrix\matrix.scr                1   optional
 +;modules\rosapps\applications\screensavers\blankscr\scrnsave.scr            1   optional
 +;modules\rosapps\applications\screensavers\starfield\starfield.scr          1   optional
 +;modules\rosapps\applications\screensavers\mazescr\mazescr.scr              1   optional
 +;modules\rosapps\applications\screensavers\butterflies\butterflies.scr      1   optional
 +;modules\rosapps\applications\cmdutils\comp\comp.exe                                     1   optional
 +;modules\rosapps\applications\cmdutils\mode\mode.exe                                     1   optional
 +;modules\rosapps\applications\cmdutils\sort\sort.exe                                     1   optional
 +;modules\rosapps\applications\cmdutils\tee\tee.exe                                       1   optional
 +;modules\rosapps\applications\cmdutils\touch\touch.exe                                   1   optional
 +;modules\rosapps\applications\cmdutils\uptime\uptime.exe                                 1   optional
 +;modules\rosapps\applications\cmdutils\y\y.exe                                           1   optional
 +;modules\rosapps\applications\devutils\gdb2\gdb2.exe                                     1   optional
 +;modules\rosapps\applications\devutils\gdihv\gdihv.exe                                   1   optional
 +;modules\rosapps\applications\devutils\genguid\genguid.exe                               1   optional
 +;modules\rosapps\applications\devutils\gettype\gettype.exe                               1   optional
 +;modules\rosapps\applications\devutils\roswebparser\roswebparser.exe                     1   optional
 +;modules\rosapps\applications\devutils\zoomin\zoomin.exe                                 1   optional
 +;modules\rosapps\applications\downloader\downloader.exe                                  1   optional
 +;modules\rosapps\applications\downloader\downloader.xml                                  1   optional
 +;modules\rosapps\applications\fontview\fontview.exe                                      1   optional
 +;modules\rosapps\applications\imagesoft\imagesoft.exe                                    1   optional
 +;modules\rosapps\applications\net\ncftp\ncftp.exe                                        1   optional
 +;modules\rosapps\applications\net\netreg\netreg.exe                                      1   optional
 +;modules\rosapps\applications\net\niclist\niclist.exe                                    1   optional
 +;modules\rosapps\applications\net\roshttpd\roshttpd.exe                                      1   optional
 +;modules\rosapps\applications\notevil\notevil.exe                                        1   optional
 +;modules\rosapps\applications\magnify\magnify.exe                                        1   optional
 +;modules\rosapps\applications\packmgr\cmd-line\rosget.exe                                1   optional
 +;modules\rosapps\applications\packmgr\gui\packmgr.exe                                    1   optional
 +;modules\rosapps\applications\packmgr\lib\package.dll                                    1   optional
 +;modules\rosapps\applications\sysutils\chkdsk\chkdsk.exe                                 1   optional
 +;modules\rosapps\applications\sysutils\systeminfo\systeminfo.exe                         1   optional
 +;modules\rosapps\applications\sysutils\chklib\chklib.exe                                 1   optional
 +;modules\rosapps\applications\sysutils\ctm\ctm.exe                                       1   optional
 +;modules\rosapps\applications\sysutils\dosfsck\dosfsck.exe                                       1   optional
 +;modules\rosapps\applications\sysutils\kill\kill.exe                                     1   optional
 +;modules\rosapps\applications\sysutils\lsdd\lsdd.exe                                     1   optional
 +;modules\rosapps\applications\sysutils\man\man.exe                                       1   optional
 +;modules\rosapps\applications\sysutils\pedump\pedump.exe                                 1   optional
 +;modules\rosapps\applications\sysutils\regexpl\regexpl.exe                               1   optional
 +;modules\rosapps\applications\sysutils\tcat\tcat.exe                                     1   optional
 +;modules\rosapps\applications\sysutils\tlist\tlist.exe                                   1   optional
 +;modules\rosapps\applications\sysutils\screenshot\screenshot.exe                                  1   optional
 +;modules\rosapps\applications\sysutils\utils\binpatch\binpatch.exe                       1   optional
 +;modules\rosapps\applications\sysutils\utils\cat\cat.exe                                 1   optional
 +;modules\rosapps\applications\sysutils\utils\driver\load\load.exe                        1   optional
 +;modules\rosapps\applications\sysutils\utils\driver\unload\unload.exe                    1   optional
 +;modules\rosapps\applications\sysutils\utils\infinst\infinst.exe                         1   optional
 +;modules\rosapps\applications\sysutils\utils\nts2w32err\nts2w32err.exe                   1   optional
 +;modules\rosapps\applications\sysutils\utils\objdir\objdir.exe                           1   optional
 +;modules\rosapps\applications\sysutils\utils\partinfo\partinfo.exe                       1   optional
 +;modules\rosapps\applications\sysutils\utils\ps\ps.exe                                   1   optional
 +;modules\rosapps\applications\sysutils\utils\rosperf\rosperf.exe                         1   optional
 +;modules\rosapps\applications\sysutils\utils\stats\stats.exe                             1   optional
 +;modules\rosapps\applications\sysutils\utils\tickcount\tickcount.exe                     1   optional
 +;modules\rosapps\applications\winfile\winfile.exe                                        1   optional
 +;modules\rosapps\applications\winver\winver.exe                                          1   optional
 +;modules\rosapps\applications\write\write.exe                                            1   optional
 +;modules\rosapps\demos\ddraw\ddraw_demo.exe                                 1   optional
 +;modules\rosapps\demos\maze\maze.exe                                        1   optional
 +;modules\rosapps\dflat32\edit.exe                                           1   optional
 +;modules\rosapps\drivers\avtest\avtest.sys                                  1   optional
 +;modules\rosapps\drivers\ramdrv\ramdrv.sys                                  1   optional
 +;modules\rosapps\drivers\green\green.sys                                    1   optional
- ;modules\rosapps\lib\dflat32\dflat32.dll                                    1   optional
- ;modules\rosapps\templates\dialog.exe                                       1   optional
- ;modules\rosapps\templates\mdi.exe                                          1   optional
++;modules\rosapps\templates\dialog\dialog.exe                                       1   optional
 +;modules\rostests\winetests\advapi32\advapi32_winetest.exe                  7   optional
 +;modules\rostests\winetests\advpack\advpack_winetest.exe                    7   optional
 +;modules\rostests\winetests\browseui\browseui_winetest.exe                  7   optional
 +;modules\rostests\winetests\cabinet\cabinet_winetest.exe                    7   optional
 +;modules\rostests\winetests\comcat\comcat_winetest.exe                      7   optional
 +;modules\rostests\winetests\comctl32\comctl32_winetest.exe                  7   optional
 +;modules\rostests\winetests\comdlg32\comdlg32_winetest.exe                  7   optional
 +;modules\rostests\winetests\gdi32\gdi32_winetest.exe                        7   optional
 +;modules\rostests\winetests\gdiplus\gdiplus_winetest.exe                    7   optional
 +;modules\rostests\winetests\hlink\hlink_winetest.exe                        7   optional
 +;modules\rostests\winetests\icmp\icmp_winetest.exe                          7   optional
 +;modules\rostests\winetests\kernel32\kernel32_winetest.exe                  7   optional
 +;modules\rostests\winetests\lz32\lz32_winetest.exe                          7   optional
 +;modules\rostests\winetests\mapi32\mapi32_winetest.exe                      7   optional
 +;modules\rostests\winetests\mlang\mlang_winetest.exe                        7   optional
 +;modules\rostests\winetests\mshtml\mshtml_winetest.exe                      7   optional
 +;modules\rostests\winetests\msi\msi_winetest.exe                            7   optional
++;modules\rostests\winetests\mstask\mstask_winetest.exe                      7   optional
 +;modules\rostests\winetests\msvcrt\msvcrt_winetest.exe                      7   optional
 +;modules\rostests\winetests\netapi32\netapi32_winetest.exe                  7   optional
 +;modules\rostests\winetests\ntdll\ntdll_winetest.exe                        7   optional
 +;modules\rostests\winetests\odbccp32\odbccp32_winetest.exe                  7   optional
 +;modules\rostests\winetests\ole32\ole32_winetest.exe                        7   optional
 +;modules\rostests\winetests\oleaut32\oleaut32_winetest.exe                  7   optional
 +;modules\rostests\winetests\powrprof\powrprof_winetest.exe                  7   optional
 +;modules\rostests\winetests\psapi\psapi_winetest.exe                        7   optional
 +;modules\rostests\winetests\riched20\riched20_winetest.exe                  7   optional
 +;modules\rostests\winetests\rpcrt4\rpcrt4_winetest.exe                      7   optional
 +;modules\rostests\winetests\rsabase\rsabase_winetest.exe                    7   optional
 +;modules\rostests\winetests\rsaenh\rsaenh_winetest.exe                      7   optional
 +;modules\rostests\winetests\schannel\schannel_winetest.exe                  7   optional
 +;modules\rostests\winetests\secur32\secur32_winetest.exe                    7   optional
 +;modules\rostests\winetests\setupapi\setupapi_winetest.exe                  7   optional
 +;modules\rostests\winetests\shdocvw\shdocvw_winetest.exe                    7   optional
 +;modules\rostests\winetests\shell32\shell32_winetest.exe                    7   optional
 +;modules\rostests\winetests\shlwapi\shlwapi_winetest.exe                    7   optional
 +;modules\rostests\winetests\urlmon\urlmon_winetest.exe                      7   optional
 +;modules\rostests\winetests\user32\user32_winetest.exe                      7   optional
 +;modules\rostests\winetests\usp10\usp10_winetest.exe                        7   optional
 +;modules\rostests\winetests\uxtheme\uxtheme_winetest.exe                    7   optional
 +;modules\rostests\winetests\version\version_winetest.exe                    7   optional
 +;modules\rostests\winetests\winhttp\winhttp_winetest.exe                    7   optional
 +;modules\rostests\winetests\wininet\wininet_winetest.exe                    7   optional
 +;modules\wallpaper\lake.bmp                                                 4   optional
  
  ; Native libraries
 -modules\windows\mfc42.dll                                                  1   optional
 -modules\windows\vmx_fb.dll                                                 1   optional
 -modules\windows\vmx_mode.dll                                               1   optional
 -modules\windows\vmx_svga.sys                                               2   optional
 -modules\windows\vmx_svga.inf                                               6   optional
 -modules\windows\kvmnet.sys                                                 2   optional
 -modules\windows\kvmnet.inf                                                 6   optional
 +;modules\windows\mfc42.dll                                                  1   optional
 +;modules\windows\vmx_fb.dll                                                 1   optional
 +;modules\windows\vmx_mode.dll                                               1   optional
 +;modules\windows\vmx_svga.sys                                               2   optional
 +;modules\windows\vmx_svga.inf                                               6   optional
 +;modules\windows\kvmnet.sys                                                 2   optional
 +;modules\windows\kvmnet.inf                                                 6   optional
@@@ -87,7 -87,7 +87,7 @@@ HighContrastDlgProc(HWND hwndDlg
              SendDlgItemMessage(hwndDlg,
                                 IDC_CONTRAST_COMBO,
                                 CB_SELECTSTRING,
-                                -1,
+                                (WPARAM)-1,
                                 (LPARAM)pGlobalData->highContrast.lpszDefaultScheme);
              break;
  
@@@ -255,7 -255,7 +255,7 @@@ DisplayPageProc(HWND hwndDlg
                  SetCaretBlinkTime(pGlobalData->uCaretBlinkTime);
                  SystemParametersInfo(SPI_SETCARETWIDTH,
                                       0,
 -                                     (PVOID)pGlobalData->uCaretWidth,
 +                                     IntToPtr(pGlobalData->uCaretWidth),
                                       SPIF_UPDATEINIFILE | SPIF_SENDCHANGE /*0*/);
                  SystemParametersInfo(SPI_SETHIGHCONTRAST,
                                       sizeof(HIGHCONTRAST),
@@@ -1,16 -1,13 +1,12 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
  <module name="appwiz-new" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_APPWIZ}"  installbase="system32" installname="appwiz-new.cpl" unicode="yes" allowwarnings="true">
 -      <importlibrary definition="appwiz.def" />
 +      <importlibrary definition="appwiz.spec" />
        <include base="appwiz-new">.</include>
-       <define name="__USE_W32API" />
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
-       <define name="WINVER">0x0501</define>
        <library>kernel32</library>
        <library>advapi32</library>
        <library>user32</library>
        <library>comctl32</library>
 -      <library>msvcrt</library>
        <library>ole32</library>
        <library>uuid</library>
        <library>shell32</library>
@@@ -19,5 -16,4 +15,5 @@@
        <file>appwiz.c</file>
        <file>createlink.c</file>
        <file>appwiz.rc</file>
 +      <file>appwiz.spec</file>
  </module>
@@@ -1,14 -1,13 +1,12 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
  <module name="appwiz" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_APPWIZ}"  installbase="system32" installname="appwiz.cpl" unicode="yes">
 -      <importlibrary definition="appwiz.def" />
 +      <importlibrary definition="appwiz.spec" />
        <include base="appwiz">.</include>
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
        <library>kernel32</library>
        <library>advapi32</library>
        <library>user32</library>
        <library>comctl32</library>
 -      <library>msvcrt</library>
        <library>ole32</library>
        <library>uuid</library>
        <library>shell32</library>
@@@ -19,5 -18,4 +17,5 @@@
        <file>createlink.c</file>
        <file>updates.c</file>
        <file>appwiz.rc</file>
 +      <file>appwiz.spec</file>
  </module>
@@@ -1,11 -1,8 +1,8 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
  <module name="desk" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_DESK}" installbase="system32" installname="desk.cpl" unicode="yes">
 -      <importlibrary definition="desk.def" />
 +      <importlibrary definition="desk.spec" />
        <include base="desk">.</include>
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
-       <define name="WINVER">0x501</define>
        <define name="_WIN32" />
        <library>kernel32</library>
        <library>user32</library>
@@@ -18,6 -15,7 +15,6 @@@
        <library>shell32</library>
        <library>ntdll</library>
        <library>msimg32</library>
 -      <library>msvcrt</library>
        <library>uuid</library>
        <file>advmon.c</file>
        <file>appearance.c</file>
@@@ -34,5 -32,4 +31,5 @@@
        <file>monslctl.c</file>
        <file>general.c</file>
        <file>desk.rc</file>
 +      <file>desk.spec</file>
  </module>
@@@ -1,14 -1,13 +1,12 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
  <module name="input" type="win32dll" extension=".dll" baseaddress="${BASEADDRESS_INPUT}" installbase="system32" installname="input.dll" unicode="yes">
 -      <importlibrary definition="input.def" />
 +      <importlibrary definition="input.spec" />
        <include base="input">.</include>
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
        <library>kernel32</library>
        <library>advapi32</library>
        <library>user32</library>
        <library>comctl32</library>
 -      <library>msvcrt</library>
        <library>gdi32</library>
        <file>input.c</file>
        <file>settings.c</file>
@@@ -16,5 -15,4 +14,5 @@@
        <file>add.c</file>
        <file>changekeyseq.c</file>
        <file>input.rc</file>
 +      <file>input.spec</file>
  </module>
@@@ -1,28 -1,25 +1,26 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
  <module name="intl" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_INTL}" installbase="system32" installname="intl.cpl" unicode="yes">
 -    <importlibrary definition="intl.def" />
 -    <include base="intl">.</include>
 -    <library>kernel32</library>
 -    <library>user32</library>
 -    <library>comctl32</library>
 -    <library>advapi32</library>
 -    <library>setupapi</library>
 +      <importlibrary definition="intl.spec" />
 +      <include base="intl">.</include>
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x600</define>
-       <define name="WINVER">0x609</define>
 +      <library>kernel32</library>
 +      <library>user32</library>
 +      <library>comctl32</library>
 +      <library>advapi32</library>
 +      <library>setupapi</library>
+     <library>msvcrt</library>
 -    <library>shell32</library>
 -    <file>currency.c</file>
 -    <file>date.c</file>
 -    <file>generalp.c</file>
 -    <file>intl.c</file>
 -    <file>inplocale.c</file>
 -    <file>numbers.c</file>
 -    <file>time.c</file>
 -    <file>misc.c</file>
 -    <file>languages.c</file>
 -    <file>advanced.c</file>
 -    <file>sort.c</file>
 -    <file>intl.rc</file>
 +      <library>shell32</library>
 +      <file>currency.c</file>
 +      <file>date.c</file>
 +      <file>generalp.c</file>
 +      <file>intl.c</file>
 +      <file>inplocale.c</file>
 +      <file>numbers.c</file>
 +      <file>time.c</file>
 +      <file>misc.c</file>
 +      <file>languages.c</file>
 +      <file>advanced.c</file>
 +      <file>sort.c</file>
 +      <file>intl.rc</file>
 +      <file>intl.spec</file>
  </module>
@@@ -1,19 -1,16 +1,16 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
  <module name="joy" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_JOY}"  installbase="system32" installname="joy.cpl" unicode="yes">
 -      <importlibrary definition="joy.def" />
 +      <importlibrary definition="joy.spec" />
        <include base="joy">.</include>
-       <define name="__USE_W32API" />
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
        <library>kernel32</library>
        <library>advapi32</library>
        <library>user32</library>
        <library>comctl32</library>
 -      <library>msvcrt</library>
        <library>ole32</library>
        <library>uuid</library>
        <library>shell32</library>
        <file>joy.c</file>
        <file>joy.rc</file>
 +      <file>joy.spec</file>
  </module>
@@@ -1,10 -1,8 +1,8 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
  <module name="main" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_MAIN}" installbase="system32" installname="main.cpl" unicode="yes">
 -      <importlibrary definition="main.def" />
 +      <importlibrary definition="main.spec" />
        <include base="main">.</include>
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
        <library>kernel32</library>
        <library>advapi32</library>
        <library>user32</library>
@@@ -13,9 -11,9 +11,9 @@@
        <library>comdlg32</library>
        <library>shell32</library>
        <library>gdi32</library>
 -      <library>msvcrt</library>
        <file>keyboard.c</file>
        <file>main.c</file>
        <file>mouse.c</file>
        <file>main.rc</file>
 +      <file>main.spec</file>
  </module>
@@@ -28,8 -28,6 +28,6 @@@
  //TODO:
  //  add missing icons
  
- #define WINVER 0x0501
  #include <windows.h>
  #include <winuser.h>
  #include <devguid.h>
@@@ -1260,7 -1258,7 +1258,7 @@@ PointerProc(IN HWND hwndDlg
  //#if (WINVER >= 0x0500)
                  if (pPointerData->bOrigDropShadow != pPointerData->bDropShadow)
                  {
 -                    SystemParametersInfo(SPI_SETDROPSHADOW, 0, (PVOID)pPointerData->bDropShadow, SPIF_SENDCHANGE | SPIF_UPDATEINIFILE);
 +                    SystemParametersInfo(SPI_SETDROPSHADOW, 0, IntToPtr(pPointerData->bDropShadow), SPIF_SENDCHANGE | SPIF_UPDATEINIFILE);
                      pPointerData->bOrigDropShadow = pPointerData->bDropShadow;
                  }
  //#endif
              else if (lppsn->hdr.code == PSN_RESET)
              {
  //#if (WINVER >= 0x0500)
 -                SystemParametersInfo(SPI_SETDROPSHADOW, 0, (PVOID)pPointerData->bOrigDropShadow, 0);
 +                SystemParametersInfo(SPI_SETDROPSHADOW, 0, IntToPtr(pPointerData->bOrigDropShadow), 0);
  //#endif
              }
              break;
                          SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
                      }
  //#if (WINVER >= 0x0500)
 -                    SystemParametersInfo(SPI_SETDROPSHADOW, 0, (PVOID)pPointerData->bDropShadow, 0);
 +                    SystemParametersInfo(SPI_SETDROPSHADOW, 0, IntToPtr(pPointerData->bDropShadow), 0);
  //#endif
                      PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
                      break;
@@@ -1552,7 -1550,7 +1550,7 @@@ OptionProc(IN HWND hwndDlg
                          pOptionData->bMouseVanish = TRUE;
                          SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
                      }
 -                    SystemParametersInfo(SPI_SETMOUSEVANISH, 0, (PVOID)pOptionData->bMouseVanish, 0);
 +                    SystemParametersInfo(SPI_SETMOUSEVANISH, 0, IntToPtr(pOptionData->bMouseVanish), 0);
                      break;
  
                  case IDC_CHECK_SHOW_POINTER:
                          pOptionData->bMouseSonar = TRUE;
                          SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
                      }
 -                    SystemParametersInfo(SPI_SETMOUSESONAR, 0, (PVOID)pOptionData->bMouseSonar, 0);
 +                    SystemParametersInfo(SPI_SETMOUSESONAR, 0, IntToPtr(pOptionData->bMouseSonar), 0);
                      break;
  
              }
                  /* Set mouse speed */
                  if (pOptionData->ulOrigMouseSpeed != pOptionData->ulMouseSpeed)
                  {
 -                    SystemParametersInfo(SPI_SETMOUSESPEED, 0, (PVOID)pOptionData->ulMouseSpeed, SPIF_SENDCHANGE | SPIF_UPDATEINIFILE);
 +                    SystemParametersInfo(SPI_SETMOUSESPEED, 0, IntToPtr(pOptionData->ulMouseSpeed), SPIF_SENDCHANGE | SPIF_UPDATEINIFILE);
                      pOptionData->ulOrigMouseSpeed = pOptionData->ulMouseSpeed;
                  }
  
                  /* hide pointer while typing */
                  if (pOptionData->bOrigMouseVanish != pOptionData->bMouseVanish)
                  {
 -                    SystemParametersInfo(SPI_SETMOUSEVANISH, 0, (PVOID)pOptionData->bMouseVanish, SPIF_SENDCHANGE | SPIF_UPDATEINIFILE);
 +                    SystemParametersInfo(SPI_SETMOUSEVANISH, 0, IntToPtr(pOptionData->bMouseVanish), SPIF_SENDCHANGE | SPIF_UPDATEINIFILE);
                      pOptionData->bOrigMouseVanish = pOptionData->bMouseVanish;
                  }
  
                  /* show pointer with Ctrl-Key */
                  if (pOptionData->bOrigMouseSonar != pOptionData->bMouseSonar)
                  {
 -                    SystemParametersInfo(SPI_SETMOUSESONAR, 0, (PVOID)pOptionData->bMouseSonar, SPIF_SENDCHANGE | SPIF_UPDATEINIFILE);
 +                    SystemParametersInfo(SPI_SETMOUSESONAR, 0, IntToPtr(pOptionData->bMouseSonar), SPIF_SENDCHANGE | SPIF_UPDATEINIFILE);
                      pOptionData->bOrigMouseSonar = pOptionData->bMouseSonar;
                  }
                  return TRUE;
              else if (lppsn->hdr.code == PSN_RESET)
              {
                  /* Set the original mouse speed */
 -                SystemParametersInfo(SPI_SETMOUSESPEED, 0, (PVOID)pOptionData->ulOrigMouseSpeed, 0);
 +                SystemParametersInfo(SPI_SETMOUSESPEED, 0, IntToPtr(pOptionData->ulOrigMouseSpeed), 0);
                  SystemParametersInfo(SPI_SETMOUSE, 0, &pOptionData->OrigMouseAccel, 0);
                  SystemParametersInfo(SPI_SETSNAPTODEFBUTTON, (UINT)pOptionData->bOrigSnapToDefaultButton, 0, 0);
                  SystemParametersInfo(SPI_SETMOUSETRAILS, pOptionData->uOrigMouseTrails, 0, 0);
 -                SystemParametersInfo(SPI_SETMOUSEVANISH, 0, (PVOID)pOptionData->bOrigMouseVanish, 0);
 -                SystemParametersInfo(SPI_SETMOUSESONAR, 0, (PVOID)pOptionData->bOrigMouseSonar, 0);
 +                SystemParametersInfo(SPI_SETMOUSEVANISH, 0, IntToPtr(pOptionData->bOrigMouseVanish), 0);
 +                SystemParametersInfo(SPI_SETMOUSESONAR, 0,IntToPtr(pOptionData->bOrigMouseSonar), 0);
              }
              break;
  
                      case TB_BOTTOM:
                      case TB_ENDTRACK:
                          pOptionData->ulMouseSpeed = (ULONG)SendDlgItemMessage(hwndDlg, IDC_SLIDER_MOUSE_SPEED, TBM_GETPOS, 0, 0) + 1;
 -                        SystemParametersInfo(SPI_SETMOUSESPEED, 0, (PVOID)pOptionData->ulMouseSpeed, SPIF_SENDCHANGE);
 +                        SystemParametersInfo(SPI_SETMOUSESPEED, 0, IntToPtr(pOptionData->ulMouseSpeed), SPIF_SENDCHANGE);
                          PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
                          break;
  #if 0
@@@ -3,11 -3,10 +3,9 @@@
  <module name="mmsys" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_MMSYS}" installbase="system32" installname="mmsys.cpl" unicode="yes">
        <importlibrary definition="mmsys.spec" />
        <include base="mmsys">.</include>
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
        <library>kernel32</library>
        <library>user32</library>
        <library>comctl32</library>
 -      <library>msvcrt</library>
        <library>devmgr</library>
        <library>gdi32</library>
        <library>winmm</library>
@@@ -1,13 -1,13 +1,14 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
  <module name="ncpa" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_NCPA}" installbase="system32" installname="ncpa.cpl" unicode="yes">
 -      <importlibrary definition="ncpa.def" />
 +      <importlibrary definition="ncpa.spec" />
        <include base="ncpa">.</include>
-       <define name="_WIN32_IE">0x600</define>
        <define name="_WIN32_WINNT">0x600</define>
        <library>kernel32</library>
        <library>advapi32</library>
        <library>shell32</library>
        <file>ncpa.c</file>
 +      <file>ncpa.spec</file>
  </module>
@@@ -1,14 -1,12 +1,12 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
  <module name="odbccp32i" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_ODBCCP32}" installbase="system32" installname="odbccp32.cpl" unicode="yes">
 -      <importlibrary definition="odbccp32.def" />
 +      <importlibrary definition="odbccp32.spec" />
        <include base="odbccp32">.</include>
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
        <library>kernel32</library>
        <library>user32</library>
        <library>comctl32</library>
 -      <library>msvcrt</library>
        <file>odbccp32.c</file>
        <file>odbccp32.rc</file>
 +      <file>odbccp32.spec</file>
  </module>
@@@ -1,16 -1,15 +1,14 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
  <module name="powercfg" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_PWRCFG}" installbase="system32" installname="powercfg.cpl" unicode="yes">
 -      <importlibrary definition="powercfg.def" />
 +      <importlibrary definition="powercfg.spec" />
        <include base="powercfg">.</include>
        <include base="ReactOS">include/reactos/wine</include>
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
        <library>kernel32</library>
        <library>user32</library>
        <library>powrprof</library>
        <library>comctl32</library>
        <library>shell32</library>
 -      <library>msvcrt</library>
        <library>advapi32</library>
        <file>powercfg.c</file>
        <file>powershemes.c</file>
@@@ -18,5 -17,4 +16,5 @@@
        <file>advanced.c</file>
        <file>hibernate.c</file>
        <file>powercfg.rc</file>
 +      <file>powercfg.spec</file>
  </module>
@@@ -1,14 -1,12 +1,11 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
  <module name="sysdm" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_SYSDM}" installbase="system32" installname="sysdm.cpl" unicode="yes">
 -      <importlibrary definition="sysdm.def" />
 +      <importlibrary definition="sysdm.spec" />
        <include base="sysdm">.</include>
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
-       <define name="WINVER">0x501</define>
        <library>kernel32</library>
        <library>advapi32</library>
        <library>setupapi</library>
 -      <library>msvcrt</library>
        <library>user32</library>
        <library>gdi32</library>
        <library>comctl32</library>
@@@ -29,6 -27,5 +26,6 @@@
        <file>userprofile.c</file>
        <file>virtmem.c</file>
        <file>sysdm.rc</file>
 +      <file>sysdm.spec</file>
        <pch>precomp.h</pch>
  </module>
@@@ -1,19 -1,16 +1,16 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
  <module name="telephon" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_TELEPHON}"  installbase="system32" installname="telephon.cpl" unicode="yes">
 -      <importlibrary definition="telephon.def" />
 +      <importlibrary definition="telephon.spec" />
        <include base="telephon">.</include>
-       <define name="__USE_W32API" />
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
        <library>kernel32</library>
        <library>advapi32</library>
        <library>user32</library>
        <library>comctl32</library>
 -      <library>msvcrt</library>
        <library>ole32</library>
        <library>uuid</library>
        <library>shell32</library>
        <file>telephon.c</file>
        <file>telephon.rc</file>
 +      <file>telephon.spec</file>
  </module>
@@@ -1,10 -1,8 +1,8 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
  <module name="timedate" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_TIMEDATE}" installbase="system32" installname="timedate.cpl" unicode="yes">
 -      <importlibrary definition="timedate.def" />
 +      <importlibrary definition="timedate.spec" />
        <include base="timedate">.</include>
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
        <library>kernel32</library>
        <library>advapi32</library>
        <library>user32</library>
@@@ -12,6 -10,7 +10,6 @@@
        <library>comctl32</library>
        <library>ws2_32</library>
        <library>iphlpapi</library>
 -      <library>msvcrt</library>
        <file>clock.c</file>
        <file>dateandtime.c</file>
        <file>internettime.c</file>
@@@ -20,6 -19,4 +18,6 @@@
        <file>timedate.c</file>
        <file>timezone.c</file>
        <file>timedate.rc</file>
 +      <file>timedate.spec</file>
  </module>
 +
@@@ -1,11 -1,8 +1,8 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
  <module name="usrmgr" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_USRMGR}" installbase="system32" installname="usrmgr.cpl" unicode="yes">
 -      <importlibrary definition="usrmgr.def" />
 +      <importlibrary definition="usrmgr.spec" />
        <include base="usrmgr">.</include>
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
-       <define name="WINVER">0x609</define>
        <library>kernel32</library>
        <library>advapi32</library>
        <library>user32</library>
@@@ -13,6 -10,7 +10,6 @@@
        <library>comctl32</library>
        <library>ntdll</library>
        <library>netapi32</library>
 -      <library>msvcrt</library>
        <file>extra.c</file>
        <file>groupprops.c</file>
        <file>groups.c</file>
@@@ -21,5 -19,4 +18,5 @@@
        <file>users.c</file>
        <file>usrmgr.c</file>
        <file>usrmgr.rc</file>
 +      <file>usrmgr.spec</file>
  </module>
@@@ -3,9 -3,6 +3,6 @@@
  <module name="ddraw" type="win32dll" installbase="system32" installname="ddraw.dll" allowwarnings ="true" unicode="yes">
        <importlibrary definition="ddraw.def" />
        <include base="ddraw">.</include>
-       <define name="WINVER">0x0600</define>
-       <define name="_WIN32_WINNT">0x0501</define>
        <library>kernel32</library>
        <library>user32</library>
        <library>gdi32</library>
@@@ -14,6 -11,7 +11,6 @@@
        <library>ole32</library>
        <library>user32</library>
        <library>advapi32</library>
 -      <library>msvcrt</library>
        <library>pseh</library>
  
        <file>ddraw.rc</file>
@@@ -5,9 -5,6 +5,6 @@@
        <importlibrary definition="dsound.spec" />
        <include base="dsound">.</include>
        <include base="ReactOS">include/reactos/wine</include>
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
-       <define name="WINVER">0x501</define>
        <library>wine</library>
        <library>uuid</library>
        <library>ntdll</library>
@@@ -17,6 -14,7 +14,6 @@@
        <library>ole32</library>
        <library>winmm</library>
        <library>dxguid</library>
 -      <library>msvcrt</library>
        <file>version.rc</file>
        <file>buffer.c</file>
        <file>capture.c</file>
@@@ -9,7 -9,6 +9,6 @@@
                <include base="ReactOS">include/reactos/subsys</include>
                <define name="__NTDLL__" />
                <define name="_DISABLE_TIDENTS" />
-               <define name="_WIN32_WINNT">0x0502</define>
                <define name="_NTOSKRNL_" />
                <define name="__NO_CTYPE_INLINES" />
                <library>rtl</library>
                                        <file>dispatch.S</file>
                                </directory>
                        </if>
 +                      <if property="ARCH" value="amd64">
 +                              <directory name="amd64">
 +                                      <file>stubs.c</file>
 +                              </directory>
 +                      </if>
                        <if property="ARCH" value="arm">
                                <directory name="arm">
                                        <file>stubs_asm.s</file>
@@@ -60,4 -54,4 +59,4 @@@
                        <file>ntdll.rc</file>
                </directory>
        </module>
 -</group>
 +</group>
@@@ -1,9 -1,6 +1,6 @@@
  <module name="deskadp" type="win32dll" baseaddress="${BASEADDRESS_DESKADP}" installbase="system32" installname="deskadp.dll" unicode="yes">
        <importlibrary definition="deskadp.spec" />
        <include base="deskadp">.</include>
-       <define name="_WIN32_IE">0x0500</define>
-       <define name="_WIN32_WINNT">0x0600</define>
-       <define name="WINVER">0x0600</define>
        <library>ntdll</library>
        <library>kernel32</library>
        <library>user32</library>
@@@ -11,6 -8,7 +8,6 @@@
        <library>comctl32</library>
        <library>ole32</library>
        <library>uuid</library>
 -      <library>msvcrt</library>
        <file>deskadp.c</file>
        <file>shxiface.c</file>
        <file>deskadp.rc</file>
@@@ -1,9 -1,6 +1,6 @@@
  <module name="deskmon" type="win32dll" baseaddress="${BASEADDRESS_DESKMON}" installbase="system32" installname="deskmon.dll" unicode="yes">
        <importlibrary definition="deskmon.spec" />
        <include base="deskmon">.</include>
-       <define name="_WIN32_IE">0x0500</define>
-       <define name="_WIN32_WINNT">0x0600</define>
-       <define name="WINVER">0x0600</define>
        <library>ntdll</library>
        <library>kernel32</library>
        <library>user32</library>
@@@ -11,6 -8,7 +8,6 @@@
        <library>comctl32</library>
        <library>ole32</library>
        <library>uuid</library>
 -      <library>msvcrt</library>
        <file>deskmon.c</file>
        <file>shxiface.c</file>
        <file>deskmon.rc</file>
@@@ -1,15 -1,13 +1,12 @@@
  <module name="fontext" type="win32dll" baseaddress="${BASEADDRESS_FONTEXT}" installbase="system32" installname="fontext.dll" unicode="yes">
        <importlibrary definition="fontext.spec" />
        <include base="fontext">.</include>
-       <define name="_WIN32_IE">0x0500</define>
-       <define name="_WIN32_WINNT">0x0600</define>
-       <define name="WINVER">0x0600</define>
        <library>ntdll</library>
        <library>kernel32</library>
        <library>user32</library>
        <library>gdi32</library>
        <library>ole32</library>
        <library>uuid</library>
 -      <library>msvcrt</library>
        <library>shlwapi</library>
        <library>lz32</library>
        <library>advapi32</library>
@@@ -1,13 -1,13 +1,13 @@@
  <module name="advapi32" type="win32dll" baseaddress="${BASEADDRESS_ADVAPI32}" installbase="system32" installname="advapi32.dll" unicode="yes">
  
 -      <importlibrary definition="advapi32.def" />
 +      <importlibrary definition="advapi32.spec" />
        <include base="advapi32">.</include>
        <include base="scm_client">.</include>
        <include base="lsa_client">.</include>
        <include base="eventlog_client">.</include>
-       <define name="WINVER">0x600</define>
-       <define name="_WIN32_IE">0x0500</define>
-       <define name="_WIN32_WINNT">0x0600</define>
+       <define name="_WIN32_WINNT">0x600</define>
        <define name="_ADVAPI32_" />
        <library>scm_client</library>
        <library>lsa_client</library>
@@@ -18,7 -18,6 +18,7 @@@
        <library>pseh</library>
        <library>ntdll</library>
        <pch>advapi32.h</pch>
 +      <file>advapi32.spec</file>
        <directory name="crypt">
                        <file>crypt.c</file>
                        <file>crypt_arc4.c</file>
@@@ -41,9 -41,9 +41,9 @@@ static VOID CloseDefaultKeys(VOID)
          NtClose(Handle);                                                       \
      }
  #define IsPredefKey(HKey)                                                      \
 -    (((ULONG)(HKey) & 0xF0000000) == 0x80000000)
 +    (((ULONG_PTR)(HKey) & 0xF0000000) == 0x80000000)
  #define GetPredefKeyIndex(HKey)                                                \
 -    ((ULONG)(HKey) & 0x0FFFFFFF)
 +    ((ULONG_PTR)(HKey) & 0x0FFFFFFF)
  
  static NTSTATUS OpenClassesRootKey(PHANDLE KeyHandle);
  static NTSTATUS OpenLocalMachineKey (PHANDLE KeyHandle);
@@@ -400,7 -400,7 +400,7 @@@ RegCloseKey (HKEY hKey
    NTSTATUS Status;
  
    /* don't close null handle or a pseudo handle */
 -  if ((!hKey) || (((ULONG)hKey & 0xF0000000) == 0x80000000))
 +  if ((!hKey) || (((ULONG_PTR)hKey & 0xF0000000) == 0x80000000))
      {
        return ERROR_INVALID_HANDLE;
      }
@@@ -1018,7 -1018,7 +1018,7 @@@ RegCreateKeyExA (HKEY hKey
      {
        return RtlNtStatusToDosError (Status);
      }
 -  TRACE("ParentKey %x\n", (ULONG)ParentKey);
 +  TRACE("ParentKey %p\n", ParentKey);
  
    if (lpClass != NULL)
      {
@@@ -1091,7 -1091,7 +1091,7 @@@ RegCreateKeyExW (HKEY hKey
      {
        return RtlNtStatusToDosError(Status);
      }
 -  TRACE("ParentKey %x\n", (ULONG)ParentKey);
 +  TRACE("ParentKey %p\n", ParentKey);
  
    RtlInitUnicodeString (&ClassString,
                        lpClass);
@@@ -1427,7 -1427,8 +1427,8 @@@ RegDeleteKeyValueA(IN HKEY hKey
      return Ret;
  }
  
+ #if 0
+ // Non-recursive RegDeleteTreeW implementation by Thomas, however it needs bugfixing
  static NTSTATUS
  RegpDeleteTree(IN HKEY hKey)
  {
@@@ -1705,6 -1706,100 +1706,100 @@@ Cleanup
          return RtlNtStatusToDosError(Status);
      }
  }
+ #endif
+ /************************************************************************
+  *  RegDeleteTreeW
+  *
+  * @implemented
+  */
+ LSTATUS
+ WINAPI
+ RegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey)
+ {
+     LONG ret;
+     DWORD dwMaxSubkeyLen, dwMaxValueLen;
+     DWORD dwMaxLen, dwSize;
+     NTSTATUS Status;
+     HANDLE KeyHandle;
+     HKEY hSubKey;
+     WCHAR szNameBuf[MAX_PATH], *lpszName = szNameBuf;
+     TRACE("(hkey=%p,%p %s)\n", hKey, lpszSubKey, debugstr_w(lpszSubKey));
+     Status = MapDefaultKey(&KeyHandle,
+                            hKey);
+     if (!NT_SUCCESS(Status))
+     {
+         return RtlNtStatusToDosError(Status);
+     }
+     hSubKey = KeyHandle;
+     if(lpszSubKey)
+     {
+         ret = RegOpenKeyExW(KeyHandle, lpszSubKey, 0, KEY_READ, &hSubKey);
+         if (ret)
+         {
+             ClosePredefKey(KeyHandle);
+             return ret;
+         }
+     }
+     /* Get highest length for keys, values */
+     ret = RegQueryInfoKeyW(hSubKey, NULL, NULL, NULL, NULL,
+             &dwMaxSubkeyLen, NULL, NULL, &dwMaxValueLen, NULL, NULL, NULL);
+     if (ret) goto cleanup;
+     dwMaxSubkeyLen++;
+     dwMaxValueLen++;
+     dwMaxLen = max(dwMaxSubkeyLen, dwMaxValueLen);
+     if (dwMaxLen > sizeof(szNameBuf)/sizeof(WCHAR))
+     {
+         /* Name too big: alloc a buffer for it */
+         if (!(lpszName = RtlAllocateHeap( RtlGetProcessHeap(), 0, dwMaxLen*sizeof(WCHAR))))
+         {
+             ret = ERROR_NOT_ENOUGH_MEMORY;
+             goto cleanup;
+         }
+     }
+     /* Recursively delete all the subkeys */
+     while (TRUE)
+     {
+         dwSize = dwMaxLen;
+         if (RegEnumKeyExW(hSubKey, 0, lpszName, &dwSize, NULL,
+                           NULL, NULL, NULL)) break;
+         ret = RegDeleteTreeW(hSubKey, lpszName);
+         if (ret) goto cleanup;
+     }
+     if (lpszSubKey)
+         ret = RegDeleteKeyW(KeyHandle, lpszSubKey);
+     else
+         while (TRUE)
+         {
+             dwSize = dwMaxLen;
+             if (RegEnumValueW(KeyHandle, 0, lpszName, &dwSize,
+                   NULL, NULL, NULL, NULL)) break;
+             ret = RegDeleteValueW(KeyHandle, lpszName);
+             if (ret) goto cleanup;
+         }
+ cleanup:
+     /* Free buffer if allocated */
+     if (lpszName != szNameBuf)
+         RtlFreeHeap( RtlGetProcessHeap(), 0, lpszName);
+     if(lpszSubKey)
+         RegCloseKey(hSubKey);
+     ClosePredefKey(KeyHandle);
+     return ret;
+ }
  
  
  /************************************************************************
@@@ -188,7 -188,7 +188,7 @@@ CheckNtMartaPresent(VOID
  {
      DWORD ErrorCode;
  
 -    if (InterlockedCompareExchangePointer(&NtMarta,
 +    if (InterlockedCompareExchangePointer((PVOID)&NtMarta,
                                            NULL,
                                            NULL) == NULL)
      {
          if (ErrorCode == ERROR_SUCCESS)
          {
              /* try change the NtMarta pointer */
 -            if (InterlockedCompareExchangePointer(&NtMarta,
 +            if (InterlockedCompareExchangePointer((PVOID)&NtMarta,
                                                    &NtMartaStatic,
                                                    NULL) != NULL)
              {
  VOID
  UnloadNtMarta(VOID)
  {
 -    if (InterlockedExchangePointer(&NtMarta,
 +    if (InterlockedExchangePointer((PVOID)&NtMarta,
                                     NULL) != NULL)
      {
          FreeLibrary(NtMartaStatic.hDllInstance);
@@@ -1256,7 -1256,7 +1256,7 @@@ LookupPrivilegeValueA(LPCSTR lpSystemNa
      /* Check the privilege name is not NULL */
      if (lpName == NULL)
      {
-         SetLastError(ERROR_INVALID_PARAMETER);
+         SetLastError(ERROR_NO_SUCH_PRIVILEGE);
          return FALSE;
      }
  
@@@ -1334,7 -1334,7 +1334,7 @@@ LookupPrivilegeValueW(LPCWSTR SystemNam
  
    for (Priv = 0; Priv < sizeof(DefaultPrivNames) / sizeof(DefaultPrivNames[0]); Priv++)
      {
-       if (0 == wcscmp(PrivName, DefaultPrivNames[Priv]))
+       if (0 == wcsicmp(PrivName, DefaultPrivNames[Priv]))
          {
            Luid->LowPart = Priv + 1;
            Luid->HighPart = 0;
@@@ -1396,11 -1396,51 +1396,51 @@@ STDCAL
  LookupPrivilegeNameA(LPCSTR lpSystemName,
                       PLUID lpLuid,
                       LPSTR lpName,
-                      LPDWORD cbName)
+                      LPDWORD cchName)
  {
-     FIXME("%s() not implemented!\n", __FUNCTION__);
-     SetLastError (ERROR_CALL_NOT_IMPLEMENTED);
-     return FALSE;
+     UNICODE_STRING lpSystemNameW;
+     BOOL ret;
+     DWORD wLen = 0;
+     TRACE("%s %p %p %p\n", debugstr_a(lpSystemName), lpLuid, lpName, cchName);
+     RtlCreateUnicodeStringFromAsciiz(&lpSystemNameW, lpSystemName);
+     ret = LookupPrivilegeNameW(lpSystemNameW.Buffer, lpLuid, NULL, &wLen);
+     if (!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER)
+     {
+         LPWSTR lpNameW = HeapAlloc(GetProcessHeap(), 0, wLen * sizeof(WCHAR));
+         ret = LookupPrivilegeNameW(lpSystemNameW.Buffer, lpLuid, lpNameW,
+          &wLen);
+         if (ret)
+         {
+             /* Windows crashes if cchName is NULL, so will I */
+             unsigned int len = WideCharToMultiByte(CP_ACP, 0, lpNameW, -1, lpName,
+              *cchName, NULL, NULL);
+             if (len == 0)
+             {
+                 /* WideCharToMultiByte failed */
+                 ret = FALSE;
+             }
+             else if (len > *cchName)
+             {
+                 *cchName = len;
+                 SetLastError(ERROR_INSUFFICIENT_BUFFER);
+                 ret = FALSE;
+             }
+             else
+             {
+                 /* WideCharToMultiByte succeeded, output length needs to be
+                  * length not including NULL terminator
+                  */
+                 *cchName = len - 1;
+             }
+         }
+         HeapFree(GetProcessHeap(), 0, lpNameW);
+     }
+     RtlFreeUnicodeString(&lpSystemNameW);
+     return ret;
  }
  
  
@@@ -20,8 -20,6 +20,6 @@@ WINE_DEFAULT_DEBUG_CHANNEL(advapi)
  
  /* TYPES *********************************************************************/
  
- VOID HandleBind(VOID);
  typedef struct _ACTIVE_SERVICE
  {
      CLIENT_HANDLE hService;
@@@ -42,7 -40,6 +40,6 @@@
  
  /* GLOBALS *******************************************************************/
  
- extern handle_t BindingHandle;
  static DWORD dwActiveServiceCount = 0;
  static PACTIVE_SERVICE lpActiveServices = NULL;
  
@@@ -277,7 -274,7 +274,7 @@@ ScStartService(PSCM_CONTROL_PACKET Cont
      TRACE("Size: %lu\n", ControlPacket->dwSize);
      TRACE("Service: %S\n", &ControlPacket->szArguments[0]);
  
 -    lpService = (PACTIVE_SERVICE)ControlPacket->hClient;
 +    lpService = (PACTIVE_SERVICE)(ULONG_PTR)ControlPacket->hClient;
      if (lpService == NULL)
      {
          TRACE("Service not found\n");
@@@ -320,7 -317,7 +317,7 @@@ ScControlService(PSCM_CONTROL_PACKET Co
      TRACE("Size: %lu\n", ControlPacket->dwSize);
      TRACE("Service: %S\n", &ControlPacket->szArguments[0]);
  
 -    lpService = (PACTIVE_SERVICE)ControlPacket->hClient;
 +    lpService = (PACTIVE_SERVICE)(ULONG_PTR)ControlPacket->hClient;
      if (lpService == NULL)
      {
          TRACE("Service not found\n");
@@@ -457,7 -454,7 +454,7 @@@ RegisterServiceCtrlHandlerW(LPCWSTR lpS
      Service = ScLookupServiceByServiceName((LPWSTR)lpServiceName);
      if (Service == NULL)
      {
 -        return (SERVICE_STATUS_HANDLE)NULL;
 +        return INVALID_HANDLE_VALUE;
      }
  
      Service->HandlerFunction = lpHandlerProc;
@@@ -536,7 -533,7 +533,7 @@@ RegisterServiceCtrlHandlerExW(LPCWSTR l
   * @implemented
   */
  BOOL STDCALL
- I_ScSetServiceBitsA(SC_RPC_HANDLE hServiceStatus,
+ I_ScSetServiceBitsA(SERVICE_STATUS_HANDLE hServiceStatus,
                      DWORD dwServiceBits,
                      BOOL bSetBitsOn,
                      BOOL bUpdateImmediately,
  {
      BOOL bResult;
  
-     HandleBind();
      _SEH_TRY
      {
          /* Call to services.exe using RPC */
-         bResult = RI_ScSetServiceBitsA(BindingHandle,
-                                        (SC_RPC_HANDLE)hServiceStatus,
+         bResult = RI_ScSetServiceBitsA((RPC_SERVICE_STATUS_HANDLE)hServiceStatus,
                                         dwServiceBits,
                                         bSetBitsOn,
                                         bUpdateImmediately,
   * @implemented
   */
  BOOL STDCALL
- I_ScSetServiceBitsW(SC_RPC_HANDLE hServiceStatus,
+ I_ScSetServiceBitsW(SERVICE_STATUS_HANDLE hServiceStatus,
                      DWORD dwServiceBits,
                      BOOL bSetBitsOn,
                      BOOL bUpdateImmediately,
  {
      BOOL bResult;
  
-     HandleBind();
      _SEH_TRY
      {
          /* Call to services.exe using RPC */
-         bResult = RI_ScSetServiceBitsW(BindingHandle,
-                                        (SC_RPC_HANDLE)hServiceStatus,
+         bResult = RI_ScSetServiceBitsW((RPC_SERVICE_STATUS_HANDLE)hServiceStatus,
                                         dwServiceBits,
                                         bSetBitsOn,
                                         bUpdateImmediately,
@@@ -639,11 -630,8 +630,8 @@@ SetServiceStatus(SERVICE_STATUS_HANDLE 
      TRACE("SetServiceStatus() called\n");
      TRACE("hServiceStatus %lu\n", hServiceStatus);
  
-     HandleBind();
      /* Call to services.exe using RPC */
-     dwError = RSetServiceStatus(BindingHandle,
-                                 (SC_RPC_HANDLE)hServiceStatus,
+     dwError = RSetServiceStatus((RPC_SERVICE_STATUS_HANDLE)hServiceStatus,
                                  lpServiceStatus);
      if (dwError != ERROR_SUCCESS)
      {
@@@ -1,14 -1,12 +1,12 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
  <group>
 -<module name="comctl32" type="win32dll" baseaddress="${BASEADDRESS_COMCTL32}" installbase="system32" installname="comctl32.dll" allowwarnings="true">
 +<module name="comctl32" type="win32dll" baseaddress="${BASEADDRESS_COMCTL32}" installbase="system32" installname="comctl32.dll" unicode="yes">
        <autoregister infsection="OleControlDlls" type="DllInstall" />
        <importlibrary definition="comctl32.spec" />
        <include base="comctl32">.</include>
        <include base="ReactOS">include/reactos/wine</include>
        <define name="__WINESRC__" />
-       <define name="WINVER">0x600</define>
-       <define name="_WIN32_WINNT">0x600</define>
        <file>animate.c</file>
        <file>comboex.c</file>
        <file>comctl32undoc.c</file>
@@@ -1,13 -1,10 +1,11 @@@
  <module name="crtdll" type="win32dll" baseaddress="${BASEADDRESS_CRTDLL}" mangledsymbols="true" installbase="system32" installname="crtdll.dll">
 -      <importlibrary definition="crtdll.def" />
 +      <importlibrary definition="crtdll.spec" />
        <include base="crtdll">.</include>
        <include base="crt">include</include>
        <define name="_DISABLE_TIDENTS" />
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
        <define name="USE_MSVCRT_PREFIX" />
        <define name="_MSVCRT_LIB_" />
 +      <define name="_MSVCRT_" />
        <define name="__NO_CTYPE_INLINES" />
        <define name="_CTYPE_DISABLE_MACROS" />
        <define name="_NO_INLINING" />
@@@ -23,5 -20,4 +21,5 @@@
        <pch>precomp.h</pch>
        <file>dllmain.c</file>
        <file>crtdll.rc</file>
 +      <file>crtdll.spec</file>
  </module>
@@@ -2,9 -2,9 +2,8 @@@
        <importlibrary definition="dhcpcsvc.spec" />
        <include base="dhcpcsvc">include</include>
        <define name="_DISABLE_TIDENTS" />
-       <define name="_WIN32_WINNT=0x0500" />
        <library>ntdll</library>
        <library>kernel32</library>
 -      <library>msvcrt</library>
        <library>ws2_32</library>
        <library>iphlpapi</library>
        <file>dhcpcsvc.c</file>
@@@ -1,8 -1,7 +1,7 @@@
  <module name="fmifs" type="win32dll" entrypoint="InitializeFmIfs@12" baseaddress="${BASEADDRESS_FMIFS}" installbase="system32" installname="fmifs.dll">
 -      <importlibrary definition="fmifs.def" />
 +      <importlibrary definition="fmifs.spec" />
        <include base="fmifs">.</include>
        <define name="_DISABLE_TIDENTS" />
-       <define name="_WIN32_WINNT">0x0600</define>
        <library>ntdll</library>
        <library>kernel32</library>
        <file>chkdsk.c</file>
@@@ -14,6 -13,5 +13,6 @@@
        <file>media.c</file>
        <file>query.c</file>
        <file>fmifs.rc</file>
 +      <file>fmifs.spec</file>
        <pch>precomp.h</pch>
  </module>
@@@ -1,9 -1,7 +1,7 @@@
 -<module name="gdi32" type="win32dll" baseaddress="${BASEADDRESS_GDI32}" installbase="system32" installname="gdi32.dll" unicode="yes">
 -      <importlibrary definition="gdi32.def" />
 +<module name="gdi32" type="win32dll" baseaddress="${BASEADDRESS_GDI32}" installbase="system32" installname="gdi32.dll" unicode="yes" allowwarnings="true">
 +      <importlibrary definition="gdi32.spec" />
        <include base="gdi32">include</include>
        <define name="_DISABLE_TIDENTS" />
-       <define name="WINVER">0x0600</define>
-       <define name="_WIN32_WINNT">0x0501</define>
        <define name="LANGPACK" />
        <library>user32</library>
        <library>kernel32</library>
@@@ -51,5 -49,4 +49,5 @@@
                <file>path.c</file>
        </directory>
        <file>gdi32.rc</file>
 +      <file>gdi32.spec</file>
  </module>
@@@ -2,11 -2,11 +2,10 @@@
        <importlibrary definition="icmp.spec" />
        <include base="icmp">.</include>
        <include base="ReactOS">include/reactos/wine</include>
-       <define name="_WIN32_WINNT">0x501</define>
        <library>wine</library>
        <library>kernel32</library>
        <library>ws2_32</library>
        <library>wine</library>
 -      <library>msvcrt</library>
        <file>icmp_main.c</file>
        <file>icmp.rc</file>
        <file>icmp.spec</file>
@@@ -1,14 -1,13 +1,13 @@@
  <?xml version="1.0"?>
  <!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
  <group>
 -      <module name="kernel32_base" type="objectlibrary">
 +      <module name="kernel32_base" type="objectlibrary" allowwarnings="true">
                <include base="kernel32_base">.</include>
                <include base="kernel32_base">include</include>
                <include base="ReactOS">include/reactos/subsys</include>
                <define name="_DISABLE_TIDENTS" />
                <define name="_WIN32_WINNT">0x0600</define>
                <define name="__NO_CTYPE_INLINES" />
-               <define name="WINVER">0x609</define>
                <define name="NTDDI_VERSION">0x05020100</define>
                <dependency>errcodes</dependency>
                <pch>k32.h</pch>
                        <file>lcformat.c</file>
                        <file>profile.c</file>
                        <file>utils.c</file>
-                       <file>icustubs.cpp</file>
                </directory>
                <directory name="thread">
                        <if property="ARCH" value="i386">
                                        <file>thread.S</file>
                                </directory>
                        </if>
 +                      <if property="ARCH" value="amd64">
 +                              <directory name="amd64">
 +                                      <file>fiber.S</file>
 +                                      <file>thread.S</file>
 +                              </directory>
 +                      </if>
                </directory>
+               <compilerflag compiler="cpp">-fno-exceptions</compilerflag>
+               <compilerflag compiler="cpp">-fno-rtti</compilerflag>
+               <directory name="misc">
+                       <file>icustubs.cpp</file>
+               </directory>
+               <library>normalize</library>
        </module>
        <module name="kernel32" type="win32dll" baseaddress="${BASEADDRESS_KERNEL32}" installbase="system32" installname="kernel32.dll">
 -              <importlibrary definition="kernel32.def" />
 +              <importlibrary definition="kernel32.spec" />
                <include base="kernel32">.</include>
                <include base="kernel32" root="intermediate">.</include>
                <include base="kernel32">include</include>
                <define name="_DISABLE_TIDENTS" />
-               <define name="WINVER">0x0500</define>
                <library>kernel32_base</library>
                <library>wine</library>
                <library>pseh</library>
  
                <file>kernel32.rc</file>
  
-               <library>normalize</library>
-               <library>icu4ros</library>
                <library>ntdll</library>
 +              <file>kernel32.spec</file>
        </module>
  </group>
@@@ -1,9 -1,7 +1,7 @@@
  <module name="lsasrv" type="win32dll" entrypoint="0" baseaddress="${BASEADDRESS_LSASRV}" installbase="system32" installname="lsasrv.dll" unicode="yes">
 -      <importlibrary definition="lsasrv.def" />
 +      <importlibrary definition="lsasrv.spec" />
        <include base="lsasrv">.</include>
        <include base="lsa_server">.</include>
-       <define name="WINVER">0x600</define>
-       <define name="_WIN32_WINNT">0x0600</define>
        <library>lsa_server</library>
        <library>wine</library>
        <library>kernel32</library>
@@@ -13,5 -11,4 +11,5 @@@
        <file>lsarpc.c</file>
        <file>lsasrv.c</file>
        <file>lsasrv.rc</file>
 -</module>
 +      <file>lsasrv.spec</file>
 +</module>
@@@ -1,12 -1,9 +1,10 @@@
  <module name="msvcrt" type="win32dll" baseaddress="${BASEADDRESS_MSVCRT}" mangledsymbols="true" installbase="system32" installname="msvcrt.dll">
 -      <importlibrary definition="msvcrt.def" />
 +      <importlibrary definition="msvcrt-$(ARCH).def" />
        <include base="msvcrt">.</include>
        <include base="crt">include</include>
        <define name="_DISABLE_TIDENTS" />
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
        <define name="USE_MSVCRT_PREFIX" />
 +      <define name="_MSVCRT_" />
        <define name="_MSVCRT_LIB_" />
        <define name="_MT" />
        <define name="__NO_CTYPE_INLINES" />
@@@ -6,11 -6,10 +6,9 @@@
        <include base="msvcrt20">.</include>
        <include base="ReactOS">include/reactos/wine</include>
        <define name="__WINESRC__" />
-       <define name="WINVER">0x600</define>
-       <define name="_WIN32_WINNT">0x600</define>
        <file>msvcrt20.c</file>
        <file>msvcrt20.spec</file>
        <library>wine</library>
 -      <library>msvcrt</library>
        <library>kernel32</library>
        <library>ntdll</library>
  </module>
@@@ -3,10 -3,7 +3,6 @@@
        <importlibrary definition="rpcrt4.spec" />
        <include base="rpcrt4">.</include>
        <include base="ReactOS">include/reactos/wine</include>
-       <define name="__USE_W32API" />
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
-       <define name="WINVER">0x501</define>
 -      <define name="_STDDEF_H" />
        <define name="_RPCRT4_" />
        <define name="COM_NO_WINDOWS_H" />
        <define name="MSWMSG" />
@@@ -1,9 -1,8 +1,8 @@@
  <module name="secur32" type="win32dll" baseaddress="${BASEADDRESS_SECUR32}" installbase="system32" installname="secur32.dll">
 -      <importlibrary definition="secur32.def" />
 +      <importlibrary definition="secur32.spec" />
        <include base="secur32">.</include>
        <include base="ReactOS">include/reactos/subsys</include>
        <define name="__SECUR32__" />
-       <define name="_WIN32_WINNT">0x501</define>
        <library>ntdll</library>
        <library>kernel32</library>
        <library>advapi32</library>
@@@ -12,6 -11,5 +11,6 @@@
        <file>secext.c</file>
        <file>sspi.c</file>
        <file>secur32.rc</file>
 +      <file>secur32.spec</file>
        <pch>precomp.h</pch>
  </module>
@@@ -23,8 -23,6 +23,6 @@@
   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
   */
  
- #include "config.h"
  #include <user32.h>
  #include "dde_private.h"
  #include "wine/unicode.h"
@@@ -46,7 -44,7 +44,7 @@@ CRITICAL_SECTION_DEBUG critsect_debug 
  {
      0, 0, &WDML_CritSect,
      { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
 -      0, 0, { (DWORD_PTR)(__FILE__ ": WDML_CritSect") }
 +      0, 0, { (DWORD_PTR)0/*(__FILE__ ": WDML_CritSect")*/ }
  };
  CRITICAL_SECTION WDML_CritSect = { &critsect_debug, -1, 0, 0, 0, 0 };
  
@@@ -42,8 -42,22 +42,22 @@@ GetMouseMovePointsEx
    int nBufPoints,
    DWORD resolution)
  {
-   UNIMPLEMENTED;
-   return 0;
+     if((cbSize != sizeof(MOUSEMOVEPOINT)) || (nBufPoints < 0) || (nBufPoints > 64))
+       {
+         SetLastError(ERROR_INVALID_PARAMETER);
+         return -1;
+     }
+     if(!lppt || !lpptBuf)
+       {
+         SetLastError(ERROR_NOACCESS);
+         return -1;
+     }
+     UNIMPLEMENTED;
+     SetLastError(ERROR_POINT_NOT_FOUND);
+     return -1;
  }
  
  
@@@ -137,8 -151,15 +151,15 @@@ GetInternalWindowPos
                     LPPOINT ptIcon
                     )
  {
-   UNIMPLEMENTED;
-   return FALSE;
+     WINDOWPLACEMENT wndpl;
+     if (GetWindowPlacement(hwnd, &wndpl))
+     {
+               if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
+               if (ptIcon)  *ptIcon = wndpl.ptMinPosition;
+               return wndpl.showCmd;
+     }
+     return 0;
  }
  
  /*
@@@ -206,7 -227,7 +227,7 @@@ DragObject
           HWND    hwnd1,
           HWND    hwnd2,
           UINT    u1,
 -         DWORD   dw1,
 +         ULONG_PTR   dw1,
           HCURSOR hc1
           )
  {
@@@ -226,41 -247,91 +247,91 @@@ UserRealizePalette ( HDC hDC 
    return NtUserCallOneParam((DWORD) hDC, ONEPARAM_ROUTINE_REALIZEPALETTE);
  }
  
- /*
-  * @unimplemented
-  */
- HANDLE
- WINAPI
- SetSysColorsTemp(
-                const COLORREF *pPens,
-                const HBRUSH   *pBrushes,
-                INT            n
-                )
- {
-   UNIMPLEMENTED;
-   return FALSE;
- }
  
- /*
-  * @unimplemented
+ /*************************************************************************
+  *            SetSysColorsTemp (USER32.@) (Wine 10/22/2008)
+  *
+  * UNDOCUMENTED !!
+  *
+  * Called by W98SE desk.cpl Control Panel Applet:
+  * handle = SetSysColorsTemp(ptr, ptr, nCount);     ("set" call)
+  * result = SetSysColorsTemp(NULL, NULL, handle);   ("restore" call)
+  *
+  * pPens is an array of COLORREF values, which seems to be used
+  * to indicate the color values to create new pens with.
+  *
+  * pBrushes is an array of solid brush handles (returned by a previous
+  * CreateSolidBrush), which seems to contain the brush handles to set
+  * for the system colors.
+  *
+  * n seems to be used for
+  *   a) indicating the number of entries to operate on (length of pPens,
+  *      pBrushes)
+  *   b) passing the handle that points to the previously used color settings.
+  *      I couldn't figure out in hell what kind of handle this is on
+  *      Windows. I just use a heap handle instead. Shouldn't matter anyway.
+  *
+  * RETURNS
+  *     heap handle of our own copy of the current syscolors in case of
+  *                 "set" call, i.e. pPens, pBrushes != NULL.
+  *     TRUE (unconditionally !) in case of "restore" call,
+  *          i.e. pPens, pBrushes == NULL.
+  *     FALSE in case of either pPens != NULL and pBrushes == NULL
+  *          or pPens == NULL and pBrushes != NULL.
+  *
+  * I'm not sure whether this implementation is 100% correct. [AM]
   */
- WORD
- STDCALL
- CascadeChildWindows ( HWND hWndParent, WORD wFlags )
- {
-   UNIMPLEMENTED;
-   return FALSE;
- }
  
- /*
-  * @unimplemented
-  */
- WORD
- STDCALL
- TileChildWindows ( HWND hWndParent, WORD wFlags )
- {
-   UNIMPLEMENTED;
-   return FALSE;
+ static HPEN SysColorPens[COLOR_MENUBAR + 1];
+ static HBRUSH SysColorBrushes[COLOR_MENUBAR + 1];
+ DWORD
+ WINAPI
+ SetSysColorsTemp(const COLORREF *pPens,
+                  const HBRUSH *pBrushes,
+                                DWORD n)
+ {
+     DWORD i;
+     if (pPens && pBrushes) /* "set" call */
+     {
+         /* allocate our structure to remember old colors */
+         LPVOID pOldCol = HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD)+n*sizeof(HPEN)+n*sizeof(HBRUSH));
+         LPVOID p = pOldCol;
+         *(DWORD *)p = n; p = (char*)p + sizeof(DWORD);
+         memcpy(p, SysColorPens, n*sizeof(HPEN)); p = (char*)p + n*sizeof(HPEN);
+         memcpy(p, SysColorBrushes, n*sizeof(HBRUSH)); p = (char*)p + n*sizeof(HBRUSH);
+         for (i=0; i < n; i++)
+         {
+             SysColorPens[i] = CreatePen( PS_SOLID, 1, pPens[i] );
+             SysColorBrushes[i] = pBrushes[i];
+         }
+         return (DWORD) pOldCol; /* FIXME: pointer truncation */
+     }
+     if (!pPens && !pBrushes) /* "restore" call */
+     {
+         LPVOID pOldCol = (LPVOID)n; /* FIXME: not 64-bit safe */
+         LPVOID p = pOldCol;
+         DWORD nCount = *(DWORD *)p;
+         p = (char*)p + sizeof(DWORD);
+         for (i=0; i < nCount; i++)
+         {
+             DeleteObject(SysColorPens[i]);
+             SysColorPens[i] = *(HPEN *)p; p = (char*)p + sizeof(HPEN);
+         }
+         for (i=0; i < nCount; i++)
+         {
+             SysColorBrushes[i] = *(HBRUSH *)p; p = (char*)p + sizeof(HBRUSH);
+         }
+         /* get rid of storage structure */
+         HeapFree(GetProcessHeap(), 0, pOldCol);
+         return TRUE;
+     }
+     return FALSE;
  }
  
  /*
@@@ -308,7 -379,7 +379,7 @@@ GetRawInputDeviceInfoW
      PUINT pcbSize)
  {
    UNIMPLEMENTED;
-   return FALSE;
+   return 0;
  }
  
  /*
@@@ -340,7 -411,7 +411,7 @@@ GetRawInputDeviceInfoA
      PUINT pcbSize)
  {
    UNIMPLEMENTED;
-   return FALSE;
+   return 0;
  }
  
  /*
@@@ -365,7 -436,7 +436,7 @@@ DefRawInputProc
      UINT cbSizeHeader)
  {
    UNIMPLEMENTED;
-   return FALSE;
+   return 0;
  }
  
  /*
  UINT
  STDCALL
  GetRawInputBuffer(
-     PRAWINPUT   pData,
-     PUINT    pcbSize,
-     UINT         cbSizeHeader)
+     PRAWINPUT pData,
+     PUINT pcbSize,
+     UINT cbSizeHeader)
  {
    UNIMPLEMENTED;
-   return FALSE;
+   return 0;
  }
  
  /*
  UINT
  STDCALL
  GetRawInputData(
-     HRAWINPUT    hRawInput,
-     UINT         uiCommand,
-     LPVOID      pData,
-     PUINT    pcbSize,
-     UINT         cbSizeHeader)
+     HRAWINPUT hRawInput,
+     UINT uiCommand,
+     LPVOID pData,
+     PUINT pcbSize,
+     UINT cbSizeHeader)
  {
    UNIMPLEMENTED;
-   return FALSE;
+   return 0;
  }
  
  /*
@@@ -408,8 -479,12 +479,12 @@@ GetRawInputDeviceList
      PUINT puiNumDevices,
      UINT cbSize)
  {
-   UNIMPLEMENTED;
-   return FALSE;
+     if(pRawInputDeviceList)
+         memset(pRawInputDeviceList, 0, sizeof *pRawInputDeviceList);
+     *puiNumDevices = 0;
+     UNIMPLEMENTED;
+     return 0;
  }
  
  /*
@@@ -423,7 -498,7 +498,7 @@@ GetRegisteredRawInputDevices
      UINT cbSize)
  {
    UNIMPLEMENTED;
-   return FALSE;
+   return 0;
  }
  
  /*
@@@ -1,11 -1,9 +1,9 @@@
 -<module name="user32" type="win32dll" baseaddress="${BASEADDRESS_USER32}" installbase="system32" installname="user32.dll" unicode="yes">
 -      <importlibrary definition="user32.def" />
 +<module name="user32" type="win32dll" baseaddress="${BASEADDRESS_USER32}" installbase="system32" installname="user32.dll" unicode="yes" allowwarnings="true">
 +      <importlibrary definition="user32.spec" />
        <include base="user32">.</include>
        <include base="user32">include</include>
        <include base="ReactOS">include/reactos/subsys</include>
        <define name="_DISABLE_TIDENTS" />
-       <define name="WINVER">0x0600</define>
-       <define name="_WIN32_WINNT">0x0501</define>
        <library>wine</library>
        <library>gdi32</library>
        <library>kernel32</library>
@@@ -75,5 -73,4 +73,5 @@@
                <file>winpos.c</file>
        </directory>
        <file>user32.rc</file>
 +      <file>user32.spec</file>
  </module>
@@@ -1,9 -1,6 +1,6 @@@
  <module name="userenv" type="win32dll" baseaddress="${BASEADDRESS_USERENV}" installbase="system32" installname="userenv.dll">
 -      <importlibrary definition="userenv.def" />
 +      <importlibrary definition="userenv.spec" />
        <include base="userenv">.</include>
-       <define name="_WIN32_IE">0x0500</define>
-       <define name="_WIN32_WINNT">0x0600</define>
-       <define name="WINVER">0x0600</define>
        <library>uuid</library>
        <library>ntdll</library>
        <library>kernel32</library>
@@@ -20,5 -17,4 +17,5 @@@
        <file>setup.c</file>
        <file>userenv.c</file>
        <file>userenv.rc</file>
 +      <file>userenv.spec</file>
  </module>
@@@ -2,9 -2,6 +2,6 @@@
        <importlibrary definition="midimap.spec" />
        <include base="midimap">.</include>
        <include base="ReactOS">include/wine</include>
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
-       <define name="WINVER">0x501</define>
        <library>wine</library>
        <library>uuid</library>
        <library>ntdll</library>
@@@ -12,6 -9,7 +9,6 @@@
        <library>advapi32</library>
        <library>user32</library>
        <library>winmm</library>
 -      <library>msvcrt</library>
        <file>midimap.c</file>
        <file>midimap.rc</file>
        <file>midimap.spec</file>
@@@ -1,11 -1,12 +1,13 @@@
  <module name="winspool" type="win32dll" extension=".drv" baseaddress="${BASEADDRESS_WINSPOOL}" installbase="system32" installname="winspool.drv" allowwarnings="true" unicode="yes">
 -      <importlibrary definition="winspool.def" />
 +      <importlibrary definition="winspool.spec" />
        <include base="winspool">.</include>
        <define name="_DISABLE_TIDENTS" />
        <library>ntdll</library>
        <library>kernel32</library>
+       <library>advapi32</library>
+       <library>shlwapi</library>
        <file>info.c</file>
        <file>stubs.c</file>
        <file>winspool.rc</file>
 +      <file>winspool.spec</file>
  </module>
@@@ -1,10 -1,9 +1,9 @@@
  <module name="ws2_32" type="win32dll" baseaddress="${BASEADDRESS_WS2_32}" installbase="system32" installname="ws2_32.dll" unicode="yes">
 -      <importlibrary definition="ws2_32.def" />
 +      <importlibrary definition="ws2_32.spec" />
        <include base="ws2_32">include</include>
        <include base="ReactOS">include/reactos/wine</include>
        <define name="_DISABLE_TIDENTS" />
        <define name="LE" />
-       <define name="_WIN32_WINNT">0x0500</define>
        <library>wine</library>
        <library>ntdll</library>
        <library>kernel32</library>
@@@ -27,6 -26,4 +26,6 @@@
                <file>async.c</file>
        </directory>
        <file>ws2_32.rc</file>
 +      <file>ws2_32.spec</file>
  </module>
 +
@@@ -30,7 -30,7 +30,7 @@@ void OskitDumpBuffer( PCHAR Data, UINT 
  
      for( i = 0; i < Len; i++ ) {
        if( i && !(i & 0xf) ) DbgPrint( "\n" );
 -      if( !(i & 0xf) ) DbgPrint( "%08x: ", (UINT)(Data + i) );
 +      if( !(i & 0xf) ) DbgPrint( "%08x: ", (UINT_PTR)(Data + i) );
        DbgPrint( " %02x", Data[i] & 0xff );
      }
      DbgPrint("\n");
@@@ -221,10 -221,6 +221,6 @@@ VOID DestroySocket( PAFD_FCB FCB ) 
        ExFreePool( FCB->LocalAddress );
      if( FCB->RemoteAddress )
        ExFreePool( FCB->RemoteAddress );
-     if( FCB->ListenIrp.ConnectionReturnInfo )
-       ExFreePool( FCB->ListenIrp.ConnectionReturnInfo );
-     if( FCB->ListenIrp.ConnectionCallInfo )
-       ExFreePool( FCB->ListenIrp.ConnectionCallInfo );
      if( FCB->TdiDeviceName.Buffer )
        ExFreePool(FCB->TdiDeviceName.Buffer);
  
@@@ -285,6 -285,14 +285,15 @@@ NTSTATUS FileOpenAddress
    case IPPROTO_TCP:
        AddrFile->Port =
            TCPAllocatePort(Address->Address[0].Address[0].sin_port);
 -      if (Address->Address[0].Address[0].sin_port &&
 -          AddrFile->Port != Address->Address[0].Address[0].sin_port)
++      if ((Address->Address[0].Address[0].sin_port &&
++           AddrFile->Port != Address->Address[0].Address[0].sin_port) ||
++           AddrFile->Port == 0xffff)
+       {
+           ExFreePool(AddrFile);
+           return STATUS_INVALID_PARAMETER;
+       }
        AddrFile->Send = NULL; /* TCPSendData */
        break;
  
        TI_DbgPrint(MID_TRACE,("Allocating udp port\n"));
        AddrFile->Port =
          UDPAllocatePort(Address->Address[0].Address[0].sin_port);
 -      if (Address->Address[0].Address[0].sin_port &&
 -          AddrFile->Port != Address->Address[0].Address[0].sin_port)
++      if ((Address->Address[0].Address[0].sin_port &&
++           AddrFile->Port != Address->Address[0].Address[0].sin_port) ||
++           AddrFile->Port == 0xffff)
+       {
+           ExFreePool(AddrFile);
+           return STATUS_INVALID_PARAMETER;
+       }
        TI_DbgPrint(MID_TRACE,("Setting port %d (wanted %d)\n",
                               AddrFile->Port,
                               Address->Address[0].Address[0].sin_port));
@@@ -749,11 -749,11 +749,11 @@@ typedef struct _KUSER_SHARED_DAT
  
  typedef enum _IO_PAGING_PRIORITY
  {
-   IoPagingPriorityInvalid,        
-   IoPagingPriorityNormal,         
-   IoPagingPriorityHigh,           
-   IoPagingPriorityReserved1,      
-   IoPagingPriorityReserved2       
+   IoPagingPriorityInvalid,
+   IoPagingPriorityNormal,
+   IoPagingPriorityHigh,
+   IoPagingPriorityReserved1,
+   IoPagingPriorityReserved2
  } IO_PAGING_PRIORITY;
  
  typedef enum _IO_ALLOCATION_ACTION {
@@@ -1759,25 -1759,8 +1759,25 @@@ typedef struct _CM_PARTIAL_RESOURCE_DES
      struct {
        ULONG Level;
        ULONG Vector;
 -      ULONG Affinity;
 +      KAFFINITY Affinity;
      } Interrupt;
 +#if (NTDDI_VERSION >= NTDDI_LONGHORN)
 +    struct {
 +      union {
 +        struct {
 +          USHORT Reserved;
 +          USHORT MessageCount;
 +          ULONG Vector;
 +          KAFFINITY Affinity;
 +        } Raw;
 +        struct {
 +          ULONG Level;
 +          ULONG Vector;
 +          KAFFINITY Affinity;
 +        } Translated;
 +      };
 +    } MessageInterrupt;
 +#endif
      struct {
        PHYSICAL_ADDRESS Start;
        ULONG Length;
        ULONG Reserved1;
        ULONG Reserved2;
      } DeviceSpecificData;
 +#if (NTDDI_VERSION >= NTDDI_LONGHORN)
 +    struct {
 +      PHYSICAL_ADDRESS Start;
 +      ULONG Length40;
 +    } Memory40;
 +    struct {
 +      PHYSICAL_ADDRESS Start;
 +      ULONG Length48;
 +    } Memory48;
 +    struct {
 +      PHYSICAL_ADDRESS Start;
 +      ULONG Length64;
 +    } Memory64;
 +#endif
    } u;
  } CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
  
@@@ -2393,7 -2362,7 +2393,7 @@@ typedef struct _SCATTER_GATHER_ELEMENT 
  typedef struct _SCATTER_GATHER_LIST {
    ULONG  NumberOfElements;
    ULONG_PTR  Reserved;
-   SCATTER_GATHER_ELEMENT  Elements[0];
+   SCATTER_GATHER_ELEMENT  Elements[1];
  } SCATTER_GATHER_LIST, *PSCATTER_GATHER_LIST;
  
  typedef struct _MDL {
@@@ -2794,6 -2763,7 +2794,7 @@@ typedef enum _KD_OPTION 
  } KD_OPTION;
  
  /* Function Type Defintions for Dispatch Functions */
+ struct _DEVICE_CONTROL_CONTEXT;
  
  typedef VOID
  (DDKAPI *PDEVICE_CONTROL_COMPLETION)(
@@@ -4472,6 -4442,8 +4473,8 @@@ typedef struct _RTL_BITMAP_RUN 
      ULONG  NumberOfBits;
  } RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
  
+ struct _RTL_RANGE;
  typedef BOOLEAN
  (NTAPI *PRTL_CONFLICT_RANGE_CALLBACK) (
      PVOID Context,
@@@ -4837,6 -4809,8 +4840,8 @@@ typedef enum _KBUGCHECK_CALLBACK_REASO
    KbCallbackDumpIo,
  } KBUGCHECK_CALLBACK_REASON;
  
+ struct _KBUGCHECK_REASON_CALLBACK_RECORD;
  typedef VOID
  (DDKAPI *PKBUGCHECK_REASON_CALLBACK_ROUTINE)(
    IN KBUGCHECK_CALLBACK_REASON  Reason,
@@@ -5470,8 -5444,6 +5475,8 @@@ typedef struct _KPCR 
    ULONG HalReserved[16];            // For use by Hal
  } KPCR, *PKPCR;                 /* 54 */
  
 +#define KeGetPcr()                      PCR
 +
  typedef struct _KFLOATING_SAVE {
    ULONG  ControlWord;
    ULONG  StatusWord;
@@@ -5689,8 -5661,6 +5694,8 @@@ typedef struct _KPCR 
    UCHAR  Number;                /* 51 */
  } KPCR, *PKPCR;                 /* 54 */
  
 +#define KeGetPcr()                      PCR
 +
  static __inline
  ULONG
  DDKAPI
@@@ -5725,8 -5695,6 +5730,8 @@@ typedef struct _KPCR 
      ULONG  IDR;                   /* 30 */
  } KPCR, *PKPCR;
  
 +#define KeGetPcr()                      PCR
 +
  typedef struct _KFLOATING_SAVE {
  } KFLOATING_SAVE, *PKFLOATING_SAVE;
  
@@@ -5824,7 -5792,6 +5829,7 @@@ typedef struct _PCIBUSDAT
  } PCIBUSDATA, *PPCIBUSDATA;
  
  
 +/** INTERLOCKED FUNCTIONS *****************************************************/
  
  #if !defined(__INTERLOCKED_DECLARED)
  #define __INTERLOCKED_DECLARED
@@@ -5941,97 -5908,64 +5946,97 @@@ InterlockedExchangeAdd
  #define InterlockedPushEntrySList(Head, Entry) ExpInterlockedPushEntrySList(Head, Entry)
  #define InterlockedFlushSList(Head) ExpInterlockedFlushSList(Head)
  #define QueryDepthSList(Head) ExQueryDepthSList(Head)
 -#endif // !defined(_WINBASE_
 +#endif // !defined(_WINBASE_)
  
  #endif // _M_AMD64
  
  #endif /* !__INTERLOCKED_DECLARED */
  
 +
 +/** SPINLOCK FUNCTIONS ********************************************************/
 +
  NTKERNELAPI
 -VOID
 +BOOLEAN
  FASTCALL
 -KefAcquireSpinLockAtDpcLevel(
 -  IN PKSPIN_LOCK  SpinLock);
 +KeTryToAcquireSpinLockAtDpcLevel(
 +    IN OUT PKSPIN_LOCK SpinLock
 +);
 +
 +#if defined (_X86_)
  
  NTKERNELAPI
  VOID
 -FASTCALL
 -KefReleaseSpinLockFromDpcLevel(
 +NTAPI
 +KeInitializeSpinLock(
    IN PKSPIN_LOCK  SpinLock);
  
 -#if defined(_M_AMD64)
 -NTKERNELAPI
 +NTHALAPI
  KIRQL
  FASTCALL
  KfAcquireSpinLock(
    IN PKSPIN_LOCK SpinLock);
  
 -NTKERNELAPI
 +NTHALAPI
  VOID
  FASTCALL
  KfReleaseSpinLock(
    IN PKSPIN_LOCK SpinLock,
    IN KIRQL NewIrql);
 -#else
 -NTHALAPI
 -KIRQL
 -FASTCALL
 -KfAcquireSpinLock(
 -  IN PKSPIN_LOCK SpinLock);
  
 -NTHALAPI
 +NTKERNELAPI
  VOID
  FASTCALL
 -KfReleaseSpinLock(
 -  IN PKSPIN_LOCK SpinLock,
 -  IN KIRQL NewIrql);
 -#endif
 +KefAcquireSpinLockAtDpcLevel(
 +  IN PKSPIN_LOCK  SpinLock);
  
  NTKERNELAPI
 -BOOLEAN
 +VOID
  FASTCALL
 -KeTryToAcquireSpinLockAtDpcLevel(
 -    IN OUT PKSPIN_LOCK SpinLock
 -);
 +KefReleaseSpinLockFromDpcLevel(
 +  IN PKSPIN_LOCK  SpinLock);
  
  #define KeAcquireSpinLockAtDpcLevel(SpinLock) KefAcquireSpinLockAtDpcLevel(SpinLock)
  #define KeReleaseSpinLockFromDpcLevel(SpinLock) KefReleaseSpinLockFromDpcLevel(SpinLock)
  #define KeAcquireSpinLock(a,b)  *(b) = KfAcquireSpinLock(a)
  #define KeReleaseSpinLock(a,b)  KfReleaseSpinLock(a,b)
  
 +#else // !defined (_X86_)
 +
 +FORCEINLINE
 +VOID
 +NTAPI
 +KeInitializeSpinLock(
 +  PKSPIN_LOCK SpinLock)
 +{
 +    *SpinLock = 0;
 +}
 +
 +NTKERNELAPI
 +VOID
 +KeReleaseSpinLock(
 +  IN PKSPIN_LOCK SpinLock,
 +  IN KIRQL NewIrql);
 +
 +NTKERNELAPI
 +VOID
 +KeAcquireSpinLockAtDpcLevel(
 +  IN PKSPIN_LOCK SpinLock);
 +
 +NTKERNELAPI
 +VOID
 +KeReleaseSpinLockFromDpcLevel(
 +  IN PKSPIN_LOCK SpinLock);
 +
 +NTKERNELAPI
 +KIRQL
 +KeAcquireSpinLockRaiseToDpc(
 +  IN PKSPIN_LOCK SpinLock);
 +
 +#define KeAcquireSpinLock(SpinLock, OldIrql) \
 +  *(OldIrql) = KeAcquireSpinLockRaiseToDpc(SpinLock)
 +
 +#endif // !defined (_X86_)
 +
  #define RtlCopyMemoryNonTemporal RtlCopyMemory
  
  #define KeGetDcacheFillSize() 1L
@@@ -6430,23 -6364,17 +6435,23 @@@ RtlConvertLongToLargeInteger(LONG Signe
      return Result;
  }
  
 +static __inline
 +LARGE_INTEGER
 +NTAPI_INLINE
 +RtlConvertUlongToLargeInteger(
 +  ULONG UnsignedInteger)
 +{
 +    LARGE_INTEGER ret;
 +    ret.QuadPart = UnsignedInteger;
 +    return ret;
 +}
 +
  NTSYSAPI
  LUID
  NTAPI
  RtlConvertLongToLuid(
    IN LONG  Long);
  
 -NTSYSAPI
 -LARGE_INTEGER
 -NTAPI
 -RtlConvertUlongToLargeInteger(
 -  IN ULONG  UnsignedInteger);
  
  NTSYSAPI
  LUID
@@@ -6454,37 -6382,6 +6459,37 @@@ NTAP
  RtlConvertUlongToLuid(
    ULONG  Ulong);
  
 +#ifdef _M_AMD64
 +
 +static __inline
 +LARGE_INTEGER
 +NTAPI_INLINE
 +RtlExtendedIntegerMultiply(
 +  LARGE_INTEGER Multiplicand,
 +  LONG Multiplier)
 +{
 +    LARGE_INTEGER ret;
 +    ret.QuadPart = Multiplicand.QuadPart * Multiplier;
 +    return ret;
 +}
 +
 +static __inline
 +LARGE_INTEGER
 +NTAPI_INLINE
 +RtlExtendedLargeIntegerDivide(
 +  LARGE_INTEGER Dividend,
 +  ULONG Divisor,
 +  PULONG Remainder)
 +{
 +    LARGE_INTEGER ret;
 +    ret.QuadPart = (ULONG64)Dividend.QuadPart / Divisor;
 +    if (Remainder)
 +        *Remainder = (ULONG)(Dividend.QuadPart % Divisor);
 +    return ret;
 +}
 +
 +#endif
 +
  /*
   * VOID
   * RtlCopyMemory(
@@@ -9690,6 -9587,12 +9695,6 @@@ KeInitializeSemaphore
    IN LONG  Count,
    IN LONG  Limit);
  
 -NTKERNELAPI
 -VOID
 -NTAPI
 -KeInitializeSpinLock(
 -  IN PKSPIN_LOCK  SpinLock);
 -
  NTKERNELAPI
  VOID
  NTAPI
@@@ -10428,11 -10331,11 +10433,11 @@@ MmMarkPhysicalMemoryAsGood
   *   IN MM_PAGE_PRIORITY  Priority)
   */
  #define MmGetSystemAddressForMdlSafe(_Mdl, _Priority) \
 -  ((_Mdl)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA \
 +  (((_Mdl)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA \
      | MDL_SOURCE_IS_NONPAGED_POOL)) ? \
      (_Mdl)->MappedSystemVa : \
      (PVOID) MmMapLockedPagesSpecifyCache((_Mdl), \
 -      KernelMode, MmCached, NULL, FALSE, _Priority)
 +      KernelMode, MmCached, NULL, FALSE, (_Priority)))
  
  NTKERNELAPI
  PVOID
@@@ -16,9 -16,7 +16,9 @@@ Author
      Alex Ionescu (alex.ionescu@reactos.com)   06-Oct-2004
  
  --*/
 -
 +#ifdef _M_AMD64
 +# include "amd64/asm.h"
 +#else
  #ifndef _ASM_H
  #define _ASM_H
  
  #define TEB_STACK_BASE                          0x4
  #define TEB_STACK_LIMIT                         0x8
  #define TEB_FIBER_DATA                          0x10
+ #define TEB_SELF                                0x18
  #define TEB_PEB                                 0x30
  #define TEB_EXCEPTION_CODE                      0x1A4
  #define TEB_ACTIVATION_CONTEXT_STACK_POINTER    0x1A8
  
  
  
 +#endif
  
  
@@@ -499,7 -499,7 +499,7 @@@ static __inline__ __attribute__((always
  static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandreset(volatile long * a, const long b)
  {
        unsigned char retval;
-       __asm__("lock; btrl %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "=m" (*a) : [b] "Ir" (b) : "memory");
+       __asm__("lock; btrl %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "+m" (*a) : [b] "Ir" (b) : "memory");
        return retval;
  }
  
  static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandreset64(volatile long long * a, const long long b)
  {
        unsigned char retval;
-       __asm__("lock; btrq %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "=m" (*a) : [b] "Ir" (b) : "memory");
+       __asm__("lock; btrq %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "+m" (*a) : [b] "Ir" (b) : "memory");
        return retval;
  }
  #endif
  static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandset(volatile long * a, const long b)
  {
        unsigned char retval;
-       __asm__("lock; btsl %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "=m" (*a) : [b] "Ir" (b) : "memory");
+       __asm__("lock; btsl %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "+m" (*a) : [b] "Ir" (b) : "memory");
        return retval;
  }
  
  static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandset64(volatile long long * a, const long long b)
  {
        unsigned char retval;
-       __asm__("lock; btsq %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "=m" (*a) : [b] "Ir" (b) : "memory");
+       __asm__("lock; btsq %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "+m" (*a) : [b] "Ir" (b) : "memory");
        return retval;
  }
  #endif
@@@ -656,24 -656,29 +656,24 @@@ static __inline__ __attribute__((always
        __asm__ __volatile__("incl %%gs:%a[Offset]" : : [Offset] "ir" (Offset) : "memory");
  }
  
 -/* NOTE: the bizarre implementation of __addgsxxx mimics the broken Visual C++ behavior */
  static __inline__ __attribute__((always_inline)) void __addgsbyte(const unsigned long Offset, const unsigned char Data)
  {
 -      if(!__builtin_constant_p(Offset))
 -              __asm__ __volatile__("addb %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset) : "memory");
 -      else
 -              __asm__ __volatile__("addb %b[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory");
 +      __asm__ __volatile__("addb %b[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory");
  }
  
  static __inline__ __attribute__((always_inline)) void __addgsword(const unsigned long Offset, const unsigned short Data)
  {
 -      if(!__builtin_constant_p(Offset))
 -              __asm__ __volatile__("addw %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset) : "memory");
 -      else
 -              __asm__ __volatile__("addw %w[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory");
 +      __asm__ __volatile__("addw %w[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory");
  }
  
  static __inline__ __attribute__((always_inline)) void __addgsdword(const unsigned long Offset, const unsigned int Data)
  {
 -      if(!__builtin_constant_p(Offset))
 -              __asm__ __volatile__("addl %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset) : "memory");
 -      else
 -              __asm__ __volatile__("addl %k[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory");
 +      __asm__ __volatile__("addl %k[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory");
 +}
 +
 +static __inline__ __attribute__((always_inline)) void __addgsqword(const unsigned long Offset, const unsigned __int64 Data)
 +{
 +      __asm__ __volatile__("addq %k[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory");
  }
  
  #else
@@@ -1060,28 -1065,11 +1060,28 @@@ static __inline__ __attribute__((always
  
  static __inline__ __attribute__((always_inline)) unsigned long long __rdtsc(void)
  {
 +#ifdef _M_AMD64
 +      unsigned long long low, high;
 +      __asm__ __volatile__("rdtsc" : "=a"(low), "=d"(high));
 +      return low | (high << 32);
 +#else
        unsigned long long retval;
        __asm__ __volatile__("rdtsc" : "=A"(retval));
        return retval;
 +#endif
  }
  
 +static __inline__ __attribute__((always_inline)) void __writeeflags(uintptr_t Value)
 +{
 +      __asm__ __volatile__("push %0\n popf" : : "rim"(Value));
 +}
 +
 +static __inline__ __attribute__((always_inline)) uintptr_t __readeflags(void)
 +{
 +      uintptr_t retval;
 +      __asm__ __volatile__("pushf\n pop %0" : "=rm"(retval));
 +      return retval;
 +}
  
  /*** Interrupts ***/
  static __inline__ __attribute__((always_inline)) void __debugbreak(void)
@@@ -140,39 -140,41 +140,39 @@@ typedef WCHAR *PWCHAR,*LPWCH,*PWCH,*NWP
  typedef CONST WCHAR *LPCWCH,*PCWCH,*LPCWSTR,*PCWSTR;
  typedef CHAR *PCHAR,*LPCH,*PCH,*NPSTR,*LPSTR,*PSTR;
  typedef CONST CHAR *LPCCH,*PCCH,*PCSTR,*LPCSTR;
 +typedef PWSTR *PZPWSTR;
 +typedef CONST PWSTR *PCZPWSTR;
 +typedef WCHAR UNALIGNED *LPUWSTR,*PUWSTR;
 +typedef PCWSTR *PZPCWSTR;
 +typedef CONST WCHAR UNALIGNED *LPCUWSTR,*PCUWSTR;
 +typedef PSTR *PZPSTR;
 +typedef CONST PSTR *PCZPSTR;
 +typedef PCSTR *PZPCSTR;
 +
 +#ifdef UNICODE
  #ifndef _TCHAR_DEFINED
  #define _TCHAR_DEFINED
 -#ifdef UNICODE
 -/*
 - * NOTE: This tests UNICODE, which is different from the _UNICODE define
 - *       used to differentiate standard C runtime calls.
 - */
 -typedef WCHAR TCHAR;
 -typedef WCHAR _TCHAR;
 -#else
 -typedef CHAR TCHAR;
 -typedef CHAR _TCHAR;
 -#endif
 +  typedef WCHAR TCHAR,*PTCHAR;
 +  typedef WCHAR TBYTE ,*PTBYTE;
  #endif
 -typedef TCHAR TBYTE,*PTCH,*PTBYTE;
 -typedef TCHAR *LPTCH,*PTSTR,*LPTSTR,*LP,*PTCHAR;
 -typedef const TCHAR *LPCTSTR;
 -#ifdef UNICODE
 -/*
 - * __TEXT is a private macro whose specific use is to force the expansion of a
 - * macro passed as an argument to the macro TEXT.  DO NOT use this
 - * macro within your programs.  It's name and function could change without
 - * notice.
 - */
 -#define __TEXT(q) L##q
 +  typedef LPWSTR LPTCH,PTCH,PTSTR,LPTSTR,LP,PTCHAR;
 +  typedef LPCWSTR PCTSTR,LPCTSTR;
 +  typedef LPUWSTR PUTSTR,LPUTSTR;
 +  typedef LPCUWSTR PCUTSTR,LPCUTSTR;
 +#define __TEXT(quote) L##quote
  #else
 -#define __TEXT(q) q
 +#ifndef _TCHAR_DEFINED
 +#define _TCHAR_DEFINED
 +  typedef char TCHAR,*PTCHAR;
 +  typedef unsigned char TBYTE ,*PTBYTE;
  #endif
 -/*
 - * UNICODE a constant string when UNICODE is defined, else returns the string
 - * unmodified.
 - * The corresponding macros  _TEXT() and _T() for mapping _UNICODE strings
 - * passed to C runtime functions are defined in mingw/tchar.h
 - */
 -#define TEXT(q) __TEXT(q)
 +  typedef LPSTR LPTCH,PTCH,PTSTR,LPTSTR,PUTSTR,LPUTSTR,PTCHAR;
 +  typedef LPCSTR PCTSTR,LPCTSTR,PCUTSTR,LPCUTSTR;
 +#define __TEXT(quote) quote
 +#endif
 +
 +#define TEXT(quote) __TEXT(quote)
 +
  typedef SHORT *PSHORT;
  typedef LONG *PLONG;
  #ifdef STRICT
@@@ -567,6 -569,12 +567,12 @@@ typedef DWORD FLONG
  #define SECURITY_NT_NON_UNIQUE                  0x00000015L
  #define SECURITY_BUILTIN_DOMAIN_RID             0x00000020L
  
+ #define SECURITY_PACKAGE_BASE_RID               0x00000040L
+ #define SECURITY_PACKAGE_NTLM_RID               0x0000000AL
+ #define SECURITY_PACKAGE_SCHANNEL_RID           0x0000000EL
+ #define SECURITY_PACKAGE_DIGEST_RID             0x00000015L
+ #define SECURITY_OTHER_ORGANIZATION_RID         0x000003E8L
  #define SECURITY_LOGON_IDS_RID_COUNT 0x3
  #define SID_REVISION 1
  
@@@ -1524,9 -1532,6 +1530,9 @@@ typedef enu
  #define IMAGE_REL_BASED_HIGHLOW 3
  #define IMAGE_REL_BASED_HIGHADJ 4
  #define IMAGE_REL_BASED_MIPS_JMPADDR 5
 +#define IMAGE_REL_BASED_MIPS_JMPADDR16 9
 +#define IMAGE_REL_BASED_IA64_IMM64 9
 +#define IMAGE_REL_BASED_DIR64 10
  #define IMAGE_ARCHIVE_START_SIZE 8
  #define IMAGE_ARCHIVE_START "!<arch>\n"
  #define IMAGE_ARCHIVE_END "`\n"
@@@ -4648,11 -4653,7 +4654,11 @@@ static __inline__ PVOID GetCurrentFiber
  #elif defined (_M_AMD64)
  FORCEINLINE PVOID GetCurrentFiber(VOID)
  {
 +  #ifdef NONAMELESSUNION
 +    return (PVOID)__readgsqword(FIELD_OFFSET(NT_TIB, DUMMYUNIONNAME.FiberData));
 +  #else
      return (PVOID)__readgsqword(FIELD_OFFSET(NT_TIB, FiberData));
 +  #endif
  }
  #elif defined (_M_ARM)
      PVOID WINAPI GetCurrentFiber(VOID);
@@@ -4781,7 -4782,7 +4787,7 @@@ InterlockedBitTestAndSet(IN LONG volati
        __asm__ __volatile__("lock "
                             "btsl %2,%1\n\t"
                             "sbbl %0,%0\n\t"
-                            :"=r" (OldBit),"=m" (*Base)
+                            :"=r" (OldBit),"+m" (*Base)
                             :"Ir" (Bit)
                             : "memory");
        return OldBit;
@@@ -4799,7 -4800,7 +4805,7 @@@ InterlockedBitTestAndReset(IN LONG vola
        __asm__ __volatile__("lock "
                             "btrl %2,%1\n\t"
                             "sbbl %0,%0\n\t"
-                            :"=r" (OldBit),"=m" (*Base)
+                            :"=r" (OldBit),"+m" (*Base)
                             :"Ir" (Bit)
                             : "memory");
        return OldBit;
@@@ -4869,7 -4870,7 +4875,7 @@@ MemoryBarrier(VOID
  }
  #endif
  #elif defined (_M_AMD64)
 -#define MemoryBarrier()
 +#define MemoryBarrier __faststorefence
  #elif defined(_M_PPC)
  #define MemoryBarrier()
  #elif defined(_M_ARM)
@@@ -615,8 -615,8 +615,8 @@@ extern "C" 
  #define RT_RCDATA MAKEINTRESOURCE(10)
  #define RT_MESSAGETABLE MAKEINTRESOURCE(11)
  #define DIFFERENCE 11
 -#define RT_GROUP_CURSOR MAKEINTRESOURCE((DWORD)RT_CURSOR+DIFFERENCE)
 -#define RT_GROUP_ICON MAKEINTRESOURCE((DWORD)RT_ICON+DIFFERENCE)
 +#define RT_GROUP_CURSOR MAKEINTRESOURCE((ULONG_PTR)RT_CURSOR+DIFFERENCE)
 +#define RT_GROUP_ICON MAKEINTRESOURCE((ULONG_PTR)RT_ICON+DIFFERENCE)
  #define RT_VERSION MAKEINTRESOURCE(16)
  #define RT_DLGINCLUDE MAKEINTRESOURCE(17)
  #define RT_PLUGPLAY MAKEINTRESOURCE(19)
  #define STATE_SYSTEM_VALID 0x1fffffff
  
  #ifndef RC_INVOKED
 -typedef BOOL(CALLBACK *DLGPROC)(HWND,UINT,WPARAM,LPARAM);
 -typedef VOID(CALLBACK *TIMERPROC)(HWND,UINT,UINT,DWORD);
 +typedef INT_PTR(CALLBACK *DLGPROC)(HWND,UINT,WPARAM,LPARAM);
 +typedef VOID(CALLBACK *TIMERPROC)(HWND,UINT,UINT_PTR,DWORD);
  typedef BOOL(CALLBACK *GRAYSTRINGPROC)(HDC,LPARAM,int);
  typedef LRESULT(CALLBACK *HOOKPROC)(int,WPARAM,LPARAM);
  typedef BOOL(CALLBACK *PROPENUMPROCA)(HWND,LPCSTR,HANDLE);
@@@ -2804,13 -2804,13 +2804,13 @@@ typedef struct tagCOMPAREITEMSTRUCT 
        UINT    CtlID;
        HWND    hwndItem;
        UINT    itemID1;
 -      DWORD   itemData1;
 +      ULONG_PTR       itemData1;
        UINT    itemID2;
 -      DWORD   itemData2;
 +      ULONG_PTR       itemData2;
        DWORD   dwLocaleId;
  } COMPAREITEMSTRUCT,*LPCOMPAREITEMSTRUCT;
  typedef struct tagCOPYDATASTRUCT {
 -      DWORD dwData;
 +      ULONG_PTR dwData;
        DWORD cbData;
        PVOID lpData;
  } COPYDATASTRUCT,*PCOPYDATASTRUCT;
@@@ -2848,7 -2848,7 +2848,7 @@@ typedef struct tagDELETEITEMSTRUCT 
        UINT CtlID;
        UINT itemID;
        HWND hwndItem;
 -      UINT itemData;
 +      ULONG_PTR itemData;
  } DELETEITEMSTRUCT,*PDELETEITEMSTRUCT,*LPDELETEITEMSTRUCT;
  #pragma pack(push,2)
  typedef struct {
@@@ -2887,7 -2887,7 +2887,7 @@@ typedef struct tagDRAWITEMSTRUCT 
        HWND hwndItem;
        HDC     hDC;
        RECT rcItem;
 -      DWORD itemData;
 +      ULONG_PTR itemData;
  } DRAWITEMSTRUCT,*LPDRAWITEMSTRUCT,*PDRAWITEMSTRUCT;
  typedef struct {
        UINT cbSize;
@@@ -2921,7 -2921,7 +2921,7 @@@ typedef struct _ICONINFO 
  } ICONINFO,*PICONINFO;
  typedef struct tagNMHDR {
        HWND hwndFrom;
 -      UINT idFrom;
 +      UINT_PTR idFrom;
        UINT code;
  } NMHDR,*LPNMHDR;
  typedef struct _WNDCLASSA {
@@@ -2985,7 -2985,7 +2985,7 @@@ typedef struct tagMENUITEMINFOA 
        HMENU hSubMenu;
        HBITMAP hbmpChecked;
        HBITMAP hbmpUnchecked;
 -      DWORD dwItemData;
 +      ULONG_PTR dwItemData;
        LPSTR dwTypeData;
        UINT cch;
  #if (_WIN32_WINNT >= 0x0500)
@@@ -3002,7 -3002,7 +3002,7 @@@ typedef struct tagMENUITEMINFOW 
        HMENU hSubMenu;
        HBITMAP hbmpChecked;
        HBITMAP hbmpUnchecked;
 -      DWORD dwItemData;
 +      ULONG_PTR dwItemData;
        LPWSTR dwTypeData;
        UINT cch;
  #if (_WIN32_WINNT >= 0x0500)
@@@ -3043,7 -3043,7 +3043,7 @@@ typedef struct tagHELPINFO 
        int iContextType;
        int iCtrlId;
        HANDLE hItemHandle;
 -      DWORD dwContextId;
 +      DWORD_PTR dwContextId;
        POINT MousePos;
  } HELPINFO,*LPHELPINFO;
  typedef void(CALLBACK *MSGBOXCALLBACK)(LPHELPINFO);
@@@ -3055,7 -3055,7 +3055,7 @@@ typedef struct 
        LPCSTR lpszCaption;
        DWORD dwStyle;
        LPCSTR lpszIcon;
 -      DWORD dwContextHelpId;
 +      DWORD_PTR dwContextHelpId;
        MSGBOXCALLBACK lpfnMsgBoxCallback;
        DWORD dwLanguageId;
  } MSGBOXPARAMSA,*PMSGBOXPARAMSA,*LPMSGBOXPARAMSA;
@@@ -3067,7 -3067,7 +3067,7 @@@ typedef struct 
        LPCWSTR lpszCaption;
        DWORD dwStyle;
        LPCWSTR lpszIcon;
 -      DWORD dwContextHelpId;
 +      DWORD_PTR dwContextHelpId;
        MSGBOXCALLBACK lpfnMsgBoxCallback;
        DWORD dwLanguageId;
  } MSGBOXPARAMSW,*PMSGBOXPARAMSW,*LPMSGBOXPARAMSW;
@@@ -3220,7 -3220,7 +3220,7 @@@ typedef struct tagMOUSEHOOKSTRUCT 
        POINT pt;
        HWND hwnd;
        UINT wHitTestCode;
 -      DWORD dwExtraInfo;
 +      ULONG_PTR dwExtraInfo;
  } MOUSEHOOKSTRUCT,*LPMOUSEHOOKSTRUCT,*PMOUSEHOOKSTRUCT;
  #if ( _WIN32_WINNT >= 0x0500 )
  #ifdef __cplusplus
@@@ -3306,13 -3306,13 +3306,13 @@@ typedef struct tagMEASUREITEMSTRUCT 
        UINT itemID;
        UINT itemWidth;
        UINT itemHeight;
 -      DWORD itemData;
 +      ULONG_PTR itemData;
  } MEASUREITEMSTRUCT,*PMEASUREITEMSTRUCT,*LPMEASUREITEMSTRUCT;
  typedef struct tagDROPSTRUCT {
        HWND hwndSource;
        HWND hwndSink;
        DWORD wFmt;
 -      DWORD dwData;
 +      ULONG_PTR dwData;
        POINT ptDrop;
        DWORD dwControlData;
  } DROPSTRUCT,*PDROPSTRUCT,*LPDROPSTRUCT;
@@@ -3451,7 -3451,7 +3451,7 @@@ typedef struct tagKBDLLHOOKSTRUCT 
        DWORD scanCode;
        DWORD flags;
        DWORD time;
 -      DWORD dwExtraInfo;
 +      ULONG_PTR dwExtraInfo;
  } KBDLLHOOKSTRUCT,*LPKBDLLHOOKSTRUCT,*PKBDLLHOOKSTRUCT;
  typedef struct tagMSLLHOOKSTRUCT
  {
@@@ -3735,12 -3735,12 +3735,12 @@@ BOOL WINAPI DestroyWindow(HWND)
  #define DialogBoxW(i,t,p,f) DialogBoxParamW(i,t,p,f,0)
  #define DialogBoxIndirectA(i,t,p,f) DialogBoxIndirectParamA(i,t,p,f,0)
  #define DialogBoxIndirectW(i,t,p,f) DialogBoxIndirectParamW(i,t,p,f,0)
 -int WINAPI DialogBoxIndirectParamA(HINSTANCE,LPCDLGTEMPLATE,HWND,DLGPROC,LPARAM);
 -int WINAPI DialogBoxIndirectParamW(HINSTANCE,LPCDLGTEMPLATE,HWND,DLGPROC,LPARAM);
 -int WINAPI DialogBoxParamA(HINSTANCE,LPCSTR,HWND,DLGPROC,LPARAM);
 -int WINAPI DialogBoxParamW(HINSTANCE,LPCWSTR,HWND,DLGPROC,LPARAM);
 -LONG WINAPI DispatchMessageA(const MSG*);
 -LONG WINAPI DispatchMessageW(const MSG*);
 +INT_PTR WINAPI DialogBoxIndirectParamA(HINSTANCE,LPCDLGTEMPLATE,HWND,DLGPROC,LPARAM);
 +INT_PTR WINAPI DialogBoxIndirectParamW(HINSTANCE,LPCDLGTEMPLATE,HWND,DLGPROC,LPARAM);
 +INT_PTR WINAPI DialogBoxParamA(HINSTANCE,LPCSTR,HWND,DLGPROC,LPARAM);
 +INT_PTR WINAPI DialogBoxParamW(HINSTANCE,LPCWSTR,HWND,DLGPROC,LPARAM);
 +LRESULT WINAPI DispatchMessageA(const MSG*);
 +LRESULT WINAPI DispatchMessageW(const MSG*);
  int WINAPI DlgDirListA(HWND,LPSTR,int,int,UINT);
  int WINAPI DlgDirListW(HWND,LPWSTR,int,int,UINT);
  int WINAPI DlgDirListComboBoxA(HWND,LPSTR,int,int,UINT);
@@@ -3750,7 -3750,7 +3750,7 @@@ BOOL WINAPI DlgDirSelectComboBoxExW(HWN
  BOOL WINAPI DlgDirSelectExA(HWND,LPSTR,int,int);
  BOOL WINAPI DlgDirSelectExW(HWND,LPWSTR,int,int);
  BOOL WINAPI DragDetect(HWND,POINT);
 -DWORD WINAPI DragObject(HWND,HWND,UINT,DWORD,HCURSOR);
 +DWORD WINAPI DragObject(HWND,HWND,UINT,ULONG_PTR,HCURSOR);
  BOOL WINAPI DrawAnimatedRects(HWND,int,LPCRECT,LPCRECT);
  BOOL WINAPI DrawCaption(HWND,HDC,LPCRECT,UINT);
  BOOL WINAPI DrawCaptionTempA(HWND,HDC,const RECT*,HFONT,HICON,LPCSTR,UINT);
@@@ -3773,7 -3773,7 +3773,7 @@@ BOOL WINAPI EnableMenuItem(HMENU,UINT,U
  BOOL WINAPI EnableScrollBar(HWND,UINT,UINT);
  BOOL WINAPI EnableWindow(HWND,BOOL);
  BOOL WINAPI EndDeferWindowPos(HDWP);
 -BOOL WINAPI EndDialog(HWND,int);
 +BOOL WINAPI EndDialog(HWND,INT_PTR);
  BOOL WINAPI EndMenu(void);
  BOOL WINAPI EndPaint(HWND,const PAINTSTRUCT*);
  #if (_WIN32_WINNT >= 0x0500)
@@@ -3830,8 -3830,8 +3830,8 @@@ BOOL WINAPI GetClassInfoExW(HINSTANCE,L
  DWORD WINAPI GetClassLongA(HWND,int);
  DWORD WINAPI GetClassLongW(HWND,int);
  #ifdef _WIN64
 -LONG_PTR WINAPI GetClassLongPtrA(HWND,int);
 -LONG_PTR WINAPI GetClassLongPtrW(HWND,int);
 +ULONG_PTR WINAPI GetClassLongPtrA(HWND,int);
 +ULONG_PTR WINAPI GetClassLongPtrW(HWND,int);
  #else
  #define GetClassLongPtrA GetClassLongA
  #define GetClassLongPtrW GetClassLongW
@@@ -3892,7 -3892,7 +3892,7 @@@ int WINAPI GetMenuStringA(HMENU,UINT,LP
  int WINAPI GetMenuStringW(HMENU,UINT,LPWSTR,int,UINT);
  BOOL WINAPI GetMessageA(LPMSG,HWND,UINT,UINT);
  BOOL WINAPI GetMessageW(LPMSG,HWND,UINT,UINT);
 -LONG WINAPI GetMessageExtraInfo(void);
 +LPARAM WINAPI GetMessageExtraInfo(void);
  DWORD WINAPI GetMessagePos(void);
  LONG WINAPI GetMessageTime(void);
  #if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0490)
@@@ -3988,8 -3988,8 +3988,8 @@@ BOOL WINAPI InSendMessage(void)
  #if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
  DWORD WINAPI InSendMessageEx(LPVOID);
  #endif
 -BOOL WINAPI InsertMenuA(HMENU,UINT,UINT,UINT,LPCSTR);
 -BOOL WINAPI InsertMenuW(HMENU,UINT,UINT,UINT,LPCWSTR);
 +BOOL WINAPI InsertMenuA(HMENU,UINT,UINT,UINT_PTR,LPCSTR);
 +BOOL WINAPI InsertMenuW(HMENU,UINT,UINT,UINT_PTR,LPCWSTR);
  BOOL WINAPI InsertMenuItemA(HMENU,UINT,BOOL,LPCMENUITEMINFOA);
  BOOL WINAPI InsertMenuItemW(HMENU,UINT,BOOL,LPCMENUITEMINFOW);
  INT WINAPI InternalGetWindowText(HWND,LPWSTR,INT);
@@@ -4027,8 -4027,8 +4027,8 @@@ BOOL WINAPI IsWindowVisible(HWND)
  BOOL WINAPI IsWinEventHookInstalled(DWORD);
  #endif
  BOOL WINAPI IsZoomed(HWND);
 -VOID WINAPI keybd_event(BYTE,BYTE,DWORD,DWORD);
 -BOOL WINAPI KillTimer(HWND,UINT);
 +VOID WINAPI keybd_event(BYTE,BYTE,DWORD,ULONG_PTR);
 +BOOL WINAPI KillTimer(HWND,UINT_PTR);
  HACCEL WINAPI LoadAcceleratorsA(HINSTANCE,LPCSTR);
  HACCEL WINAPI LoadAcceleratorsW(HINSTANCE,LPCWSTR);
  HBITMAP WINAPI LoadBitmapA(HINSTANCE,LPCSTR);
@@@ -4069,8 -4069,8 +4069,8 @@@ int WINAPI MessageBoxExA(HWND,LPCSTR,LP
  int WINAPI MessageBoxExW(HWND,LPCWSTR,LPCWSTR,UINT,WORD);
  int WINAPI MessageBoxIndirectA(CONST MSGBOXPARAMSA*);
  int WINAPI MessageBoxIndirectW(CONST MSGBOXPARAMSW*);
 -BOOL WINAPI ModifyMenuA(HMENU,UINT,UINT,UINT,LPCSTR);
 -BOOL WINAPI ModifyMenuW(HMENU,UINT,UINT,UINT,LPCWSTR);
 +BOOL WINAPI ModifyMenuA(HMENU,UINT,UINT,UINT_PTR,LPCSTR);
 +BOOL WINAPI ModifyMenuW(HMENU,UINT,UINT,UINT_PTR,LPCWSTR);
  HMONITOR WINAPI MonitorFromPoint(POINT,DWORD);
  HMONITOR WINAPI MonitorFromRect(LPCRECT,DWORD);
  HMONITOR WINAPI MonitorFromWindow(HWND,DWORD);
@@@ -4140,16 -4140,16 +4140,16 @@@ BOOL WINAPI ScreenToClient(HWND,LPPOINT
  BOOL WINAPI ScrollDC(HDC,int,int,LPCRECT,LPCRECT,HRGN,LPRECT);
  BOOL WINAPI ScrollWindow(HWND,int,int,LPCRECT,LPCRECT);
  int WINAPI ScrollWindowEx(HWND,int,int,LPCRECT,LPCRECT,HRGN,LPRECT,UINT);
 -LONG WINAPI SendDlgItemMessageA(HWND,int,UINT,WPARAM,LPARAM);
 -LONG WINAPI SendDlgItemMessageW(HWND,int,UINT,WPARAM,LPARAM);
 +LRESULT WINAPI SendDlgItemMessageA(HWND,int,UINT,WPARAM,LPARAM);
 +LRESULT WINAPI SendDlgItemMessageW(HWND,int,UINT,WPARAM,LPARAM);
  #if (_WIN32_WINNT >= 0x0403)
  UINT WINAPI SendInput(UINT,LPINPUT,int);
  #endif
  LRESULT WINAPI SendMessageA(HWND,UINT,WPARAM,LPARAM);
 -BOOL WINAPI SendMessageCallbackA(HWND,UINT,WPARAM,LPARAM,SENDASYNCPROC,DWORD);
 -BOOL WINAPI SendMessageCallbackW(HWND,UINT,WPARAM,LPARAM,SENDASYNCPROC,DWORD);
 -LRESULT WINAPI SendMessageTimeoutA(HWND,UINT,WPARAM,LPARAM,UINT,UINT,PDWORD);
 -LRESULT WINAPI SendMessageTimeoutW(HWND,UINT,WPARAM,LPARAM,UINT,UINT,PDWORD);
 +BOOL WINAPI SendMessageCallbackA(HWND,UINT,WPARAM,LPARAM,SENDASYNCPROC,ULONG_PTR);
 +BOOL WINAPI SendMessageCallbackW(HWND,UINT,WPARAM,LPARAM,SENDASYNCPROC,ULONG_PTR);
 +LRESULT WINAPI SendMessageTimeoutA(HWND,UINT,WPARAM,LPARAM,UINT,UINT,PDWORD_PTR);
 +LRESULT WINAPI SendMessageTimeoutW(HWND,UINT,WPARAM,LPARAM,UINT,UINT,PDWORD_PTR);
  LRESULT WINAPI SendMessageW(HWND,UINT,WPARAM,LPARAM);
  BOOL WINAPI SendNotifyMessageA(HWND,UINT,WPARAM,LPARAM);
  BOOL WINAPI SendNotifyMessageW(HWND,UINT,WPARAM,LPARAM);
@@@ -4201,11 -4201,11 +4201,11 @@@ int WINAPI SetScrollInfo(HWND,int,LPCSC
  int WINAPI SetScrollPos(HWND,int,int,BOOL);
  BOOL WINAPI SetScrollRange(HWND,int,int,int,BOOL);
  BOOL WINAPI SetSysColors(int,const INT *,const COLORREF *);
HANDLE WINAPI SetSysColorsTemp(const COLORREF *, const HBRUSH *, int);
DWORD WINAPI SetSysColorsTemp(const COLORREF *, const HBRUSH *, DWORD);
  #define SetSysModalWindow(h) (NULL)
  BOOL WINAPI SetSystemCursor(HCURSOR,DWORD);
  BOOL WINAPI SetThreadDesktop(HDESK);
 -UINT WINAPI SetTimer(HWND,UINT,UINT,TIMERPROC);
 +UINT_PTR WINAPI SetTimer(HWND,UINT_PTR,UINT,TIMERPROC);
  BOOL WINAPI SetUserObjectInformationA(HANDLE,int,PVOID,DWORD);
  BOOL WINAPI SetUserObjectInformationW(HANDLE,int,PVOID,DWORD);
  BOOL WINAPI SetUserObjectSecurity(HANDLE,PSECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
@@@ -4284,8 -4284,8 +4284,8 @@@ BOOL WINAPI WaitMessage(void)
  HWND WINAPI WindowFromDC(HDC hDC);
  HWND WINAPI WindowFromPoint(POINT);
  UINT WINAPI WinExec(LPCSTR,UINT);
 -BOOL WINAPI WinHelpA(HWND,LPCSTR,UINT,DWORD);
 -BOOL WINAPI WinHelpW(HWND,LPCWSTR,UINT,DWORD);
 +BOOL WINAPI WinHelpA(HWND,LPCSTR,UINT,ULONG_PTR);
 +BOOL WINAPI WinHelpW(HWND,LPCWSTR,UINT,ULONG_PTR);
  int WINAPIV wsprintfA(LPSTR,LPCSTR,...);
  int WINAPIV wsprintfW(LPWSTR,LPCWSTR,...);
  int WINAPI wvsprintfA(LPSTR,LPCSTR,va_list arglist);
@@@ -433,10 -433,10 +433,10 @@@ typedef struct _SHAREDINF
  
  typedef struct _USERCONNECT
  {
-   DWORD      Unknown0;
-   DWORD      Unknown1;
-   DWORD      Unknown2;
-   SHAREDINFO ShareInfo;
+   ULONG ulVersion;
+   ULONG ulCurrentVersion;
+   DWORD dwDispatchCount;
+   SHAREDINFO siClient;
  } USERCONNECT, *PUSERCONNECT;
  
  //
@@@ -917,18 -917,18 +917,18 @@@ NtUserCallNextHookEx
    LPARAM lParam,
    BOOL Ansi);
  
 -DWORD
 +DWORD_PTR
  NTAPI
  NtUserCallNoParam(
    DWORD Routine);
  
 -DWORD
 +DWORD_PTR
  NTAPI
  NtUserCallOneParam(
    DWORD Param,
    DWORD Routine);
  
 -DWORD
 +DWORD_PTR
  NTAPI
  NtUserCallTwoParam(
    DWORD Param1,
@@@ -1673,7 -1673,7 +1673,7 @@@ enum ThreadStateRoutine
      THREADSTATE_TASKMANWINDOW
  };
  
 -DWORD
 +DWORD_PTR
  NTAPI
  NtUserGetThreadState(
    DWORD Routine);
@@@ -1,12 -1,26 +1,26 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
 -<module name="crt" type="staticlibrary">
+ <module name="chkstk" type="staticlibrary">
+       <directory name="except">
+               <if property="ARCH" value="i386">
+                       <directory name="i386">
+                               <file>chkstk_asm.s</file>
+                       </directory>
+               </if>
+               <if property="ARCH" value="powerpc">
+                       <directory name="powerpc">
+                               <file>chkstk_asm.s</file>
+                       </directory>
+               </if>
+       </directory>
+ </module>
 +<module name="crt" type="staticlibrary" allowwarnings="true">
+       <library>chkstk</library>
        <include base="crt">.</include>
        <include base="crt">include</include>
        <define name="_DISABLE_TIDENTS" />
        <define name="__MINGW_IMPORT">extern</define>
-       <define name="_WIN32_IE">0x600</define>
-       <define name="_WIN32_WINNT">0x501</define>
        <define name="USE_MSVCRT_PREFIX" />
        <define name="_MSVCRT_LIB_" />
        <define name="_MSVCRT_" />
@@@ -45,7 -59,6 +59,6 @@@
                <file>matherr.c</file>
                <if property="ARCH" value="i386">
                        <directory name="i386">
-                               <file>chkstk_asm.s</file>
                                <file>prolog.s</file>
                                <file>seh.s</file>
                                <file>unwind.c</file>
                <if property="ARCH" value="powerpc">
                        <directory name="powerpc">
                                <file>seh.s</file>
-                               <file>chkstk_asm.s</file>
                        </directory>
                </if>
 +              <if property="ARCH" value="amd64">
 +                      <directory name="amd64">
 +                              <file>seh.s</file>
 +                              <file>chkstk_asm.s</file>
 +                      </directory>
 +              </if>
                <file>xcptfil.c</file>
        </directory>
        <directory name="float">
                                <file>statfp.c</file>
                        </directory>
                </if>
 +              <if property="ARCH" value="amd64">
 +                      <directory name="i386">
 +                              <file>clearfp.c</file>
 +                              <file>cntrlfp.c</file>
 +                              <file>logb.c</file>
 +                              <file>statfp.c</file>
 +                      </directory>
 +              </if>
        </directory>
        <directory name="locale">
                <file>locale.c</file>
                                <file>ldexp.c</file>
                        </directory>
                </if>
 +              <if property="ARCH" value="amd64">
 +                      <directory name="i386">
 +                              <file>atan2.c</file>
 +                              <file>exp.c</file>
 +                              <file>fmod.c</file>
 +                              <file>ldexp.c</file>
 +                      </directory>
 +              </if>
                <ifnot property="ARCH" value="i386">
                        <file>stubs.c</file>
                </ifnot>
                <file>access.c</file>
                <file>file.c</file>
                <file>find.c</file>
 +              <file>find64.c</file>
                <file>fmode.c</file>
                <file>lnx_sprintf.c</file>
                <file>perror.c</file>
                <file>popen.c</file>
 +              <file>stat.c</file>
 +              <file>stat64.c</file>
                <file>waccess.c</file>
                <file>wfind.c</file>
                <file>wpopen.c</file>
 +              <file>wstat.c</file>
        </directory>
        <directory name="stdlib">
                <file>_exit.c</file>
@@@ -130,6 -130,7 +130,7 @@@ NTSTATUS STDCALL CsrFreeProcessData(HAN
    ULONG hash;
    UINT c;
    PCSRSS_PROCESS_DATA pProcessData, *pPrevLink;
+   HANDLE Process;
  
    hash = ((ULONG_PTR)Pid >> 2) % (sizeof(ProcessData) / sizeof(*ProcessData));
    pPrevLink = &ProcessData[hash];
    if (pProcessData)
      {
        DPRINT("CsrFreeProcessData pid: %d\n", Pid);
-       if (pProcessData->Process)
-       {
-          NtClose(pProcessData->Process);
-       }
+       Process = pProcessData->Process;
        if (pProcessData->HandleTable)
          {
            for (c = 0; c < pProcessData->HandleTableSize; c++)
  
        RtlFreeHeap(CsrssApiHeap, 0, pProcessData);
        UNLOCK;
+       if (Process)
+         {
+           NtClose(Process);
+         }
        return STATUS_SUCCESS;
     }
  
@@@ -243,7 -245,7 +245,7 @@@ CSR_API(CsrCreateProcess
  
     if (Request->Data.CreateProcessRequest.Flags & CREATE_NEW_PROCESS_GROUP)
       {
 -       NewProcessData->ProcessGroup = (DWORD)NewProcessData->ProcessId;
 +       NewProcessData->ProcessGroup = (DWORD)(ULONG_PTR)NewProcessData->ProcessId;
       }
     else
       {
@@@ -362,14 -364,14 +364,14 @@@ CSR_API(CsrVerifyHandle
  
  CSR_API(CsrDuplicateHandle)
  {
 -    ULONG Index;
 +    ULONG_PTR Index;
      PCSRSS_HANDLE Entry;
      DWORD DesiredAccess;
  
      Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
      Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
  
 -    Index = (ULONG)Request->Data.DuplicateHandleRequest.Handle >> 2;
 +    Index = (ULONG_PTR)Request->Data.DuplicateHandleRequest.Handle >> 2;
      RtlEnterCriticalSection(&ProcessData->HandleTableLock);
      if (Index >= ProcessData->HandleTableSize
          || (Entry = &ProcessData->HandleTable[Index])->Object == NULL)
@@@ -6,11 -6,10 +6,9 @@@
                <include base="csrss">include</include>
                <include base="ReactOS">include/reactos/subsys</include>
                <include base="ReactOS">include/reactos/drivers</include>
-               <define name="_WIN32_WINNT">0x0600</define>
-               <define name="WINVER">0x0501</define>
                <library>nt</library>
                <library>ntdll</library>
                <library>smdll</library>
 -              <library>msvcrt</library>
                <directory name="api">
                        <file>handle.c</file>
                        <file>process.c</file>
@@@ -8,13 -8,13 +8,12 @@@
        <include base="ReactOS">include/reactos/drivers</include>
        <include base="console">.</include>
        <define name="_DISABLE_TIDENTS" />
-       <define name="_WIN32_WINNT">0x0501</define>
        <library>ntdll</library>
        <library>kernel32</library>
        <library>user32</library>
        <library>gdi32</library>
        <library>advapi32</library>
        <library>psapi</library>
 -      <library>msvcrt</library>
        <library>psapi</library>
        <library>shell32</library>
        <pch>w32csr.h</pch>