Revert the sync.
authorAmine Khaldi <amine.khaldi@reactos.org>
Mon, 3 May 2010 16:42:07 +0000 (16:42 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Mon, 3 May 2010 16:42:07 +0000 (16:42 +0000)
We only can safely sync up to r46941.

svn path=/branches/header-work/; revision=47096

630 files changed:
ReactOS-arm.rbuild
base/applications/cmdutils/reg/reg.rbuild
base/applications/downloader/downloader.rbuild
base/applications/fontview/fontview.rbuild
base/applications/kbswitch/kbswitch.rbuild
base/applications/magnify/magnify.rbuild
base/applications/mplay32/mplay32.rbuild
base/applications/mscutils/eventvwr/eventvwr.rbuild
base/applications/network/ping/ping.c
base/applications/notepad/settings.c
base/applications/notepad/text.c
base/applications/paint/lang/it-IT.rc
base/applications/paint/main.c
base/applications/paint/mouse.c
base/applications/rapps/rapps.rbuild
base/applications/rapps/rapps/firefox3.txt
base/applications/rapps/rapps/mirandaim.txt
base/applications/rapps/rapps/openttd.txt
base/applications/rapps/rapps/opera.txt
base/applications/rapps/rapps/scite.txt
base/applications/rapps/rapps/scummvm.txt
base/applications/rapps/rapps/seamonkey.txt
base/applications/rapps/rapps/thunderbird.txt
base/applications/rapps/rapps/utorrent.txt
base/applications/regedit/framewnd.c
base/applications/taskmgr/applpage.c
base/applications/taskmgr/perfdata.c
base/applications/taskmgr/perfdata.h
base/applications/taskmgr/procpage.c
base/applications/taskmgr/taskmgr.c
base/applications/winhlp32/hlpfile.c
base/applications/winver/winver.rbuild
base/services/rpcss/rpcss.rbuild
base/services/telnetd/telnetd.rbuild
base/services/tftpd/tftpd.rbuild
base/setup/usetup/bootsup.c
base/setup/usetup/inffile.c
base/setup/usetup/inffile.h
base/setup/usetup/interface/usetup.c
base/setup/usetup/registry.c
base/setup/usetup/registry.h
base/setup/usetup/usetup.rbuild
base/shell/cmd/console.c
base/shell/cmd/filecomp.c
base/shell/explorer/res/startmenu.ico
base/system/format/format.c
base/system/runonce/runonce.rbuild
base/system/userinit/userinit.c
boot/bootdata/bootcd/bootcd.rbuild
boot/bootdata/hivecls_arm.inf
boot/bootdata/hivecls_i386.inf
boot/bootdata/hivedef_arm.inf
boot/bootdata/hivedef_i386.inf
boot/bootdata/livecd/livecd.rbuild
boot/bootdata/packages/reactos.dff
boot/bootdata/txtsetup.sif
boot/freeldr/freeldr/arch/amd64/arch.S
boot/freeldr/freeldr/arch/amd64/boot.S
boot/freeldr/freeldr/arch/amd64/drvmap.S
boot/freeldr/freeldr/arch/amd64/i386cpu.S
boot/freeldr/freeldr/arch/amd64/i386pnp.S
boot/freeldr/freeldr/arch/amd64/i386trap.S
boot/freeldr/freeldr/arch/amd64/int386.S
boot/freeldr/freeldr/arch/amd64/loader.c
boot/freeldr/freeldr/arch/amd64/mb.S
boot/freeldr/freeldr/arch/i386/hardware.c
boot/freeldr/freeldr/arch/i386/machpc.c
boot/freeldr/freeldr/arch/i386/machxbox.c
boot/freeldr/freeldr/arch/i386/miscboot.c
boot/freeldr/freeldr/arch/i386/xboxhw.c
boot/freeldr/freeldr/arch/powerpc/mach.c
boot/freeldr/freeldr/disk/disk.c
boot/freeldr/freeldr/disk/partition.c
boot/freeldr/freeldr/freeldr_arch.rbuild
boot/freeldr/freeldr/freeldr_base.rbuild
boot/freeldr/freeldr/include/arch/amd64/amd64.h
boot/freeldr/freeldr/include/disk.h
boot/freeldr/freeldr/include/machine.h
boot/freeldr/freeldr/linuxboot.c
boot/freeldr/freeldr/machine.c
boot/freeldr/freeldr/reactos/arcname.c
boot/freeldr/freeldr/reactos/reactos.c
boot/freeldr/freeldr/windows/amd64/wlmemory.c
dll/cpl/desk/appearance.c
dll/cpl/desk/background.c
dll/cpl/desk/effappdlg.c
dll/cpl/sysdm/lang/uk-UA.rc
dll/directx/bdaplgin/pincontrol.cpp
dll/directx/ksproxy/allocator.cpp
dll/directx/ksproxy/enumpins.cpp
dll/directx/ksproxy/input_pin.cpp
dll/directx/ksproxy/mediasample.cpp
dll/directx/ksproxy/output_pin.cpp
dll/directx/ksproxy/precomp.h
dll/directx/ksproxy/proxy.cpp
dll/directx/msdvbnp/enumpins.cpp
dll/directx/msdvbnp/msdvbnp.cpp
dll/directx/msdvbnp/precomp.h
dll/directx/qedit/samplegrabber.c
dll/directx/quartz/avidec.c
dll/directx/quartz/avisplit.c
dll/ntdll/ldr/utils.c
dll/win32/activeds/activeds.spec
dll/win32/activeds/activeds_main.c
dll/win32/actxprxy/actxprxy.rbuild
dll/win32/atl/atl_ax.c
dll/win32/avifil32/rsrc.rc
dll/win32/cabinet/fdi.c
dll/win32/comdlg32/filedlg.c
dll/win32/comdlg32/fontdlg.c
dll/win32/comdlg32/printdlg.c
dll/win32/crypt32/base64.c
dll/win32/crypt32/decode.c
dll/win32/devmgr/lang/cs-CZ.rc
dll/win32/gdi32/include/gdi32p.h
dll/win32/gdi32/objects/dc.c
dll/win32/gdi32/objects/region.c
dll/win32/gdiplus/brush.c
dll/win32/gdiplus/font.c
dll/win32/gdiplus/gdiplus.spec
dll/win32/gdiplus/gdiplus_private.h
dll/win32/gdiplus/graphics.c
dll/win32/gdiplus/image.c
dll/win32/hhctrl.ocx/hhctrl.c
dll/win32/inetcomm/mimeintl.c
dll/win32/inetcomm/mimeole.c
dll/win32/inseng/inseng_main.c
dll/win32/jscript/jscript.h
dll/win32/jscript/regexp.c
dll/win32/jscript/string.c
dll/win32/kernel32/file/dir.c
dll/win32/kernel32/kernel32.pspec
dll/win32/kernel32/misc/stubs.c
dll/win32/localspl/provider.c
dll/win32/lpk/dllmain.c
dll/win32/mciavi32/mciavi.c
dll/win32/mcicda/mcicda.c
dll/win32/mciqtz32/mciqtz.c
dll/win32/mciqtz32/mciqtz_private.h
dll/win32/mciseq/mcimidi.c
dll/win32/mciwave/mciwave.c
dll/win32/msacm32/msacm32.rbuild
dll/win32/mscoree/mscoree.rbuild
dll/win32/mscoree/mscoree.spec
dll/win32/mscoree/mscoree_main.c
dll/win32/mscoree/mscoree_private.h
dll/win32/msctf/displayattributemgr.c [deleted file]
dll/win32/msctf/inputprocessor.c
dll/win32/msctf/msctf.c
dll/win32/msctf/msctf.rbuild
dll/win32/msctf/msctf_internal.h
dll/win32/msctf/regsvr.c
dll/win32/msgsm32.acm/msgsm32.c
dll/win32/mshtml/dispex.c
dll/win32/mshtml/editor.c
dll/win32/mshtml/htmlelem.c
dll/win32/mshtml/htmlwindow.c
dll/win32/mshtml/install.c
dll/win32/mshtml/mshtml_private.h
dll/win32/mshtml/navigate.c
dll/win32/mshtml/nsembed.c
dll/win32/mshtml/nsevents.c
dll/win32/mshtml/nsio.c
dll/win32/mshtml/olecmd.c
dll/win32/mshtml/view.c
dll/win32/msimtf/activeimmapp.c
dll/win32/msvfw32/mciwnd.c
dll/win32/msvfw32/msvfw32_ros.diff [new file with mode: 0644]
dll/win32/msvfw32/msvideo16.c [new file with mode: 0644]
dll/win32/msvfw32/vfw16.h [new file with mode: 0644]
dll/win32/msvidc32/msvideo1.c
dll/win32/msxml3/dispex.c
dll/win32/msxml3/element.c
dll/win32/msxml3/main.c
dll/win32/msxml3/node.c
dll/win32/netcfgx/lang/cs-CZ.rc
dll/win32/netcfgx/netcfgx.c
dll/win32/netcfgx/tcpipconf_notify.c
dll/win32/netid/lang/cs-CZ.rc
dll/win32/netid/lang/it-IT.rc
dll/win32/netshell/lang/bg-BG.rc
dll/win32/netshell/lang/cs-CZ.rc
dll/win32/netshell/lang/da-DK.rc
dll/win32/netshell/lang/de-DE.rc
dll/win32/netshell/lang/el-GR.rc
dll/win32/netshell/lang/en-US.rc
dll/win32/netshell/lang/es-ES.rc
dll/win32/netshell/lang/fr-FR.rc
dll/win32/netshell/lang/hu-HU.rc
dll/win32/netshell/lang/id-ID.rc
dll/win32/netshell/lang/it-IT.rc
dll/win32/netshell/lang/ja-JP.rc
dll/win32/netshell/lang/nl-NL.rc
dll/win32/netshell/lang/no-NO.rc
dll/win32/netshell/lang/pl-PL.rc
dll/win32/netshell/lang/ro-RO.rc
dll/win32/netshell/lang/ru-RU.rc
dll/win32/netshell/lang/sv-SE.rc
dll/win32/netshell/lang/uk-UA.rc
dll/win32/netshell/lang/zh-CN.rc
dll/win32/netshell/lanstatusui.c
dll/win32/ntmarta/ntmarta.c
dll/win32/ole32/compobj.c
dll/win32/ole32/ftmarshal.c
dll/win32/ole32/ifs.c
dll/win32/ole32/moniker.c
dll/win32/ole32/ole32.rbuild
dll/win32/ole32/rpc.c
dll/win32/ole32/storage32.c
dll/win32/ole32/storage32.h
dll/win32/oleaut32/olepicture.c
dll/win32/oleaut32/regsvr.c
dll/win32/oleaut32/typelib.c
dll/win32/oleaut32/typelib2.c
dll/win32/oleaut32/vartype.c
dll/win32/rsaenh/rsaenh.c
dll/win32/rsaenh/sha2.c
dll/win32/schannel/lsamode.c
dll/win32/setupapi/interface.c
dll/win32/setupapi/lang/cs-CZ.rc
dll/win32/shell32/dialogs.c
dll/win32/shell32/folder_options.c
dll/win32/shell32/folders.c
dll/win32/shell32/fprop.c
dll/win32/shell32/lang/bg-BG.rc
dll/win32/shell32/lang/ca-ES.rc
dll/win32/shell32/lang/cs-CZ.rc
dll/win32/shell32/lang/da-DK.rc
dll/win32/shell32/lang/de-DE.rc
dll/win32/shell32/lang/el-GR.rc
dll/win32/shell32/lang/en-GB.rc
dll/win32/shell32/lang/en-US.rc
dll/win32/shell32/lang/es-ES.rc
dll/win32/shell32/lang/fi-FI.rc
dll/win32/shell32/lang/fr-FR.rc
dll/win32/shell32/lang/hu-HU.rc
dll/win32/shell32/lang/it-IT.rc
dll/win32/shell32/lang/ja-JP.rc
dll/win32/shell32/lang/ko-KR.rc
dll/win32/shell32/lang/nl-NL.rc
dll/win32/shell32/lang/no-NO.rc
dll/win32/shell32/lang/pl-PL.rc
dll/win32/shell32/lang/pt-BR.rc
dll/win32/shell32/lang/pt-PT.rc
dll/win32/shell32/lang/ro-RO.rc
dll/win32/shell32/lang/ru-RU.rc
dll/win32/shell32/lang/sk-SK.rc
dll/win32/shell32/lang/sl-SI.rc
dll/win32/shell32/lang/sv-SE.rc
dll/win32/shell32/lang/tr-TR.rc
dll/win32/shell32/lang/uk-UA.rc
dll/win32/shell32/lang/zh-CN.rc
dll/win32/shell32/lang/zh-TW.rc
dll/win32/shell32/she_ocmenu.c
dll/win32/shell32/shfldr_cpanel.c
dll/win32/shell32/shfldr_fonts.c
dll/win32/shell32/shlfileop.c
dll/win32/shell32/shresdef.h
dll/win32/shell32/shv_def_cmenu.c
dll/win32/shlwapi/ordinal.c
dll/win32/shlwapi/shlwapi.spec
dll/win32/shlwapi/url.c
dll/win32/sti/regsvr.c
dll/win32/sti/sti.c [deleted file]
dll/win32/sti/sti.rbuild
dll/win32/sti/sti.spec
dll/win32/sti/sti_main.c
dll/win32/sti/sti_private.h [deleted file]
dll/win32/sti/sti_wia.idl [deleted file]
dll/win32/syssetup/lang/it-IT.rc
dll/win32/syssetup/wizard.c
dll/win32/urlmon/bindprot.c
dll/win32/urlmon/regsvr.c
dll/win32/urlmon/urlmon_main.c
dll/win32/urlmon/urlmon_main.h
dll/win32/urlmon/urlmon_urlmon.idl
dll/win32/urlmon/usrmarshal.c
dll/win32/user32/controls/button.c
dll/win32/user32/misc/stubs.c
dll/win32/user32/windows/menu.c
dll/win32/userenv/lang/cs-CZ.rc
dll/win32/userenv/setup.c
dll/win32/usp10/bidi.c [deleted file]
dll/win32/usp10/usp10.c
dll/win32/usp10/usp10.rbuild
dll/win32/usp10/usp10.spec
dll/win32/usp10/usp10_internal.h [deleted file]
dll/win32/version/resource.c
dll/win32/windowscodecs/bmpdecode.c
dll/win32/windowscodecs/clsfactory.c
dll/win32/windowscodecs/converter.c
dll/win32/windowscodecs/gifformat.c
dll/win32/windowscodecs/icoformat.c
dll/win32/windowscodecs/jpegformat.c
dll/win32/windowscodecs/palette.c
dll/win32/windowscodecs/pngformat.c
dll/win32/windowscodecs/regsvr.c
dll/win32/windowscodecs/stream.c
dll/win32/windowscodecs/tiffformat.c [deleted file]
dll/win32/windowscodecs/wincodecs_private.h
dll/win32/windowscodecs/windowscodecs.rbuild
dll/win32/wininet/internet.c
dll/win32/wininet/urlcache.c
dll/win32/wintrust/asn.c
dll/win32/ws2_32/misc/ns.c
drivers/bus/acpi/acpi.rbuild
drivers/bus/directory.rbuild
drivers/bus/isapnp/fdo.c [deleted file]
drivers/bus/isapnp/hardware.c [deleted file]
drivers/bus/isapnp/isapnp.c
drivers/bus/isapnp/isapnp.h
drivers/bus/isapnp/isapnp.rbuild
drivers/bus/isapnp/isapnphw.h [deleted file]
drivers/bus/isapnp/pdo.c [deleted file]
drivers/bus/pci/fdo.c
drivers/bus/pci/pdo.c
drivers/bus/pcmcia/fdo.c [deleted file]
drivers/bus/pcmcia/pcmcia.c [deleted file]
drivers/bus/pcmcia/pcmcia.h [deleted file]
drivers/bus/pcmcia/pcmcia.rbuild [deleted file]
drivers/bus/pcmcia/pcmcia.rc [deleted file]
drivers/bus/pcmcia/pdo.c [deleted file]
drivers/ksfilter/ks/allocators.c
drivers/ksfilter/ks/api.c
drivers/ksfilter/ks/bag.c
drivers/ksfilter/ks/clocks.c
drivers/ksfilter/ks/connectivity.c
drivers/ksfilter/ks/device.c
drivers/ksfilter/ks/deviceinterface.c
drivers/ksfilter/ks/driver.c
drivers/ksfilter/ks/filter.c
drivers/ksfilter/ks/filterfactory.c
drivers/ksfilter/ks/irp.c
drivers/ksfilter/ks/ksfunc.h
drivers/ksfilter/ks/ksiface.h
drivers/ksfilter/ks/kstypes.h
drivers/ksfilter/ks/methods.c
drivers/ksfilter/ks/misc.c
drivers/ksfilter/ks/pin.c
drivers/ksfilter/ks/priv.h
drivers/ksfilter/ks/property.c
drivers/ksfilter/ks/topology.c
drivers/multimedia/bdasup/precomp.h
drivers/network/afd/afd/lock.c
drivers/network/ndis/ndis.def [new file with mode: 0644]
drivers/network/ndis/ndis.rbuild
drivers/network/ndis/ndis.spec [deleted file]
drivers/network/ndis/ndis/miniport.c
drivers/network/tdi/misc/tdi.def [new file with mode: 0644]
drivers/network/tdi/misc/tdi.spec [deleted file]
drivers/network/tdi/tdi.rbuild
drivers/storage/class/cdrom/cdrom.c
drivers/storage/class/ramdisk/ramdisk.c
drivers/storage/ide/uniata/id_ata.cpp
drivers/usb/usbehci/common.c
drivers/usb/usbehci/fdo.c
drivers/usb/usbehci/irp.c
drivers/usb/usbehci/pdo.c
drivers/usb/usbehci/urbreq.c
drivers/usb/usbehci/usbehci.c
drivers/usb/usbehci/usbehci.h
drivers/usb/usbehci/usbiffn.c
drivers/usb/usbehci/usbiffn.h
drivers/video/displays/vga/objects/pointer.c
hal/halx86/directory.rbuild
hal/halx86/generic/acpi/halpnpdd.c
hal/halx86/generic/halinit.c
hal/halx86/hal_generic.rbuild
hal/halx86/hal_mini.rbuild [deleted file]
hal/halx86/halamd64.rbuild
include/ddk/hubbusif.h
include/ddk/ntddk.h
include/ddk/usbbusif.h
include/dxsdk/bdamedia.h
include/host/typedefs.h
include/host/wcsfuncs.h
include/ndk/amd64/ketypes.h
include/psdk/gdiplusflat.h
include/psdk/ks.h
include/psdk/ksmedia.h
include/psdk/ntdef.h
include/psdk/ntsecpkg.h
include/psdk/objbase.h
include/psdk/psdk.rbuild
include/psdk/shdeprecated.idl [deleted file]
include/psdk/shlwapi.h
include/psdk/sti.h
include/psdk/strsafe.h [deleted file]
include/psdk/wia.h [deleted file]
include/psdk/wia_lh.idl [deleted file]
include/psdk/wia_xp.idl [deleted file]
include/psdk/winbase.h
include/psdk/wingdi.h
include/psdk/winnt.h
include/psdk/winuser.h
include/reactos/arm/armddk.h
include/reactos/asm.h
include/reactos/win32k/ntgdityp.h
include/xdk/exfuncs.h
lib/cmlib/cminit.c
lib/cmlib/cmlib.h
lib/cmlib/cmlib.rbuild
lib/cmlib/hivecell.c
lib/cmlib/hivewrt.c
lib/drivers/ip/transport/tcp/tcp.c
lib/drivers/oskittcp/oskittcp/osenv.c
lib/drivers/sound/mmixer/wave.c
lib/host/wcsfuncs/wcsfuncs.c
lib/lib.rbuild
lib/newinflib/README.txt [deleted file]
lib/newinflib/builddep.h [deleted file]
lib/newinflib/infcommon.h [deleted file]
lib/newinflib/infcore.c [deleted file]
lib/newinflib/infget.c [deleted file]
lib/newinflib/infhost.h [deleted file]
lib/newinflib/infhostgen.c [deleted file]
lib/newinflib/infhostget.c [deleted file]
lib/newinflib/infhostput.c [deleted file]
lib/newinflib/infhostrtl.c [deleted file]
lib/newinflib/inflib.h [deleted file]
lib/newinflib/inflib.mak [deleted file]
lib/newinflib/inflib.rbuild [deleted file]
lib/newinflib/infpriv.h [deleted file]
lib/newinflib/infput.c [deleted file]
lib/newinflib/infros.h [deleted file]
lib/newinflib/infrosgen.c [deleted file]
lib/newinflib/infrosget.c [deleted file]
lib/newinflib/infrosput.c [deleted file]
lib/rtl/message.c
lib/rtl/sprintf.c
lib/rtl/swprintf.c
media/doc/README.WINE
media/drivers/etc/etc.rbuild
media/drivers/etc/hosts [deleted file]
media/inf/cpu.inf
media/inf/display.inf
media/inf/fdc.inf
media/inf/hdc.inf
media/inf/machine.inf
ntoskrnl/config/cmapi.c
ntoskrnl/config/cmboot.c
ntoskrnl/config/cmdata.c
ntoskrnl/config/cmhvlist.c
ntoskrnl/config/cminit.c
ntoskrnl/config/cmkcbncb.c
ntoskrnl/config/cmparse.c
ntoskrnl/config/cmsysini.c
ntoskrnl/include/internal/cm.h
ntoskrnl/include/internal/i386/intrin_i.h
ntoskrnl/include/internal/io.h
ntoskrnl/io/iomgr/device.c
ntoskrnl/io/iomgr/deviface.c
ntoskrnl/io/iomgr/driver.c
ntoskrnl/io/iomgr/drvrlist.c [new file with mode: 0644]
ntoskrnl/io/iomgr/iomgr.c
ntoskrnl/io/pnpmgr/pnpinit.c [deleted file]
ntoskrnl/io/pnpmgr/pnpmgr.c
ntoskrnl/io/pnpmgr/pnpnotify.c
ntoskrnl/io/pnpmgr/pnpreport.c
ntoskrnl/io/pnpmgr/pnpres.c [deleted file]
ntoskrnl/io/pnpmgr/pnproot.c
ntoskrnl/io/pnpmgr/pnputil.c [deleted file]
ntoskrnl/kdbg/kdb_cli.c
ntoskrnl/ke/i386/exp.c
ntoskrnl/ke/i386/traphdlr.c
ntoskrnl/mm/ARM3/drvmgmt.c
ntoskrnl/mm/ARM3/largepag.c [deleted file]
ntoskrnl/mm/ARM3/mdlsup.c
ntoskrnl/mm/ARM3/miarm.h
ntoskrnl/mm/ARM3/mminit.c
ntoskrnl/mm/ARM3/pfnlist.c
ntoskrnl/mm/ARM3/pool.c
ntoskrnl/mm/freelist.c
ntoskrnl/mm/mminit.c
ntoskrnl/mm/pagefile.c
ntoskrnl/mm/section.c
ntoskrnl/mm/sysldr.c
ntoskrnl/ntoskrnl-generic.rbuild
ntoskrnl/ntoskrnl.pspec
ntoskrnl/rtl/libsupp.c
ntoskrnl/se/semgr.c
rosbuild.bat
subsystems/ntvdm/ntvdm.c
subsystems/win32/csrss/win32csr/dllmain.c
subsystems/win32/csrss/win32csr/harderror.c [deleted file]
subsystems/win32/csrss/win32csr/w32csr.h
subsystems/win32/csrss/win32csr/win32csr.rbuild
subsystems/win32/win32k/dib/dib.c
subsystems/win32/win32k/dib/dib16bpp.c
subsystems/win32/win32k/dib/dib1bpp.c
subsystems/win32/win32k/dib/dib24bpp.c
subsystems/win32/win32k/dib/dib24bppc.c
subsystems/win32/win32k/dib/dib32bpp.c
subsystems/win32/win32k/dib/dib32bppc.c
subsystems/win32/win32k/dib/dib4bpp.c
subsystems/win32/win32k/dib/dib8bpp.c
subsystems/win32/win32k/dib/floodfill.c
subsystems/win32/win32k/dib/stretchblt.c
subsystems/win32/win32k/eng/alphablend.c
subsystems/win32/win32k/eng/bitblt.c
subsystems/win32/win32k/eng/clip.c
subsystems/win32/win32k/eng/copybits.c
subsystems/win32/win32k/eng/debug.c
subsystems/win32/win32k/eng/device.c
subsystems/win32/win32k/eng/driverobj.c
subsystems/win32/win32k/eng/engbrush.c
subsystems/win32/win32k/eng/engevent.c
subsystems/win32/win32k/eng/engmisc.c
subsystems/win32/win32k/eng/engwindow.c
subsystems/win32/win32k/eng/error.c
subsystems/win32/win32k/eng/float.c
subsystems/win32/win32k/eng/gradient.c
subsystems/win32/win32k/eng/lineto.c
subsystems/win32/win32k/eng/mapping.c
subsystems/win32/win32k/eng/mem.c
subsystems/win32/win32k/eng/mouse.c
subsystems/win32/win32k/eng/paint.c
subsystems/win32/win32k/eng/perfcnt.c
subsystems/win32/win32k/eng/semaphor.c
subsystems/win32/win32k/eng/sort.c
subsystems/win32/win32k/eng/stretchblt.c
subsystems/win32/win32k/eng/string.c
subsystems/win32/win32k/eng/surface.c
subsystems/win32/win32k/eng/transblt.c
subsystems/win32/win32k/eng/xlate.c
subsystems/win32/win32k/include/coord.h
subsystems/win32/win32k/include/dc.h
subsystems/win32/win32k/include/gdiobj.h
subsystems/win32/win32k/include/msgqueue.h
subsystems/win32/win32k/include/pdevobj.h
subsystems/win32/win32k/include/surface.h
subsystems/win32/win32k/include/win32k.h [moved from subsystems/win32/win32k/include/win32kp.h with 100% similarity]
subsystems/win32/win32k/ldr/loader.c
subsystems/win32/win32k/main/dllmain.c
subsystems/win32/win32k/misc/copy.c
subsystems/win32/win32k/misc/driver.c
subsystems/win32/win32k/misc/err.c
subsystems/win32/win32k/misc/file.c
subsystems/win32/win32k/misc/math.c
subsystems/win32/win32k/misc/registry.c
subsystems/win32/win32k/misc/rtlstr.c
subsystems/win32/win32k/misc/usrheap.c
subsystems/win32/win32k/ntddraw/d3d.c
subsystems/win32/win32k/ntddraw/dd.c
subsystems/win32/win32k/ntddraw/ddraw.c
subsystems/win32/win32k/ntddraw/ddsurf.c
subsystems/win32/win32k/ntddraw/dvp.c
subsystems/win32/win32k/ntddraw/dxeng.c
subsystems/win32/win32k/ntddraw/eng.c
subsystems/win32/win32k/ntddraw/mocomp.c
subsystems/win32/win32k/ntuser/accelerator.c
subsystems/win32/win32k/ntuser/callback.c
subsystems/win32/win32k/ntuser/callproc.c
subsystems/win32/win32k/ntuser/caret.c
subsystems/win32/win32k/ntuser/class.c
subsystems/win32/win32k/ntuser/clipboard.c
subsystems/win32/win32k/ntuser/csr.c
subsystems/win32/win32k/ntuser/cursoricon.c
subsystems/win32/win32k/ntuser/defwnd.c
subsystems/win32/win32k/ntuser/desktop.c
subsystems/win32/win32k/ntuser/display.c
subsystems/win32/win32k/ntuser/event.c
subsystems/win32/win32k/ntuser/focus.c
subsystems/win32/win32k/ntuser/guicheck.c
subsystems/win32/win32k/ntuser/hook.c
subsystems/win32/win32k/ntuser/hotkey.c
subsystems/win32/win32k/ntuser/input.c
subsystems/win32/win32k/ntuser/kbdlayout.c
subsystems/win32/win32k/ntuser/keyboard.c
subsystems/win32/win32k/ntuser/menu.c
subsystems/win32/win32k/ntuser/message.c
subsystems/win32/win32k/ntuser/metric.c
subsystems/win32/win32k/ntuser/misc.c
subsystems/win32/win32k/ntuser/monitor.c
subsystems/win32/win32k/ntuser/msgqueue.c
subsystems/win32/win32k/ntuser/ntstubs.c
subsystems/win32/win32k/ntuser/ntuser.c
subsystems/win32/win32k/ntuser/object.c
subsystems/win32/win32k/ntuser/painting.c
subsystems/win32/win32k/ntuser/prop.c
subsystems/win32/win32k/ntuser/scrollbar.c
subsystems/win32/win32k/ntuser/session.c
subsystems/win32/win32k/ntuser/simplecall.c
subsystems/win32/win32k/ntuser/sysparams.c
subsystems/win32/win32k/ntuser/timer.c
subsystems/win32/win32k/ntuser/useratom.c
subsystems/win32/win32k/ntuser/vis.c
subsystems/win32/win32k/ntuser/windc.c
subsystems/win32/win32k/ntuser/window.c
subsystems/win32/win32k/ntuser/winpos.c
subsystems/win32/win32k/ntuser/winsta.c
subsystems/win32/win32k/objects/arc.c
subsystems/win32/win32k/objects/bezier.c
subsystems/win32/win32k/objects/bitblt.c
subsystems/win32/win32k/objects/bitmaps.c
subsystems/win32/win32k/objects/brush.c
subsystems/win32/win32k/objects/cliprgn.c
subsystems/win32/win32k/objects/coord.c
subsystems/win32/win32k/objects/dcattr.c
subsystems/win32/win32k/objects/dclife.c
subsystems/win32/win32k/objects/dcobjs.c
subsystems/win32/win32k/objects/dcstate.c
subsystems/win32/win32k/objects/dcutil.c
subsystems/win32/win32k/objects/device.c
subsystems/win32/win32k/objects/dibobj.c
subsystems/win32/win32k/objects/drawing.c
subsystems/win32/win32k/objects/fillshap.c
subsystems/win32/win32k/objects/font.c
subsystems/win32/win32k/objects/freetype.c
subsystems/win32/win32k/objects/gdibatch.c
subsystems/win32/win32k/objects/gdidbg.c
subsystems/win32/win32k/objects/gdiobj.c
subsystems/win32/win32k/objects/icm.c
subsystems/win32/win32k/objects/line.c
subsystems/win32/win32k/objects/metafile.c
subsystems/win32/win32k/objects/palette.c
subsystems/win32/win32k/objects/path.c
subsystems/win32/win32k/objects/pen.c
subsystems/win32/win32k/objects/polyfill.c
subsystems/win32/win32k/objects/print.c
subsystems/win32/win32k/objects/rect.c
subsystems/win32/win32k/objects/region.c
subsystems/win32/win32k/objects/stockobj.c
subsystems/win32/win32k/objects/text.c
subsystems/win32/win32k/objects/wingl.c
subsystems/win32/win32k/objects/xformobj.c
subsystems/win32/win32k/pch.h
subsystems/win32/win32k/stubs/stubs.c
subsystems/win32/win32k/stubs/umpdstubs.c
subsystems/win32/win32k/w32k.h [moved from subsystems/win32/win32k/win32k.h with 100% similarity]

index 6d7abe7..777a1aa 100644 (file)
@@ -28,7 +28,6 @@
                <if property="OPTIMIZE" value="1">
                        <compilerflag>-ftracer</compilerflag>
                </if>
-               <compilerflag>-fms-extensions</compilerflag>
         <compilerflag>-Wno-attributes</compilerflag>
         <compilerflag>-U_UNICODE</compilerflag>
         <compilerflag>-UUNICODE</compilerflag>
index ac33ef4..ce9a744 100644 (file)
@@ -1,5 +1,3 @@
-<?xml version="1.0"?>
-<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
 <module name="reg" type="win32cui" installbase="system32" installname="reg.exe" unicode="true">
        <include base="reg">.</include>
        <redefine name="_WIN32_WINNT">0x600</redefine>
index b45df06..9ea43dc 100644 (file)
@@ -1,26 +1,25 @@
 <?xml version="1.0"?>
-<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
-<group>
-<installfile installbase="system32">downloader.xml</installfile>
-<module name="downloader" type="win32gui" installbase="system32" installname="downloader.exe" unicode="yes">
-       <include base="downloader">.</include>
-       <include base="expat">.</include>
+<group xmlns:xi="http://www.w3.org/2001/XInclude">
+       <installfile installbase="system32">downloader.xml</installfile>
+       <module name="downloader" type="win32gui" installbase="system32" installname="downloader.exe" unicode="yes">
+               <include base="downloader">.</include>
+               <include base="expat">.</include>
 
-       <library>advapi32</library>
-       <library>ntdll</library>
-       <library>user32</library>
-       <library>gdi32</library>
-       <library>shell32</library>
-       <library>comctl32</library>
-       <library>msimg32</library>
-       <library>shlwapi</library>
-       <library>urlmon</library>
-       <library>uuid</library>
-       <library>expat</library>
+               <library>advapi32</library>
+               <library>ntdll</library>
+               <library>user32</library>
+               <library>gdi32</library>
+               <library>shell32</library>
+               <library>comctl32</library>
+               <library>msimg32</library>
+               <library>shlwapi</library>
+               <library>urlmon</library>
+               <library>uuid</library>
+               <library>expat</library>
 
-       <file>main.c</file>
-       <file>xml.c</file>
-       <file>download.c</file>
-       <file>downloader.rc</file>
-</module>
+               <file>main.c</file>
+               <file>xml.c</file>
+               <file>download.c</file>
+               <file>downloader.rc</file>
+       </module>
 </group>
index f5cad36..8ceda78 100644 (file)
@@ -1,5 +1,3 @@
-<?xml version="1.0"?>
-<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
 <module name="fontview" type="win32gui" installbase="system32" installname="fontview.exe">
        <include base="fontview">.</include>
        <library>gdi32</library>
index 11ea960..2eed0b2 100644 (file)
@@ -1,5 +1,4 @@
 <?xml version="1.0"?>
-<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
 <group xmlns:xi="http://www.w3.org/2001/XInclude">
 <module name="kbswitch" type="win32gui" installbase="system32" installname="kbswitch.exe" unicode="yes">
        <include base="kbswitch">.</include>
index 8c06ce8..995437d 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
+<!DOCTYPE project SYSTEM "../../../tools/rbuild/project.dtd">
 <module name="magnify" type="win32gui" installbase="system32" installname="magnify.exe">
        <include base="magnify">.</include>
        <library>user32</library>
index 77003d9..c472e6f 100644 (file)
@@ -1,5 +1,3 @@
-<?xml version="1.0"?>
-<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
 <module name="mplay32" type="win32gui" installbase="system32" installname="mplay32.exe" unicode="yes">
        <include base="mplay32">.</include>
        <library>advapi32</library>
index cb23e1f..367c19e 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
+<rbuild xmlns:xi="http://www.w3.org/2001/XInclude">
 <module name="eventvwr" type="win32gui" installbase="system32" installname="eventvwr.exe" unicode="yes">
        <include base="eventvwr">.</include>
        <library>user32</library>
@@ -8,3 +8,4 @@
        <file>eventvwr.c</file>
        <file>eventvwr.rc</file>
 </module>
+</rbuild>
index b2d48ca..b9635e2 100644 (file)
@@ -630,9 +630,8 @@ int main(int argc, char* argv[])
         while ((NeverStop) || (Count < PingCount))
         {
             Ping();
+            Sleep(Timeout);
             Count++;
-            if((NeverStop) || (Count < PingCount))
-                Sleep(Timeout);
         };
 
         Cleanup();
index 9a68c8b..862e4fb 100644 (file)
@@ -147,15 +147,15 @@ void LoadSettings(void)
                if (dwPointSize != 0)
                        Globals.lfFont.lfHeight = HeightFromPointSize(dwPointSize);
 
-               RegCloseKey(hKey);
-       }
+               hFont = CreateFontIndirect(&Globals.lfFont);
+               if (hFont)
+               {
+                       if (Globals.hFont)
+                               DeleteObject(Globals.hFont);
+                       Globals.hFont = hFont;
+               }
 
-       hFont = CreateFontIndirect(&Globals.lfFont);
-       if (hFont)
-       {
-               if (Globals.hFont)
-                       DeleteObject(Globals.hFont);
-               Globals.hFont = hFont;
+               RegCloseKey(hKey);
        }
 }
 
index ed1015d..6ca1907 100644 (file)
@@ -51,7 +51,7 @@ BOOL ReadText(HANDLE hFile, LPWSTR *ppszText, DWORD *pdwTextLen, int *piEncoding
 {
        DWORD dwSize;
        LPBYTE pBytes = NULL;
-       LPWSTR pszText;
+       LPCWSTR pszText;
        LPWSTR pszAllocText = NULL;
        DWORD dwPos, i;
        DWORD dwCharCount;
@@ -110,7 +110,7 @@ BOOL ReadText(HANDLE hFile, LPWSTR *ppszText, DWORD *pdwTextLen, int *piEncoding
                /* fall through */
 
        case ENCODING_UNICODE:
-               pszText = (LPWSTR) &pBytes[dwPos];
+               pszText = (LPCWSTR) &pBytes[dwPos];
                dwCharCount = (dwSize - dwPos) / sizeof(WCHAR);
                break;
 
@@ -174,10 +174,6 @@ BOOL ReadText(HANDLE hFile, LPWSTR *ppszText, DWORD *pdwTextLen, int *piEncoding
                        else
                                adwEolnCount[EOLN_LF]++;
                        break;
-
-               case '\0':
-                       pszText[i] = ' ';
-                       break;
                }
        }
 
index 2c38106..d7b7c9e 100644 (file)
@@ -60,8 +60,8 @@ BEGIN
                 MENUITEM "800%", IDM_VIEWZOOM800
             END
             MENUITEM SEPARATOR
-            MENUITEM "Mostra griglia", IDM_VIEWSHOWGRID
-            MENUITEM "Mostra miniature", IDM_VIEWSHOWMINIATURE
+            MENUITEM "Show grid", IDM_VIEWSHOWGRID
+            MENUITEM "Show miniature", IDM_VIEWSHOWMINIATURE
         END
         MENUITEM "Visualizza a schermo intero\tCtrl+F", IDM_VIEWFULLSCREEN
     END
@@ -201,5 +201,5 @@ BEGIN
     IDS_OPENFILTER, "Bitmap files (*.bmp;*.dib)\1*.bmp;*.dib\1All files (*.*)\1*.*\1"
     IDS_SAVEFILTER, "24 bit bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1"
     IDS_FILESIZE, "%d bytes"
-    IDS_PRINTRES, "%d x %d pixels per metro"
+    IDS_PRINTRES, "%d x %d pixels per meter"
 END
index 9042205..98565f4 100644 (file)
@@ -143,7 +143,6 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
     HBITMAP tempBm;
     int i;
     TCHAR tooltips[16][30];
-    HDC hDC;
     
     TCHAR *c;
     TCHAR sfnFilename[1000];
@@ -153,7 +152,7 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
     TCHAR ofnFiletitle[256];
     TCHAR ofnFilter[1000];
     TCHAR miniaturetitle[100];
-    static int custColors[16] = { 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
+    int custColors[16] = { 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
         0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff
     };
 
@@ -372,10 +371,8 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
         CreateWindowEx(0, _T("Scrollbox"), _T(""), WS_CHILD | WS_VISIBLE, 3, 3, imgXRes, imgYRes, hScrlClient,
                        NULL, hThisInstance, NULL);
 
-    hDC = GetDC(hImageArea);
-    hDrawingDC = CreateCompatibleDC(hDC);
-    hSelDC     = CreateCompatibleDC(hDC);
-    ReleaseDC(hImageArea, hDC);
+    hDrawingDC = CreateCompatibleDC(GetDC(hImageArea));
+    hSelDC     = CreateCompatibleDC(GetDC(hImageArea));
     SelectObject(hDrawingDC, CreatePen(PS_SOLID, 0, fgColor));
     SelectObject(hDrawingDC, CreateSolidBrush(bgColor));
 
index 9165291..4f5c130 100644 (file)
@@ -25,34 +25,6 @@ placeSelWin()
     //SendMessage(hSelection, WM_PAINT, 0, 0);
 }
 
-void
-regularize(short x0, short y0, short *x1, short *y1)
-{
-    if (abs(*x1 - x0) >= abs(*y1 - y0))
-        *y1 = y0 + (*y1 > y0 ? abs(*x1 - x0) : -abs(*x1 - x0));
-    else
-        *x1 = x0 + (*x1 > x0 ? abs(*y1 - y0) : -abs(*y1 - y0));
-}
-
-void
-roundTo8Directions(short x0, short y0, short *x1, short *y1)
-{
-    if (abs(*x1 - x0) >= abs(*y1 - y0))
-    {
-        if (abs(*y1 - y0) * 5 < abs(*x1 - x0) * 2)
-            *y1 = y0;
-        else
-            *y1 = y0 + (*y1 > y0 ? abs(*x1 - x0) : -abs(*x1 - x0));
-    }
-    else
-    {
-        if (abs(*x1 - x0) * 5 < abs(*y1 - y0) * 2)
-            *x1 = x0;
-        else
-            *x1 = x0 + (*x1 > x0 ? abs(*y1 - y0) : -abs(*y1 - y0));
-    }
-}
-
 POINT pointStack[256];
 short pointSP;
 POINT *ptStack = NULL;
@@ -175,8 +147,6 @@ whilePaintingL(HDC hdc, short x, short y, int fg, int bg)
             break;
         case 11:
             resetToU1();
-            if (GetAsyncKeyState(VK_SHIFT) < 0)
-                roundTo8Directions(startX, startY, &x, &y);
             Line(hdc, startX, startY, x, y, fg, lineWidth);
             break;
         case 12:
@@ -199,30 +169,21 @@ whilePaintingL(HDC hdc, short x, short y, int fg, int bg)
             break;
         case 13:
             resetToU1();
-            if (GetAsyncKeyState(VK_SHIFT) < 0)
-                regularize(startX, startY, &x, &y);
             Rect(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle);
             break;
         case 14:
             resetToU1();
             pointStack[pointSP].x = x;
             pointStack[pointSP].y = y;
-            if ((pointSP > 0) && (GetAsyncKeyState(VK_SHIFT) < 0))
-                roundTo8Directions(pointStack[pointSP - 1].x, pointStack[pointSP - 1].y,
-                                   (short *)&pointStack[pointSP].x, (short *)&pointStack[pointSP].y);
             if (pointSP + 1 >= 2)
                 Poly(hdc, pointStack, pointSP + 1, fg, bg, lineWidth, shapeStyle, FALSE);
             break;
         case 15:
             resetToU1();
-            if (GetAsyncKeyState(VK_SHIFT) < 0)
-                regularize(startX, startY, &x, &y);
             Ellp(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle);
             break;
         case 16:
             resetToU1();
-            if (GetAsyncKeyState(VK_SHIFT) < 0)
-                regularize(startX, startY, &x, &y);
             RRect(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle);
             break;
     }
@@ -315,8 +276,6 @@ endPaintingL(HDC hdc, short x, short y, int fg, int bg)
             break;
         case 11:
             resetToU1();
-            if (GetAsyncKeyState(VK_SHIFT) < 0)
-                roundTo8Directions(startX, startY, &x, &y);
             Line(hdc, startX, startY, x, y, fg, lineWidth);
             break;
         case 12:
@@ -326,17 +285,12 @@ endPaintingL(HDC hdc, short x, short y, int fg, int bg)
             break;
         case 13:
             resetToU1();
-            if (GetAsyncKeyState(VK_SHIFT) < 0)
-                regularize(startX, startY, &x, &y);
             Rect(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle);
             break;
         case 14:
             resetToU1();
             pointStack[pointSP].x = x;
             pointStack[pointSP].y = y;
-            if ((pointSP > 0) && (GetAsyncKeyState(VK_SHIFT) < 0))
-                roundTo8Directions(pointStack[pointSP - 1].x, pointStack[pointSP - 1].y,
-                                   (short *)&pointStack[pointSP].x, (short *)&pointStack[pointSP].y);
             pointSP++;
             if (pointSP >= 2)
             {
@@ -356,14 +310,10 @@ endPaintingL(HDC hdc, short x, short y, int fg, int bg)
             break;
         case 15:
             resetToU1();
-            if (GetAsyncKeyState(VK_SHIFT) < 0)
-                regularize(startX, startY, &x, &y);
             Ellp(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle);
             break;
         case 16:
             resetToU1();
-            if (GetAsyncKeyState(VK_SHIFT) < 0)
-                regularize(startX, startY, &x, &y);
             RRect(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle);
             break;
     }
@@ -448,8 +398,6 @@ whilePaintingR(HDC hdc, short x, short y, int fg, int bg)
             break;
         case 11:
             resetToU1();
-            if (GetAsyncKeyState(VK_SHIFT) < 0)
-                roundTo8Directions(startX, startY, &x, &y);
             Line(hdc, startX, startY, x, y, bg, lineWidth);
             break;
         case 12:
@@ -472,30 +420,21 @@ whilePaintingR(HDC hdc, short x, short y, int fg, int bg)
             break;
         case 13:
             resetToU1();
-            if (GetAsyncKeyState(VK_SHIFT) < 0)
-                regularize(startX, startY, &x, &y);
             Rect(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle);
             break;
         case 14:
             resetToU1();
             pointStack[pointSP].x = x;
             pointStack[pointSP].y = y;
-            if ((pointSP > 0) && (GetAsyncKeyState(VK_SHIFT) < 0))
-                roundTo8Directions(pointStack[pointSP - 1].x, pointStack[pointSP - 1].y,
-                                   (short *)&pointStack[pointSP].x, (short *)&pointStack[pointSP].y);
             if (pointSP + 1 >= 2)
                 Poly(hdc, pointStack, pointSP + 1, bg, fg, lineWidth, shapeStyle, FALSE);
             break;
         case 15:
             resetToU1();
-            if (GetAsyncKeyState(VK_SHIFT) < 0)
-                regularize(startX, startY, &x, &y);
             Ellp(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle);
             break;
         case 16:
             resetToU1();
-            if (GetAsyncKeyState(VK_SHIFT) < 0)
-                regularize(startX, startY, &x, &y);
             RRect(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle);
             break;
     }
@@ -518,8 +457,6 @@ endPaintingR(HDC hdc, short x, short y, int fg, int bg)
             break;
         case 11:
             resetToU1();
-            if (GetAsyncKeyState(VK_SHIFT) < 0)
-                roundTo8Directions(startX, startY, &x, &y);
             Line(hdc, startX, startY, x, y, bg, lineWidth);
             break;
         case 12:
@@ -529,17 +466,12 @@ endPaintingR(HDC hdc, short x, short y, int fg, int bg)
             break;
         case 13:
             resetToU1();
-            if (GetAsyncKeyState(VK_SHIFT) < 0)
-                regularize(startX, startY, &x, &y);
             Rect(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle);
             break;
         case 14:
             resetToU1();
             pointStack[pointSP].x = x;
             pointStack[pointSP].y = y;
-            if ((pointSP > 0) && (GetAsyncKeyState(VK_SHIFT) < 0))
-                roundTo8Directions(pointStack[pointSP - 1].x, pointStack[pointSP - 1].y,
-                                   (short *)&pointStack[pointSP].x, (short *)&pointStack[pointSP].y);
             pointSP++;
             if (pointSP >= 2)
             {
@@ -559,14 +491,10 @@ endPaintingR(HDC hdc, short x, short y, int fg, int bg)
             break;
         case 15:
             resetToU1();
-            if (GetAsyncKeyState(VK_SHIFT) < 0)
-                regularize(startX, startY, &x, &y);
             Ellp(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle);
             break;
         case 16:
             resetToU1();
-            if (GetAsyncKeyState(VK_SHIFT) < 0)
-                regularize(startX, startY, &x, &y);
             RRect(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle);
             break;
     }
index bc83f3a..066b3ba 100644 (file)
@@ -1,5 +1,3 @@
-<?xml version="1.0"?>
-<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
 <group>
 <module name="rapps" type="win32gui" installbase="system32" installname="rapps.exe" unicode="yes">
        <include base="ReactOS">include/reactos</include>
index e9313b7..e605180 100644 (file)
@@ -2,41 +2,41 @@
 
 [Section]
 Name = Mozilla Firefox 3.0
-Version = 3.0.19
+Version = 3.0.18
 Licence = MPL/GPL/LGPL
 Description = The most popular and one of the best free Web Browsers out there.
 Size = 7.2M
 Category = 5
 URLSite = http://www.mozilla.com/en-US/
-URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/en-US/Firefox%20Setup%203.0.19.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/win32/en-US/Firefox%20Setup%203.0.18.exe
 CDPath = none
 
 [Section.0407]
 Description = Der populärste und einer der besten freien Webbrowser.
 Size = 7.0M
 URLSite = http://www.mozilla-europe.org/de/
-URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/de/Firefox%20Setup%203.0.19.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/win32/de/Firefox%20Setup%203.0.18.exe
 
 [Section.040a]
 Description = El más popular y uno de los mejores navegadores web gratuitos que hay.
 Size = 7.0M
 URLSite = http://www.mozilla-europe.org/es/
-URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/es-ES/Firefox%20Setup%203.0.19.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/win32/es-ES/Firefox%20Setup%203.0.18.exe
 
 [Section.0414]
 Description = Mest populære og best også gratis nettleserene der ute.
-Size = 7.0M
+Size = 6.9M
 URLSite = http://www.mozilla-europe.org/no/
-URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/nb-NO/Firefox%20Setup%203.0.19.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/win32/nb-NO/Firefox%20Setup%203.0.18.exe
 
 [Section.0415]
 Description = Najpopularniejsza i jedna z najlepszych darmowych przeglądarek internetowych.
 Size = 7.8M
 URLSite = http://www.mozilla-europe.org/pl/
-URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/pl/Firefox%20Setup%203.0.19.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/win32/pl/Firefox%20Setup%203.0.18.exe
 
 [Section.0419]
 Description = Один из самых популярных и лучших бесплатных браузеров.
 Size = 7.4M
 URLSite = http://www.mozilla-europe.org/ru/
-URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/ru/Firefox%20Setup%203.0.19.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/win32/ru/Firefox%20Setup%203.0.18.exe
index e1f6628..0fff6a4 100644 (file)
@@ -2,13 +2,13 @@
 
 [Section]
 Name = Miranda IM
-Version = 0.8.21
+Version = 0.8.18
 Licence = GPL
 Description = Open source multiprotocol instant messaging application - May not work completely.
 Size = 1.6MB
 Category = 5
 URLSite = http://www.miranda-im.org/
-URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.8.21-unicode.exe
+URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.8.18-unicode.exe
 CDPath = none
 
 [Section.0407]
index 2e70160..dfc94a9 100644 (file)
@@ -2,13 +2,13 @@
 
 [Section]
 Name = OpenTTD
-Version = 1.0.0
+Version = 0.7.5
 Licence = GPL v2
 Description = Open Source clone of the "Transport Tycoon Deluxe" game engine. You need a copy of Transport Tycoon.
-Size = 3.5MB
+Size = 2.9MB
 Category = 4
 URLSite = http://www.openttd.org/
-URLDownload = http://binaries.openttd.org/releases/1.0.0/openttd-1.0.0-windows-win32.exe
+URLDownload = http://binaries.openttd.org/releases/0.7.5/openttd-0.7.5-windows-win32.exe
 CDPath = none
 
 [Section.0407]
index aee4c21..44e49cc 100644 (file)
@@ -2,13 +2,13 @@
 
 [Section]
 Name = Opera
-Version = 10.52
+Version = 10.51
 Licence = Freeware
 Description = The popular Opera Browser with many advanced features and including a Mail and BitTorrent client.
-Size = 12.0M
+Size = 11.0M
 Category = 5
 URLSite = http://www.opera.com/
-URLDownload = http://get4.opera.com/pub/opera/win/1052/int/Opera_1052_int_Setup.exe
+URLDownload = http://get4.opera.com/pub/opera/win/1051/int/Opera_1051_int_Setup.exe
 CDPath = none
 
 [Section.0407]
index c32df9c..fc3d9d5 100644 (file)
@@ -2,13 +2,13 @@
 
 [Section]
 Name = SciTE
-Version = 2.11
+Version = 2.03
 Licence = Freeware
 Description = SciTE is a SCIntilla based Text Editor. Originally built to demonstrate Scintilla, it has grown to be a generally useful editor with facilities for building and running programs.
 Size = 0.6M
 Category = 7
 URLSite = http://www.scintilla.org/
-URLDownload = http://ovh.dl.sourceforge.net/sourceforge/scintilla/Sc211.exe
+URLDownload = http://ovh.dl.sourceforge.net/sourceforge/scintilla/Sc203.exe
 CDPath = none
 
 [Section.0407]
index ebe7b34..6365b1c 100644 (file)
@@ -2,13 +2,13 @@
 
 [Section]
 Name = ScummVM
-Version = 1.1.0
+Version = 1.0.0
 Licence = GPL
 Description = Sam and Max, Day of the Tentacle, etc on ReactOS.
-Size = 3.4MB
+Size = 3.1MB
 Category = 4
 URLSite = http://scummvm.org/
-URLDownload = http://dfn.dl.sourceforge.net/project/scummvm/scummvm/1.1.0/scummvm-1.1.0-win32.exe
+URLDownload = http://dfn.dl.sourceforge.net/project/scummvm/scummvm/1.0.0/scummvm-1.0.0-win32.exe
 CDPath = none
 
 [Section.0407]
index 55d3be8..9c980d3 100644 (file)
@@ -2,31 +2,31 @@
 
 [Section]
 Name = Mozilla SeaMonkey
-Version = 2.0.4
+Version = 2.0.3
 Licence = MPL/GPL/LGPL
 Description = Mozilla Suite is alive. This is the one and only Browser, Mail, Chat, and Composer bundle you will ever need.
-Size = 10.1MB
+Size = 10.0MB
 Category = 5
 URLSite = http://www.seamonkey-project.org/
-URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.4/win32/en-US/SeaMonkey%20Setup%202.0.4.exe
+URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.3/win32/en-US/SeaMonkey%20Setup%202.0.3.exe
 CDPath = none
 
 [Section.0407]
 Description = Mozilla Suite lebt. Dies ist das einzige Browser-, Mail-, Chat- and Composerwerkzeug-Bundle welches Sie benötigen.
-Size = 10.0MB
-URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.4/win32/de/SeaMonkey%20Setup%202.0.4.exe
+Size = 10.1MB
+URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.3/win32/de/SeaMonkey%20Setup%202.0.3.exe
 
 [Section.040a]
 Description = La suite de Mozilla está viva. Es el primero y único navegador web, gestor de correo, lector de noticias, Chat y editor HTML que necesitarás.
 Size = 10.0MB
-URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.4/win32/es-ES/SeaMonkey%20Setup%202.0.4.exe
+URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.3/win32/es-ES/SeaMonkey%20Setup%202.0.3.exe
 
 [Section.0415]
 Description = Pakiet Mozilla żyje. W zestawie: przeglądarka, klient poczty, IRC oraz Edytor HTML - wszystko, czego potrzebujesz.
 Size = 10.8MB
-URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.4/win32/pl/SeaMonkey%20Setup%202.0.4.exe
+URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.3/win32/pl/SeaMonkey%20Setup%202.0.3.exe
 
 [Section.0419]
 Description = Продолжение Mozilla Suite. Включает браузер, почтовый клиент, IRC-клиент и HTML-редактор.
 Size = 10.4MB
-URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.4/win32/ru/SeaMonkey%20Setup%202.0.4.exe
+URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.3/win32/ru/SeaMonkey%20Setup%202.0.3.exe
index a9e837c..9f0cd32 100644 (file)
@@ -2,35 +2,35 @@
 
 [Section]
 Name = Mozilla Thunderbird
-Version = 3.0.4
+Version = 3.0.3
 Licence = MPL/GPL/LGPL
 Description = The most popular and one of the best free Mail Clients out there.
 Size = 8.6M
 Category = 5
 URLSite = http://www.mozilla-europe.org/en/products/thunderbird/
-URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.4/win32/en-US/Thunderbird%20Setup%203.0.4.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.3/win32/en-US/Thunderbird%20Setup%203.0.3.exe
 CDPath = none
 
 [Section.0407]
 Description = Der populärste und einer der besten freien Mail-Clients.
-Size = 8.5M
+Size = 8.4M
 URLSite = http://www.mozilla-europe.org/de/products/thunderbird/
-URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.4/win32/de/Thunderbird%20Setup%203.0.4.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.3/win32/de/Thunderbird%20Setup%203.0.3.exe
 
 [Section.040a]
 Description = El más popular y uno de los mejores clientes mail que hay.
 Size = 8.4M
 URLSite = http://www.mozilla-europe.org/es/products/thunderbird/
-URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.4/win32/es-ES/Thunderbird%20Setup%203.0.4.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.3/win32/es-ES/Thunderbird%20Setup%203.0.3.exe
 
 [Section.0415]
 Description = Najpopularniejszy i jeden z najlepszych darmowych klientów poczty.
 Size = 9.3M
 URLSite = http://www.mozilla-europe.org/pl/products/thunderbird/
-URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.4/win32/pl/Thunderbird%20Setup%203.0.4.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.3/win32/pl/Thunderbird%20Setup%203.0.3.exe
 
 [Section.0419]
 Description = Один из самых популярных и лучших бесплатных почтовых клиентов.
 Size = 8.8M
 URLSite = http://www.mozilla-europe.org/ru/products/thunderbird/
-URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.4/win32/ru/Thunderbird%20Setup%203.0.4.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.3/win32/ru/Thunderbird%20Setup%203.0.3.exe
index ffcded7..9882637 100644 (file)
@@ -2,13 +2,13 @@
 
 [Section]
 Name = µTorrent
-Version = 2.0.1
+Version = 2.0
 Licence = Freeware for non-commercial uses
 Description = Small and fast BitTorrent Client.
-Size = 314K
+Size = 312K
 Category = 5
 URLSite = http://www.utorrent.com/
-URLDownload = http://download.utorrent.com/2.0.1/utorrent.exe
+URLDownload = http://download.utorrent.com/2.0/utorrent.exe
 CDPath = none
 
 
index a6b4144..6a90cc3 100644 (file)
@@ -228,6 +228,8 @@ static BOOL CheckCommDlgError(HWND hWnd)
     return TRUE;
 }
 
+#define MAX_CUSTOM_FILTER_SIZE 50
+TCHAR CustomFilterBuffer[MAX_CUSTOM_FILTER_SIZE];
 TCHAR FileNameBuffer[_MAX_PATH];
 TCHAR FileTitleBuffer[_MAX_PATH];
 
@@ -273,11 +275,25 @@ static BOOL InitOpenFileName(HWND hWnd, OPENFILENAME* pofn)
     BuildFilterStrings(Filter, FilterPairs, sizeof(FilterPairs) / sizeof(FILTERPAIR));
 
     pofn->lpstrFilter = Filter;
+    pofn->lpstrCustomFilter = CustomFilterBuffer;
+    pofn->nMaxCustFilter = MAX_CUSTOM_FILTER_SIZE;
+    pofn->nFilterIndex = 0;
     pofn->lpstrFile = FileNameBuffer;
     pofn->nMaxFile = _MAX_PATH;
     pofn->lpstrFileTitle = FileTitleBuffer;
     pofn->nMaxFileTitle = _MAX_PATH;
+    /*    pofn->lpstrInitialDir = _T("");*/
+    /*    pofn->lpstrTitle = _T("Import Registry File");*/
+    /*    pofn->Flags = OFN_ENABLETEMPLATE + OFN_EXPLORER + OFN_ENABLESIZING;*/
     pofn->Flags = OFN_HIDEREADONLY;
+    /*    pofn->nFileOffset = ;*/
+    /*    pofn->nFileExtension = ;*/
+    /*    pofn->lpstrDefExt = _T("");*/
+    /*    pofn->lCustData = ;*/
+    /*    pofn->lpfnHook = ImportRegistryFile_OFNHookProc;*/
+    /*    pofn->lpTemplateName = _T("ID_DLG_IMPORT_REGFILE");*/
+    /*    pofn->lpTemplateName = MAKEINTRESOURCE(IDD_DIALOG1);*/
+    /*    pofn->FlagsEx = ;*/
     return TRUE;
 }
 
@@ -340,11 +356,11 @@ static UINT_PTR CALLBACK ExportRegistryFile_OFNHookProc(HWND hdlg, UINT uiMsg, W
 
         hwndExportAll = GetDlgItem(hdlg, IDC_EXPORT_ALL);
         if (hwndExportAll)
-            SendMessage(hwndExportAll, BM_SETCHECK, pszSelectedKey ? BST_UNCHECKED : BST_CHECKED, 0);
+                       SendMessage(hwndExportAll, BM_SETCHECK, pszSelectedKey[0] ? BST_UNCHECKED : BST_CHECKED, 0);
 
         hwndExportBranch = GetDlgItem(hdlg, IDC_EXPORT_BRANCH);
         if (hwndExportBranch)
-            SendMessage(hwndExportBranch, BM_SETCHECK, pszSelectedKey ? BST_CHECKED : BST_UNCHECKED, 0);
+            SendMessage(hwndExportBranch, BM_SETCHECK, pszSelectedKey[0] ? BST_CHECKED : BST_UNCHECKED, 0);
 
         hwndExportBranchText = GetDlgItem(hdlg, IDC_EXPORT_BRANCH_TEXT);
         if (hwndExportBranchText)
@@ -390,12 +406,7 @@ BOOL ExportRegistryFile(HWND hWnd)
     InitOpenFileName(hWnd, &ofn);
     LoadString(hInst, IDS_EXPORT_REG_FILE, Caption, sizeof(Caption)/sizeof(TCHAR));
     ofn.lpstrTitle = Caption;
-
-    /* Only set the path if a key (not the root node) is selected */
-    if (hKeyRoot != 0)
-    {
-        ofn.lCustData = (LPARAM) ExportKeyPath;
-    }
+    ofn.lCustData = (LPARAM) ExportKeyPath;
     ofn.Flags = OFN_ENABLETEMPLATE | OFN_EXPLORER | OFN_ENABLEHOOK;
     ofn.lpfnHook = ExportRegistryFile_OFNHookProc;
     ofn.lpTemplateName = MAKEINTRESOURCE(IDD_EXPORTRANGE);
index 0c20e81..3ef6ee9 100644 (file)
@@ -49,7 +49,7 @@ void            ApplicationPageOnNotify(WPARAM wParam, LPARAM lParam);
 void            ApplicationPageShowContextMenu1(void);
 void            ApplicationPageShowContextMenu2(void);
 int CALLBACK    ApplicationPageCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
-int             ProcGetIndexByProcessId(DWORD dwProcessId);
+int             PerfGetIndexByProcessId(DWORD dwProcessId);
 
 #if 0
 void SwitchToThisWindow (
@@ -236,13 +236,6 @@ void UpdateApplicationListControlViewSetting(void)
 
 DWORD WINAPI ApplicationPageRefreshThread(void *lpParameter)
 {
-    INT i;
-    BOOL                            bItemRemoved = FALSE;
-    LV_ITEM                         item;
-    LPAPPLICATION_PAGE_LIST_ITEM    pAPLI = NULL;
-    HIMAGELIST                      hImageListLarge;
-    HIMAGELIST                      hImageListSmall;
-
     /* Create the event */
     hApplicationPageEvent = CreateEventW(NULL, TRUE, TRUE, NULL);
 
@@ -276,55 +269,6 @@ DWORD WINAPI ApplicationPageRefreshThread(void *lpParameter)
             EnumWindows(EnumWindowsProc, 0);
             if (noApps)
                 (void)ListView_DeleteAllItems(hApplicationPageListCtrl);
-
-            /* Get the image lists */
-            hImageListLarge = ListView_GetImageList(hApplicationPageListCtrl, LVSIL_NORMAL);
-            hImageListSmall = ListView_GetImageList(hApplicationPageListCtrl, LVSIL_SMALL);
-
-            /* Check to see if we need to remove any items from the list */
-            for (i=ListView_GetItemCount(hApplicationPageListCtrl)-1; i>=0; i--)
-            {
-                memset(&item, 0, sizeof(LV_ITEM));
-                item.mask = LVIF_IMAGE|LVIF_PARAM;
-                item.iItem = i;
-                (void)ListView_GetItem(hApplicationPageListCtrl, &item);
-
-                pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
-                if (!IsWindow(pAPLI->hWnd)||
-                    (wcslen(pAPLI->szTitle) <= 0) ||
-                    !IsWindowVisible(pAPLI->hWnd) ||
-                    (GetParent(pAPLI->hWnd) != NULL) ||
-                    (GetWindow(pAPLI->hWnd, GW_OWNER) != NULL) ||
-                    (GetWindowLongPtr(pAPLI->hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
-                {
-                    ImageList_Remove(hImageListLarge, item.iItem);
-                    ImageList_Remove(hImageListSmall, item.iItem);
-
-                    (void)ListView_DeleteItem(hApplicationPageListCtrl, item.iItem);
-                    HeapFree(GetProcessHeap(), 0, pAPLI);
-                    bItemRemoved = TRUE;
-                }
-            }
-
-            /*
-             * If an item was removed from the list then
-             * we need to resync all the items with the
-             * image list
-             */
-            if (bItemRemoved)
-            {
-                for (i=0; i<ListView_GetItemCount(hApplicationPageListCtrl); i++)
-                {
-                    memset(&item, 0, sizeof(LV_ITEM));
-                    item.mask = LVIF_IMAGE;
-                    item.iItem = i;
-                    item.iImage = i;
-                    (void)ListView_SetItem(hApplicationPageListCtrl, &item);
-                }
-                bItemRemoved = FALSE;
-            }
-
-            ApplicationPageUpdate();
         }
     }
 }
@@ -389,12 +333,13 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
 
 void AddOrUpdateHwnd(HWND hWnd, WCHAR *szTitle, HICON hIcon, BOOL bHung)
 {
-    LPAPPLICATION_PAGE_LIST_ITEM    pAPLI = NULL;
-    HIMAGELIST                      hImageListLarge;
-    HIMAGELIST                      hImageListSmall;
-    LV_ITEM                         item;
-    int                             i;
-    BOOL                            bAlreadyInList = FALSE;
+    LPAPPLICATION_PAGE_LIST_ITEM  pAPLI = NULL;
+    HIMAGELIST                    hImageListLarge;
+    HIMAGELIST                    hImageListSmall;
+    LV_ITEM                       item;
+    int                           i;
+    BOOL                          bAlreadyInList = FALSE;
+    BOOL                          bItemRemoved = FALSE;
 
     memset(&item, 0, sizeof(LV_ITEM));
 
@@ -461,7 +406,51 @@ void AddOrUpdateHwnd(HWND hWnd, WCHAR *szTitle, HICON hIcon, BOOL bHung)
         item.lParam = (LPARAM)pAPLI;
         (void)ListView_InsertItem(hApplicationPageListCtrl, &item);
     }
-    return;
+
+
+    /* Check to see if we need to remove any items from the list */
+    for (i=ListView_GetItemCount(hApplicationPageListCtrl)-1; i>=0; i--)
+    {
+        memset(&item, 0, sizeof(LV_ITEM));
+        item.mask = LVIF_IMAGE|LVIF_PARAM;
+        item.iItem = i;
+        (void)ListView_GetItem(hApplicationPageListCtrl, &item);
+
+        pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
+        if (!IsWindow(pAPLI->hWnd)||
+            (wcslen(pAPLI->szTitle) <= 0) ||
+            !IsWindowVisible(pAPLI->hWnd) ||
+            (GetParent(pAPLI->hWnd) != NULL) ||
+            (GetWindow(pAPLI->hWnd, GW_OWNER) != NULL) ||
+            (GetWindowLongPtrW(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
+        {
+            ImageList_Remove(hImageListLarge, item.iItem);
+            ImageList_Remove(hImageListSmall, item.iItem);
+
+            (void)ListView_DeleteItem(hApplicationPageListCtrl, item.iItem);
+            HeapFree(GetProcessHeap(), 0, pAPLI);
+            bItemRemoved = TRUE;
+        }
+    }
+
+    /*
+     * If an item was removed from the list then
+     * we need to resync all the items with the
+     * image list
+     */
+    if (bItemRemoved)
+    {
+        for (i=0; i<ListView_GetItemCount(hApplicationPageListCtrl); i++)
+        {
+            memset(&item, 0, sizeof(LV_ITEM));
+            item.mask = LVIF_IMAGE;
+            item.iItem = i;
+            item.iImage = i;
+            (void)ListView_SetItem(hApplicationPageListCtrl, &item);
+        }
+    }
+
+    ApplicationPageUpdate();
 }
 
 void ApplicationPageUpdate(void)
@@ -889,6 +878,7 @@ void ApplicationPage_OnGotoProcess(void)
     LPAPPLICATION_PAGE_LIST_ITEM  pAPLI = NULL;
     LV_ITEM                       item;
     int                           i;
+    /* NMHDR nmhdr; */
 
     for (i=0; i<ListView_GetItemCount(hApplicationPageListCtrl); i++) {
         memset(&item, 0, sizeof(LV_ITEM));
@@ -912,7 +902,7 @@ void ApplicationPage_OnGotoProcess(void)
         /*
          * Select the process item in the list
          */
-        i = ProcGetIndexByProcessId(dwProcessId);
+        i = PerfGetIndexByProcessId(dwProcessId);
         if (i != -1)
         {
             ListView_SetItemState(hProcessPageListCtrl,
index a1095e5..015c499 100644 (file)
@@ -40,15 +40,6 @@ SYSTEM_HANDLE_INFORMATION                  SystemHandleInfo;
 PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION  SystemProcessorTimeInfo = NULL;
 PSID                                       SystemUserSid = NULL;
 
-typedef struct _SIDTOUSERNAME
-{
-    LIST_ENTRY List;
-    LPWSTR pszName;
-    BYTE Data[0];
-} SIDTOUSERNAME, *PSIDTOUSERNAME;
-
-static LIST_ENTRY SidToUserNameHead = {&SidToUserNameHead, &SidToUserNameHead};
-
 BOOL PerfDataInitialize(void)
 {
     SID_IDENTIFIER_AUTHORITY NtSidAuthority = {SECURITY_NT_AUTHORITY};
@@ -72,8 +63,6 @@ BOOL PerfDataInitialize(void)
 
 void PerfDataUninitialize(void)
 {
-    PLIST_ENTRY pCur;
-    PSIDTOUSERNAME pEntry;
 
     if (pPerfData != NULL)
         HeapFree(GetProcessHeap(), 0, pPerfData);
@@ -85,15 +74,6 @@ void PerfDataUninitialize(void)
         FreeSid(SystemUserSid);
         SystemUserSid = NULL;
     }
-
-    /* Free user names cache list */
-    pCur = SidToUserNameHead.Flink;
-    while (pCur != &SidToUserNameHead)
-    {
-        pEntry = CONTAINING_RECORD(pCur, SIDTOUSERNAME, List);
-        pCur = pCur->Flink;
-        HeapFree(GetProcessHeap(), 0, pEntry);
-    }
 }
 
 static void SidToUserName(PSID Sid, LPWSTR szBuffer, DWORD BufferSize)
@@ -106,56 +86,6 @@ static void SidToUserName(PSID Sid, LPWSTR szBuffer, DWORD BufferSize)
         LookupAccountSidW(NULL, Sid, szBuffer, &BufferSize, szDomainNameUnused, &DomainNameLen, &Use);
 }
 
-VOID
-WINAPI
-CachedGetUserFromSid(
-    PSID pSid,
-    LPWSTR pUserName,
-    PULONG pcwcUserName)
-{
-    PLIST_ENTRY pCur;
-    PSIDTOUSERNAME pEntry;
-    ULONG cbSid, cwcUserName;
-
-    cwcUserName = *pcwcUserName;
-
-    /* Walk through the list */
-    for(pCur = SidToUserNameHead.Flink;
-        pCur != &SidToUserNameHead;
-        pCur = pCur->Flink)
-    {
-        pEntry = CONTAINING_RECORD(pCur, SIDTOUSERNAME, List);
-        if (EqualSid((PSID)&pEntry->Data, pSid))
-        {
-            wcsncpy(pUserName, pEntry->pszName, cwcUserName);
-            *pcwcUserName = cwcUserName;
-            return;
-        }
-    }
-
-    /* We didn't find the SID in the list, get the name conventional */
-    SidToUserName(pSid, pUserName, cwcUserName);
-
-    /* Allocate a new entry */
-    *pcwcUserName = wcslen(pUserName);
-    cwcUserName = *pcwcUserName + 1;
-    cbSid = GetLengthSid(pSid);
-    pEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(SIDTOUSERNAME) + cbSid + cwcUserName * sizeof(WCHAR));
-
-    /* Copy the Sid and name to our entry */
-    CopySid(cbSid, (PSID)&pEntry->Data, pSid);
-    pEntry->pszName = (LPWSTR)(pEntry->Data + cbSid);
-    wcsncpy(pEntry->pszName, pUserName, cwcUserName);
-
-    /* Insert the new entry */
-    pEntry->List.Flink = &SidToUserNameHead;
-    pEntry->List.Blink = SidToUserNameHead.Blink;
-    SidToUserNameHead.Blink->Flink = &pEntry->List;
-    SidToUserNameHead.Blink = &pEntry->List;
-
-    return;
-}
-
 void PerfDataRefresh(void)
 {
     ULONG                                      ulSize;
@@ -176,7 +106,6 @@ void PerfDataRefresh(void)
     PSECURITY_DESCRIPTOR                       ProcessSD;
     PSID                                       ProcessUser;
     ULONG                                      Buffer[64]; /* must be 4 bytes aligned! */
-    ULONG                                      cwcUserName;
 
     /* Get new system time */
     status = NtQuerySystemInformation(SystemTimeOfDayInformation, &SysTimeInfo, sizeof(SysTimeInfo), 0);
@@ -412,8 +341,7 @@ ClearInfo:
             ZeroMemory(&pPerfData[Idx].IOCounters, sizeof(IO_COUNTERS));
         }
 
-        cwcUserName = sizeof(pPerfData[0].UserName) / sizeof(pPerfData[0].UserName[0]);
-        CachedGetUserFromSid(ProcessUser, pPerfData[Idx].UserName, &cwcUserName);
+        SidToUserName(ProcessUser, pPerfData[Idx].UserName, sizeof(pPerfData[0].UserName) / sizeof(pPerfData[0].UserName[0]));
 
         if (ProcessSD != NULL)
         {
@@ -428,29 +356,6 @@ ClearInfo:
     LeaveCriticalSection(&PerfDataCriticalSection);
 }
 
-ULONG PerfDataGetProcessIndex(ULONG pid)
-{
-    ULONG idx;
-
-    EnterCriticalSection(&PerfDataCriticalSection);
-
-    for (idx = 0; idx < ProcessCount; idx++)
-    {
-        if (PtrToUlong(pPerfData[idx].ProcessId) == pid)
-        {
-            break;
-        }
-    }
-
-    LeaveCriticalSection(&PerfDataCriticalSection);
-
-    if (idx == ProcessCount)
-    {
-        return -1;
-    }
-    return idx;
-}
-
 ULONG PerfDataGetProcessCount(void)
 {
     return ProcessCount;
@@ -482,6 +387,27 @@ BOOL PerfDataGetImageName(ULONG Index, LPWSTR lpImageName, int nMaxCount)
     return bSuccessful;
 }
 
+int PerfGetIndexByProcessId(DWORD dwProcessId)
+{
+    int FoundIndex = -1;
+    ULONG Index;
+
+    EnterCriticalSection(&PerfDataCriticalSection);
+
+    for (Index = 0; Index < ProcessCount; Index++)
+    {
+        if (PtrToUlong(pPerfData[Index].ProcessId) == dwProcessId)
+        {
+            FoundIndex = Index;
+            break;
+        }
+    }
+
+    LeaveCriticalSection(&PerfDataCriticalSection);
+
+    return FoundIndex;
+}
+
 ULONG PerfDataGetProcessId(ULONG Index)
 {
     ULONG  ProcessId;
index 6bb7005..00c2d6d 100644 (file)
@@ -60,7 +60,6 @@ void  PerfDataUninitialize(void);
 void   PerfDataRefresh(void);
 
 BOOL    PerfDataGet(ULONG Index, PPERFDATA *lppData);
-ULONG   PerfDataGetProcessIndex(ULONG pid);
 ULONG  PerfDataGetProcessCount(void);
 ULONG  PerfDataGetProcessorUsage(void);
 ULONG  PerfDataGetProcessorSystemUsage(void);
index 42bf594..4c3b636 100644 (file)
@@ -28,6 +28,7 @@
 
 typedef struct
 {
+    ULONG Index;
     ULONG ProcessId;
 } PROCESS_PAGE_LIST_ITEM, *LPPROCESS_PAGE_LIST_ITEM;
 
@@ -53,27 +54,6 @@ BOOL PerfDataGetText(ULONG Index, ULONG ColumnIndex, LPTSTR lpText, int nMaxCoun
 DWORD WINAPI ProcessPageRefreshThread(void *lpParameter);
 int ProcessRunning(ULONG ProcessId);
 
-int ProcGetIndexByProcessId(DWORD dwProcessId)
-{
-    int     i;
-    LVITEM  item;
-    LPPROCESS_PAGE_LIST_ITEM pData;
-
-    for (i=0; i<ListView_GetItemCount(hProcessPageListCtrl); i++)
-    {
-        memset(&item, 0, sizeof(LV_ITEM));
-        item.mask = LVIF_PARAM;
-        item.iItem = i;
-        (void)ListView_GetItem(hProcessPageListCtrl, &item);
-        pData = (LPPROCESS_PAGE_LIST_ITEM)item.lParam;
-        if (pData->ProcessId == dwProcessId)
-        {
-            return i;
-        }
-    }
-    return 0;
-}
-
 DWORD GetSelectedProcessId(void)
 {
     int     Index;
@@ -91,7 +71,7 @@ DWORD GetSelectedProcessId(void)
         (void)ListView_GetItem(hProcessPageListCtrl, &lvitem);
 
         if (lvitem.lParam)
-            return ((LPPROCESS_PAGE_LIST_ITEM)lvitem.lParam)->ProcessId;
+            return PerfDataGetProcessId(((LPPROCESS_PAGE_LIST_ITEM)lvitem.lParam)->Index);
     }
 
     return 0;
@@ -239,7 +219,7 @@ void ProcessPageOnNotify(WPARAM wParam, LPARAM lParam)
                 break;
 
             pData = (LPPROCESS_PAGE_LIST_ITEM)pnmdi->item.lParam;
-            Index = PerfDataGetProcessIndex(pData->ProcessId);
+            Index = pData->Index;
             ColumnIndex = pnmdi->item.iSubItem;
 
             PerfDataGetText(Index, ColumnIndex, pnmdi->item.pszText, pnmdi->item.cchTextMax);
@@ -434,7 +414,7 @@ void UpdateProcesses()
 {
     int i;
     ULONG l;
-    LV_ITEM item;
+    LV_ITEM    item;
     LPPROCESS_PAGE_LIST_ITEM pData;
 
     /* Remove old processes */
@@ -451,17 +431,10 @@ void UpdateProcesses()
             HeapFree(GetProcessHeap(), 0, pData);
         }
     }
-
-    /* Check for difference in listview process and performance process counts */
-    if (ListView_GetItemCount(hProcessPageListCtrl) != PerfDataGetProcessCount())
+    for (l = 0; l < PerfDataGetProcessCount(); l++)
     {
-        /* Add new processes by checking against the current items */
-        for (l = 0; l < PerfDataGetProcessCount(); l++)
-        {
-            AddProcess(l);
-        }
+        AddProcess(l);
     }
-
     if (TaskManagerSettings.SortColumn != -1)
     {
         (void)ListView_SortItems(hProcessPageListCtrl, ProcessPageCompareFunc, NULL);
@@ -509,7 +482,7 @@ void AddProcess(ULONG Index)
         item.iItem = i;
         (void)ListView_GetItem(hProcessPageListCtrl, &item);
         pData = (LPPROCESS_PAGE_LIST_ITEM)item.lParam;
-        if (pData->ProcessId == pid)
+        if (PerfDataGetProcessId(pData->Index) == pid)
         {
             bAlreadyInList = TRUE;
             break;
@@ -518,6 +491,7 @@ void AddProcess(ULONG Index)
     if (!bAlreadyInList)  /* Add */
     {
         pData = (LPPROCESS_PAGE_LIST_ITEM)HeapAlloc(GetProcessHeap(), 0, sizeof(PROCESS_PAGE_LIST_ITEM));
+        pData->Index = Index;
         pData->ProcessId = pid;
 
         /* Add the item to the list */
@@ -712,8 +686,6 @@ int CALLBACK ProcessPageCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lPara
     int ret = 0;
     LPPROCESS_PAGE_LIST_ITEM Param1;
     LPPROCESS_PAGE_LIST_ITEM Param2;
-    ULONG IndexParam1;
-    ULONG IndexParam2;
     WCHAR text1[260];
     WCHAR text2[260];
     ULONG l1;
@@ -732,167 +704,165 @@ int CALLBACK ProcessPageCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lPara
         Param1 = (LPPROCESS_PAGE_LIST_ITEM)lParam2;
         Param2 = (LPPROCESS_PAGE_LIST_ITEM)lParam1;
     }
-    IndexParam1 = PerfDataGetProcessIndex(Param1->ProcessId);
-    IndexParam2 = PerfDataGetProcessIndex(Param2->ProcessId);
 
     if (TaskManagerSettings.SortColumn == COLUMN_IMAGENAME)
     {
-        PerfDataGetImageName(IndexParam1, text1, sizeof (text1) / sizeof (*text1));
-        PerfDataGetImageName(IndexParam2, text2, sizeof (text2) / sizeof (*text2));
+        PerfDataGetImageName(Param1->Index, text1, sizeof (text1) / sizeof (*text1));
+        PerfDataGetImageName(Param2->Index, text2, sizeof (text2) / sizeof (*text2));
         ret = _wcsicmp(text1, text2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_PID)
     {
-        l1 = Param1->ProcessId;
-        l2 = Param2->ProcessId;
+        l1 = PerfDataGetProcessId(Param1->Index);
+        l2 = PerfDataGetProcessId(Param2->Index);
         ret = CMP(l1, l2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_USERNAME)
     {
-        PerfDataGetUserName(IndexParam1, text1, sizeof (text1) / sizeof (*text1));
-        PerfDataGetUserName(IndexParam2, text2, sizeof (text2) / sizeof (*text2));
+        PerfDataGetUserName(Param1->Index, text1, sizeof (text1) / sizeof (*text1));
+        PerfDataGetUserName(Param2->Index, text2, sizeof (text2) / sizeof (*text2));
         ret = _wcsicmp(text1, text2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_SESSIONID)
     {
-        l1 = PerfDataGetSessionId(IndexParam1);
-        l2 = PerfDataGetSessionId(IndexParam2);
+        l1 = PerfDataGetSessionId(Param1->Index);
+        l2 = PerfDataGetSessionId(Param2->Index);
         ret = CMP(l1, l2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_CPUUSAGE)
     {
-        l1 = PerfDataGetCPUUsage(IndexParam1);
-        l2 = PerfDataGetCPUUsage(IndexParam2);
+        l1 = PerfDataGetCPUUsage(Param1->Index);
+        l2 = PerfDataGetCPUUsage(Param2->Index);
         ret = CMP(l1, l2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_CPUTIME)
     {
-        time1 = PerfDataGetCPUTime(IndexParam1);
-        time2 = PerfDataGetCPUTime(IndexParam2);
+        time1 = PerfDataGetCPUTime(Param1->Index);
+        time2 = PerfDataGetCPUTime(Param2->Index);
         ret = largeintcmp(time1, time2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_MEMORYUSAGE)
     {
-        l1 = PerfDataGetWorkingSetSizeBytes(IndexParam1);
-        l2 = PerfDataGetWorkingSetSizeBytes(IndexParam2);
+        l1 = PerfDataGetWorkingSetSizeBytes(Param1->Index);
+        l2 = PerfDataGetWorkingSetSizeBytes(Param2->Index);
         ret = CMP(l1, l2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_PEAKMEMORYUSAGE)
     {
-        l1 = PerfDataGetPeakWorkingSetSizeBytes(IndexParam1);
-        l2 = PerfDataGetPeakWorkingSetSizeBytes(IndexParam2);
+        l1 = PerfDataGetPeakWorkingSetSizeBytes(Param1->Index);
+        l2 = PerfDataGetPeakWorkingSetSizeBytes(Param2->Index);
         ret = CMP(l1, l2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_MEMORYUSAGEDELTA)
     {
-        l1 = PerfDataGetWorkingSetSizeDelta(IndexParam1);
-        l2 = PerfDataGetWorkingSetSizeDelta(IndexParam2);
+        l1 = PerfDataGetWorkingSetSizeDelta(Param1->Index);
+        l2 = PerfDataGetWorkingSetSizeDelta(Param2->Index);
         ret = CMP(l1, l2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_PAGEFAULTS)
     {
-        l1 = PerfDataGetPageFaultCount(IndexParam1);
-        l2 = PerfDataGetPageFaultCount(IndexParam2);
+        l1 = PerfDataGetPageFaultCount(Param1->Index);
+        l2 = PerfDataGetPageFaultCount(Param2->Index);
         ret = CMP(l1, l2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_PAGEFAULTSDELTA)
     {
-        l1 = PerfDataGetPageFaultCountDelta(IndexParam1);
-        l2 = PerfDataGetPageFaultCountDelta(IndexParam2);
+        l1 = PerfDataGetPageFaultCountDelta(Param1->Index);
+        l2 = PerfDataGetPageFaultCountDelta(Param2->Index);
         ret = CMP(l1, l2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_VIRTUALMEMORYSIZE)
     {
-        l1 = PerfDataGetVirtualMemorySizeBytes(IndexParam1);
-        l2 = PerfDataGetVirtualMemorySizeBytes(IndexParam2);
+        l1 = PerfDataGetVirtualMemorySizeBytes(Param1->Index);
+        l2 = PerfDataGetVirtualMemorySizeBytes(Param2->Index);
         ret = CMP(l1, l2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_PAGEDPOOL)
     {
-        l1 = PerfDataGetPagedPoolUsagePages(IndexParam1);
-        l2 = PerfDataGetPagedPoolUsagePages(IndexParam2);
+        l1 = PerfDataGetPagedPoolUsagePages(Param1->Index);
+        l2 = PerfDataGetPagedPoolUsagePages(Param2->Index);
         ret = CMP(l1, l2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_NONPAGEDPOOL)
     {
-        l1 = PerfDataGetNonPagedPoolUsagePages(IndexParam1);
-        l2 = PerfDataGetNonPagedPoolUsagePages(IndexParam2);
+        l1 = PerfDataGetNonPagedPoolUsagePages(Param1->Index);
+        l2 = PerfDataGetNonPagedPoolUsagePages(Param2->Index);
         ret = CMP(l1, l2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_BASEPRIORITY)
     {
-        l1 = PerfDataGetBasePriority(IndexParam1);
-        l2 = PerfDataGetBasePriority(IndexParam2);
+        l1 = PerfDataGetBasePriority(Param1->Index);
+        l2 = PerfDataGetBasePriority(Param2->Index);
         ret = CMP(l1, l2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_HANDLECOUNT)
     {
-        l1 = PerfDataGetHandleCount(IndexParam1);
-        l2 = PerfDataGetHandleCount(IndexParam2);
+        l1 = PerfDataGetHandleCount(Param1->Index);
+        l2 = PerfDataGetHandleCount(Param2->Index);
         ret = CMP(l1, l2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_THREADCOUNT)
     {
-        l1 = PerfDataGetThreadCount(IndexParam1);
-        l2 = PerfDataGetThreadCount(IndexParam2);
+        l1 = PerfDataGetThreadCount(Param1->Index);
+        l2 = PerfDataGetThreadCount(Param2->Index);
         ret = CMP(l1, l2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_USEROBJECTS)
     {
-        l1 = PerfDataGetUSERObjectCount(IndexParam1);
-        l2 = PerfDataGetUSERObjectCount(IndexParam2);
+        l1 = PerfDataGetUSERObjectCount(Param1->Index);
+        l2 = PerfDataGetUSERObjectCount(Param2->Index);
         ret = CMP(l1, l2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_GDIOBJECTS)
     {
-        l1 = PerfDataGetGDIObjectCount(IndexParam1);
-        l2 = PerfDataGetGDIObjectCount(IndexParam2);
+        l1 = PerfDataGetGDIObjectCount(Param1->Index);
+        l2 = PerfDataGetGDIObjectCount(Param2->Index);
         ret = CMP(l1, l2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_IOREADS)
     {
-        PerfDataGetIOCounters(IndexParam1, &iocounters1);
-        PerfDataGetIOCounters(IndexParam2, &iocounters2);
+        PerfDataGetIOCounters(Param1->Index, &iocounters1);
+        PerfDataGetIOCounters(Param2->Index, &iocounters2);
         ull1 = iocounters1.ReadOperationCount;
         ull2 = iocounters2.ReadOperationCount;
         ret = CMP(ull1, ull2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_IOWRITES)
     {
-        PerfDataGetIOCounters(IndexParam1, &iocounters1);
-        PerfDataGetIOCounters(IndexParam2, &iocounters2);
+        PerfDataGetIOCounters(Param1->Index, &iocounters1);
+        PerfDataGetIOCounters(Param2->Index, &iocounters2);
         ull1 = iocounters1.WriteOperationCount;
         ull2 = iocounters2.WriteOperationCount;
         ret = CMP(ull1, ull2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_IOOTHER)
     {
-        PerfDataGetIOCounters(IndexParam1, &iocounters1);
-        PerfDataGetIOCounters(IndexParam2, &iocounters2);
+        PerfDataGetIOCounters(Param1->Index, &iocounters1);
+        PerfDataGetIOCounters(Param2->Index, &iocounters2);
         ull1 = iocounters1.OtherOperationCount;
         ull2 = iocounters2.OtherOperationCount;
         ret = CMP(ull1, ull2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_IOREADBYTES)
     {
-        PerfDataGetIOCounters(IndexParam1, &iocounters1);
-        PerfDataGetIOCounters(IndexParam2, &iocounters2);
+        PerfDataGetIOCounters(Param1->Index, &iocounters1);
+        PerfDataGetIOCounters(Param2->Index, &iocounters2);
         ull1 = iocounters1.ReadTransferCount;
         ull2 = iocounters2.ReadTransferCount;
         ret = CMP(ull1, ull2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_IOWRITEBYTES)
     {
-        PerfDataGetIOCounters(IndexParam1, &iocounters1);
-        PerfDataGetIOCounters(IndexParam2, &iocounters2);
+        PerfDataGetIOCounters(Param1->Index, &iocounters1);
+        PerfDataGetIOCounters(Param2->Index, &iocounters2);
         ull1 = iocounters1.WriteTransferCount;
         ull2 = iocounters2.WriteTransferCount;
         ret = CMP(ull1, ull2);
     }
     else if (TaskManagerSettings.SortColumn == COLUMN_IOOTHERBYTES)
     {
-        PerfDataGetIOCounters(IndexParam1, &iocounters1);
-        PerfDataGetIOCounters(IndexParam2, &iocounters2);
+        PerfDataGetIOCounters(Param1->Index, &iocounters1);
+        PerfDataGetIOCounters(Param2->Index, &iocounters2);
         ull1 = iocounters1.OtherTransferCount;
         ull2 = iocounters2.OtherTransferCount;
         ret = CMP(ull1, ull2);
index c409f80..3f8bcbd 100644 (file)
@@ -869,7 +869,6 @@ void TaskManager_OnTabWndSelChange(void)
     HMENU  hViewMenu;
     HMENU  hSubMenu;
     WCHAR  szTemp[256];
-    SYSTEM_INFO sysInfo;
 
     hMenu = GetMenu(hMainWnd);
     hViewMenu = GetSubMenu(hMenu, 2);
@@ -948,28 +947,16 @@ void TaskManager_OnTabWndSelChange(void)
             DeleteMenu(hMenu, 3, MF_BYPOSITION);
             DrawMenuBar(hMainWnd);
         }
+        hSubMenu = CreatePopupMenu();
 
-        GetSystemInfo(&sysInfo);
+        LoadStringW(hInst, IDS_MENU_ONEGRAPHALLCPUS, szTemp, 256);
+        AppendMenuW(hSubMenu, MF_STRING, ID_VIEW_CPUHISTORY_ONEGRAPHALL, szTemp);
 
-        /* Hide CPU graph options on single CPU systems */
-        if (sysInfo.dwNumberOfProcessors > 1)
-        {
-            hSubMenu = CreatePopupMenu();
-
-            LoadStringW(hInst, IDS_MENU_ONEGRAPHALLCPUS, szTemp, 256);
-            AppendMenuW(hSubMenu, MF_STRING, ID_VIEW_CPUHISTORY_ONEGRAPHALL, szTemp);
-
-            LoadStringW(hInst, IDS_MENU_ONEGRAPHPERCPU, szTemp, 256);
-            AppendMenuW(hSubMenu, MF_STRING, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, szTemp);
-
-            LoadStringW(hInst, IDS_MENU_CPUHISTORY, szTemp, 256);
-            AppendMenuW(hViewMenu, MF_STRING|MF_POPUP, (UINT_PTR) hSubMenu, szTemp);
+        LoadStringW(hInst, IDS_MENU_ONEGRAPHPERCPU, szTemp, 256);
+        AppendMenuW(hSubMenu, MF_STRING, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, szTemp);
 
-            if (TaskManagerSettings.CPUHistory_OneGraphPerCPU)
-                CheckMenuRadioItem(hSubMenu, ID_VIEW_CPUHISTORY_ONEGRAPHALL, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, MF_BYCOMMAND);
-            else
-                CheckMenuRadioItem(hSubMenu, ID_VIEW_CPUHISTORY_ONEGRAPHALL, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, ID_VIEW_CPUHISTORY_ONEGRAPHALL, MF_BYCOMMAND);
-        }
+        LoadStringW(hInst, IDS_MENU_CPUHISTORY, szTemp, 256);
+        AppendMenuW(hViewMenu, MF_STRING|MF_POPUP, (UINT_PTR) hSubMenu, szTemp);
 
         LoadStringW(hInst, IDS_MENU_SHOWKERNELTIMES, szTemp, 256);
         AppendMenuW(hViewMenu, MF_STRING, ID_VIEW_SHOWKERNELTIMES, szTemp);
@@ -978,7 +965,10 @@ void TaskManager_OnTabWndSelChange(void)
             CheckMenuItem(hViewMenu, ID_VIEW_SHOWKERNELTIMES, MF_BYCOMMAND|MF_CHECKED);
         else
             CheckMenuItem(hViewMenu, ID_VIEW_SHOWKERNELTIMES, MF_BYCOMMAND|MF_UNCHECKED);
-
+        if (TaskManagerSettings.CPUHistory_OneGraphPerCPU)
+            CheckMenuRadioItem(hSubMenu, ID_VIEW_CPUHISTORY_ONEGRAPHALL, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, MF_BYCOMMAND);
+        else
+            CheckMenuRadioItem(hSubMenu, ID_VIEW_CPUHISTORY_ONEGRAPHALL, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, ID_VIEW_CPUHISTORY_ONEGRAPHALL, MF_BYCOMMAND);
         /*
          * Give the tab control focus
          */
index 7031c76..2d685ae 100644 (file)
@@ -492,7 +492,7 @@ static int comp_FindSubFile(void *p, const void *key,
                             int leaf, void** next)
 {
     *next = (char *)p+strlen(p)+(leaf?5:3);
-    WINE_TRACE("Comparing '%s' with '%s'\n", (char *)p, (const char *)key);
+    WINE_TRACE("Comparing '%s' with '%s'\n", (char *)p, (char *)key);
     return strcmp(p, key);
 }
 
@@ -1601,7 +1601,7 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd,
             case 0xEE:
             case 0xEF:
                 {
-                    const char*       ptr = (const char*) format + 8;
+                    char*       ptr = (char*) format + 8;
                     BYTE        type = format[3];
                     int         wnd = -1;
 
index 4f24a71..89ff51c 100644 (file)
@@ -1,5 +1,3 @@
-<?xml version="1.0"?>
-<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
 <module name="winver" type="win32gui" installbase="system32" installname="winver.exe" unicode="yes">
        <include base="winver">.</include>
        <library>shell32</library>
index 95b29e8..04e42f8 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
+<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
 <group>
 <module name="rpcss" type="win32cui" installbase="system32" installname="rpcss.exe" unicode="yes">
        <include base="rpcss">.</include>
index 1b17bfc..8ccb81d 100644 (file)
@@ -1,5 +1,3 @@
-<?xml version="1.0"?>
-<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
 <module name="telnetd" type="win32cui" installbase="system32" installname="telnetd.exe" unicode="no">
        <include base="reactos"></include>
        <include base="telnetd">..</include>
index 0008cfb..be34bb7 100644 (file)
@@ -1,11 +1,11 @@
-<?xml version="1.0"?>
-<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
 <module name="tftpd" type="win32cui" installbase="system32" installname="tftpd.exe" allowwarnings="true" unicode="no">
        <include base="reactos"></include>
        <include base="telnetd">..</include>
+
        <library>ntdll</library>
        <library>advapi32</library>
        <library>ws2_32</library>
        <library>wine</library>
+
        <file>tftpd.cpp</file>
 </module>
index 7abbcb1..fe835ff 100644 (file)
@@ -428,7 +428,7 @@ CreateFreeLoaderIniForReactos(PWCHAR IniPath,
     /* ReactOS_KdSerial */
     CreateFreeLoaderEntry(IniCache, IniSection,
         L"ReactOS_KdSerial", L"\"ReactOS (RosDbg)\"",
-        L"Windows2003", ArcPath,
+        L"ReactOS", ArcPath,
         L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /KDSERIAL");
 
     /* ReactOS_LogFile */
index 0bbde01..51fe2e7 100644 (file)
@@ -132,7 +132,6 @@ InfpOpenInfFileW(
        IN PCWSTR FileName,
        IN PCWSTR InfClass,
        IN DWORD InfStyle,
-       IN LCID LocaleId,
        OUT PUINT ErrorLine)
 {
        HINF hInf = NULL;
@@ -144,7 +143,6 @@ InfpOpenInfFileW(
        Status = InfOpenFile(
                &hInf,
                &FileNameU,
-               LocaleId,
                &ErrorLineUL);
        *ErrorLine = (UINT)ErrorLineUL;
        if (!NT_SUCCESS(Status))
@@ -254,7 +252,6 @@ INF_OpenBufferedFileA(
        IN ULONG FileSize,
        IN PCSTR InfClass,
        IN DWORD InfStyle,
-       IN LCID LocaleId,
        OUT PUINT ErrorLine)
 {
 #ifdef __REACTOS__
@@ -266,7 +263,6 @@ INF_OpenBufferedFileA(
                &hInf,
                FileBuffer,
                FileSize,
-               LocaleId,
                &ErrorLineUL);
        *ErrorLine = (UINT)ErrorLineUL;
        if (!NT_SUCCESS(Status))
index 864d201..52b002d 100644 (file)
@@ -110,7 +110,6 @@ InfpOpenInfFileW(
        IN PCWSTR FileName,
        IN PCWSTR InfClass,
        IN DWORD InfStyle,
-       IN LCID LocaleId,
        OUT PUINT ErrorLine);
 
 #endif /* __REACTOS__ */
@@ -133,7 +132,6 @@ INF_OpenBufferedFileA(
        IN ULONG FileSize,
        IN PCSTR InfClass,
        IN DWORD InfStyle,
-       IN LCID LocaleId,
        OUT PUINT ErrorLine);
 
 VOID INF_SetHeap(
index 7a97b49..87df416 100644 (file)
@@ -79,8 +79,6 @@ static PGENERIC_LIST KeyboardList = NULL;
 static PGENERIC_LIST LayoutList = NULL;
 static PGENERIC_LIST LanguageList = NULL;
 
-static LANGID LanguageId = 0;
-
 /* FUNCTIONS ****************************************************************/
 
 static VOID
@@ -424,7 +422,6 @@ CheckUnattendedSetup(VOID)
     UnattendInf = SetupOpenInfFileW(UnattendInfPath,
                                     NULL,
                                     INF_STYLE_WIN4,
-                                    LanguageId,
                                     &ErrorLine);
 
     if (UnattendInf == INVALID_HANDLE_VALUE)
@@ -681,8 +678,6 @@ LanguagePage(PINPUT_RECORD Ir)
         {
             SelectedLanguageId = (PWCHAR)GetListEntryUserData(GetCurrentListEntry(LanguageList));
 
-            LanguageId = (LANGID)(wcstol(SelectedLanguageId, NULL, 16) & 0xFFFF);
-
             if (wcscmp(SelectedLanguageId, DefaultLanguage))
             {
                 UpdateKBLayout();
@@ -770,7 +765,6 @@ SetupStartPage(PINPUT_RECORD Ir)
     SetupInf = SetupOpenInfFileW(FileNameBuffer,
                                  NULL,
                                  INF_STYLE_WIN4,
-                                 LanguageId,
                                  &ErrorLine);
 
     if (SetupInf == INVALID_HANDLE_VALUE)
@@ -3051,7 +3045,6 @@ PrepareCopyPage(PINPUT_RECORD Ir)
                                           InfFileSize,
                                           (const CHAR*) NULL,
                                           INF_STYLE_WIN4,
-                                          LanguageId,
                                           &ErrorLine);
 
         if (InfHandle == INVALID_HANDLE_VALUE)
@@ -3266,8 +3259,6 @@ RegistryPage(PINPUT_RECORD Ir)
 
         DPRINT("Action: %S  File: %S  Section %S\n", Action, File, Section);
 
-        if (Action == NULL) break; // Hackfix
-
         if (!_wcsicmp (Action, L"AddReg"))
         {
             Delete = FALSE;
@@ -3283,7 +3274,7 @@ RegistryPage(PINPUT_RECORD Ir)
 
         CONSOLE_SetStatusText(MUIGetString(STRING_IMPORTFILE), File);
 
-        if (!ImportRegistryFile(File, Section, LanguageId, Delete))
+        if (!ImportRegistryFile(File, Section, Delete))
         {
             DPRINT("Importing %S failed\n", File);
 
index a808129..d313b4d 100644 (file)
@@ -617,7 +617,6 @@ registry_callback (HINF hInf, PCWSTR Section, BOOLEAN Delete)
 BOOLEAN
 ImportRegistryFile(PWSTR Filename,
                    PWSTR Section,
-                   LCID LocaleId,
                    BOOLEAN Delete)
 {
   WCHAR FileNameBuffer[MAX_PATH];
@@ -633,7 +632,6 @@ ImportRegistryFile(PWSTR Filename,
                        FileNameBuffer,
                        NULL,
                        INF_STYLE_WIN4,
-                       LocaleId,
                        &ErrorLine);
   if (hInf == INVALID_HANDLE_VALUE)
     {
index 63d2b67..d764704 100644 (file)
@@ -29,7 +29,6 @@
 BOOLEAN
 ImportRegistryFile(PWSTR Filename,
                   PWSTR Section,
-                  LCID LocaleId,
                   BOOLEAN Delete);
 
 BOOLEAN
index 51f3c03..fa96c8c 100644 (file)
@@ -4,10 +4,10 @@
        <bootstrap installbase="$(CDOUTPUT)/system32" nameoncd="smss.exe" />
        <include base="usetup">.</include>
        <include base="zlib">.</include>
-       <include base="newinflib">.</include>
+       <include base="inflib">.</include>
        <include base="ReactOS">include/reactos/drivers</include>
        <library>zlib</library>
-       <library>newinflib</library>
+       <library>inflib</library>
        <library>ext2lib</library>
        <library>vfatlib</library>
        <library>ntdll</library>
index 8184af7..18541bf 100644 (file)
@@ -166,7 +166,7 @@ VOID ConOutChar (TCHAR c)
 VOID ConPuts(LPTSTR szText, DWORD nStdHandle)
 {
        ConWrite(szText, _tcslen(szText), nStdHandle);
-       ConWrite(_T("\r\n"), 2, nStdHandle);
+       ConWrite(_T("\n"), 1, nStdHandle);
 }
 
 VOID ConOutResPaging(BOOL NewPage, UINT resID)
index 7cb99a7..4ca8b83 100644 (file)
@@ -703,7 +703,7 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
                                LastSpace = i;
 
                }
-               /* insert the quotation and move things around */
+               /* insert the quoation and move things around */
                if(szPrefix[LastSpace + 1] != _T('\"') && LastSpace != -1)
                {
                        memmove ( &szPrefix[LastSpace+1], &szPrefix[LastSpace], (_tcslen(szPrefix)-LastSpace+1) * sizeof(TCHAR) );
@@ -712,17 +712,14 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
                        {
                                _tcscat(szPrefix,_T("\""));
                        }
-                       szPrefix[LastSpace + 1] = _T('\"');
+                               szPrefix[LastSpace + 1] = _T('\"');
                }
                else if(LastSpace == -1)
                {
-                       /* Add quotation only if none exists already */
-                       if (szPrefix[0] != _T('\"'))
-                       {
-                               _tcscpy(szBaseWord,_T("\""));
-                               _tcscat(szBaseWord,szPrefix);
-                               _tcscpy(szPrefix,szBaseWord);
-                       }
+                       _tcscpy(szBaseWord,_T("\""));
+                       _tcscat(szBaseWord,szPrefix);
+                       _tcscpy(szPrefix,szBaseWord);
+
                }
        }
 
index b0c5059..492e388 100644 (file)
Binary files a/base/shell/explorer/res/startmenu.ico and b/base/shell/explorer/res/startmenu.ico differ
index ba9f42b..59f9f30 100755 (executable)
@@ -363,12 +363,6 @@ _tmain(int argc, TCHAR *argv[])
                PrintWin32Error( szMsg, GetLastError());
                return -1;
        }
-       else if ( driveType == 1 )
-       {
-               LoadString( GetModuleHandle(NULL), STRING_NO_VOLUME, (LPTSTR) szMsg,RC_STRING_MAX_SIZE);
-               PrintWin32Error( szMsg, GetLastError());
-               return -1;
-       }
 
        if( driveType != DRIVE_FIXED ) {
                LoadString( GetModuleHandle(NULL), STRING_INSERT_DISK, (LPTSTR) szMsg,RC_STRING_MAX_SIZE);
index 9dba766..950580d 100644 (file)
@@ -1,5 +1,3 @@
-<?xml version="1.0"?>
-<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
 <module name="runonce" type="win32gui" installbase="system32" installname="runonce.exe" unicode="yes">
        <include base="runonce">.</include>
        <library>advapi32</library>
index 81027d4..9eb9602 100644 (file)
@@ -212,6 +212,7 @@ StartAutoApplications(
         WARN("FindFirstFile(%s) failed with error %lu\n", debugstr_w(szPath), GetLastError());
         return;
     }
+    szPath[len] = L'\0';
 
     do
     {
@@ -219,10 +220,9 @@ StartAutoApplications(
         {
             memset(&ExecInfo, 0x0, sizeof(SHELLEXECUTEINFOW));
             ExecInfo.cbSize = sizeof(ExecInfo);
-            wcscpy(&szPath[len+1], findData.cFileName);
             ExecInfo.lpVerb = L"open";
-            ExecInfo.lpFile = szPath;
-            ExecInfo.lpDirectory = NULL;
+            ExecInfo.lpFile = findData.cFileName;
+            ExecInfo.lpDirectory = szPath;
             TRACE("Executing %s in directory %s\n",
                 debugstr_w(findData.cFileName), debugstr_w(szPath));
             ShellExecuteExW(&ExecInfo);
index f84fa71..471a7f4 100644 (file)
@@ -1,14 +1,12 @@
 <?xml version="1.0"?>
 <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
-<group xmlns:xi="http://www.w3.org/2001/XInclude">
-<if property="ARCH" value="i386">
+<if property="ARCH" value="i386>
        <module name="bootcd" type="iso" output="ReactOS.iso">
                <bootsector>isoboot</bootsector>
        </module>
 </if>
-<ifnot property="ARCH" value="i386">
+<ifnot property="ARCH" value="i386>
        <module name="bootcd" type="iso" output="ReactOS-$(ARCH).iso">
                <bootsector>isoboot</bootsector>
        </module>
 </ifnot>
-</group>
index 4651412..a39f33f 100644 (file)
@@ -41,7 +41,7 @@ HKCR,"rtffile\shell\open\command","",0x00020000,"%SystemRoot%\system32\wordpad.e
 HKCR,".386","",0x00000000,"vxdfile"
 HKCR,".vxd","",0x00000000,"vxdfile"
 HKCR,"vxdfile","",0x00000000,"Virtual Device Driver"
-HKCR,"vxdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-157"
+HKCR,"vxdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-156"
 
 ; Animated Cursors
 HKCR,".ani","",0x00000000,"anifile"
index 147f80d..350fe18 100644 (file)
@@ -41,7 +41,7 @@ HKCR,"rtffile\shell\open\command","",0x00020000,"%SystemRoot%\system32\wordpad.e
 HKCR,".386","",0x00000000,"vxdfile"
 HKCR,".vxd","",0x00000000,"vxdfile"
 HKCR,"vxdfile","",0x00000000,"Virtual Device Driver"
-HKCR,"vxdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-157"
+HKCR,"vxdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-156"
 
 ; Animated Cursors
 HKCR,".ani","",0x00000000,"anifile"
index 086ee67..8d8c489 100644 (file)
@@ -1530,8 +1530,7 @@ HKCU,"Control Panel\Accessibility\Keyboard Preference","On",2,"0"
 ; Internet Explorer
 
 HKCU,Software\Wine\MSHTML,"GeckoUrl",,"http://source.winehq.org/winegecko.php"
-;HKCU,Software\Wine\MSHTML,"GeckoCabDir",0x00020000,"%SystemRoot%\"
-HKCU,Software\Wine\MSHTML,"GeckoCabDir",,"C:\ReactOS\"
+HKCU,Software\Wine\MSHTML,"GeckoCabDir",0x00020000,"%SystemRoot%\"
 
 ; Sound Schemes
 HKCU,"AppEvents",,0x00000012
index 905f5ef..9650563 100644 (file)
Binary files a/boot/bootdata/hivedef_i386.inf and b/boot/bootdata/hivedef_i386.inf differ
index 8a04d12..e92deca 100644 (file)
@@ -1,14 +1,12 @@
 <?xml version="1.0"?>
 <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
-<group xmlns:xi="http://www.w3.org/2001/XInclude">
-<if property="ARCH" value="i386">
+<if property="ARCH" value="i386>
        <module name="livecd" type="liveiso" output="ReactOS-LiveCD.iso">
                <bootsector>isoboot</bootsector>
        </module>
 </if>
-<ifnot property="ARCH" value="i386">
+<ifnot property="ARCH" value="i386>
        <module name="livecd" type="liveiso" output="ReactOS-LiveCD-$(ARCH).iso">
                <bootsector>isoboot</bootsector>
        </module>
 </ifnot>
-</group>
index d87de7d..895b3fc 100644 (file)
@@ -489,6 +489,8 @@ drivers\base\nmidebug\nmidebug.sys                  2
 
 drivers\battery\battc\battc.sys                     2
 
+drivers\bus\isapnp\isapnp.sys                       2
+
 drivers\bus\acpi\cmbatt\cmbatt.sys                  2
 drivers\bus\acpi\compbatt\compbatt.sys              2
 
@@ -634,7 +636,6 @@ media\nls\c_28603.nls                               1
 media\nls\c_28604.nls                               1
 media\nls\c_28605.nls                               1
 media\nls\c_28606.nls                               1
-media\drivers\etc\hosts                             5
 media\drivers\etc\services                          5
 media\inf\audio.inf                                 6
 media\inf\acpi.inf                                  6
index 35f1c76..7977e44 100644 (file)
@@ -22,7 +22,6 @@ c_1252.nls=,,,,,,,,,,,,2
 cdfs.sys=,,,,,,x,,,,,,4
 cdrom.sys=,,,,,,x,,,,,,4
 class2.sys=,,,,,,x,,,,,,4
-isapnp.sys=,,,,,,,,,,,,4
 kdcom.dll=,,,,,,,,,,,,2
 disk.sys=,,,,,,x,,,,,,4
 floppy.sys=,,,,,,x,,,,,,4
@@ -37,16 +36,13 @@ ramdisk.sys=,,,,,,x,,,,,,4
 ext2.sys=,,,,,,x,,,,,,4
 
 [HardwareIdsDatabase]
-;*PNP0A00 = isapnp
-*PNP0A03 = pci
 *PNP0C08 = acpi
-;PCI\CC_0601 = isapnp
+*PNP0A03 = pci
 PCI\CC_0604 = pci
 
 [BootBusExtenders.Load]
 acpi = acpi.sys
 pci = pci.sys
-isapnp = isapnp.sys
 
 [Cabinets]
 Cabinet=reactos.cab
@@ -80,7 +76,7 @@ hal.dll=,,,,,,,,,,,,2
 
 [Files.pci_mp]
 ntkrnlmp.exe=,,,,,,,,,,ntoskrnl.exe,,2
-halmps.dll=,,,,,,,,,,hal.dll,,2
+halmp.dll=,,,,,,,,,,hal.dll,,2
 
 [Display]
 ;<id> = <user friendly name>,<spare>,<service key name>,<hight>,<width>,<bpp>
index 9def109..0f6c257 100644 (file)
@@ -21,22 +21,22 @@ RealEntryPoint:
        mov ss, ax
 
        /* checkPoint Charlie - where it all began... */
-       mov si, offset CheckPoint0
+       mov si, offset _CheckPoint0
        call writestr   
-
+       
        /* Setup a real mode stack */
        mov     sp, stack16
 
        /* Zero BootDrive and BootPartition */
        xor eax, eax
-       mov BootDrive, eax
-       mov BootPartition, eax
+       mov _BootDrive, eax
+       mov _BootPartition, eax
 
        /* Store the boot drive */
-       mov BootDrive, dl
+       mov _BootDrive, dl
 
        /* Store the boot partition */
-       mov BootPartition, dh
+       mov _BootPartition, dh
 
        /* Load the GDT */
        lgdt gdtptr
@@ -46,13 +46,13 @@ RealEntryPoint:
        call x86_16_EnableA20
 
        /* checkPoint Charlie - where it all began... */
-       mov si, offset CheckPoint1
+       mov si, offset _CheckPoint1
        call writestr   
        
        call x86_16_BuildPageTables
        
        /* checkPoint Charlie - where it all began... */
-       mov si, offset CheckPoint2
+       mov si, offset _CheckPoint2
        call writestr   
 
        /* Check if CPU supports CPUID */
@@ -89,26 +89,26 @@ RealEntryPoint:
        /* X64 Processor */
        
        /* checkPoint Charlie - where it all began... */
-       mov si, offset CheckPoint3
+       mov si, offset _CheckPoint3
        call writestr   
 
-       jmp switch64
+       jmp _switch64
        
 NO_X64_SUPPORT_DETECTED:
-       mov  si, offset NotAnX64Processor       // Loading message
+       mov  si, offset _NotAnX64Processor      // Loading message
        call writestr
-       jmp fail
+       jmp _fail
 
 NO_CPUID_SUPPORT_DETECTED:
-       mov  si, offset NoCPUIDSupport  // Loading message
-       call writestr
+       mov  si, offset _NoCPUIDSupport // Loading message
+       call writestr
 
-fail:
-       jmp fail
+_fail:
+       jmp _fail
        nop
        nop
 
-switch64:
+_switch64:
        call x86_16_SwitchToLong
 
        .code64
@@ -119,7 +119,7 @@ switch64:
 
        /* GO! */
        xor rcx, rcx
-       call BootMain
+       call _BootMain
 
        /* Checkpoint */
 //     mov ax, LMODE_DS
@@ -174,14 +174,14 @@ x86_16_BuildPageTables:
        push es
 
        /* Get segment of pml4 */
-       mov eax, offset pml4_startup
+       mov eax, offset _pml4_startup
        shr eax, 4
        mov es, ax
        cld
        xor di, di
 
        /* One entry in the PML4 pointing to PDP */
-       mov eax, offset pdp_startup
+       mov eax, offset _pdp_startup
        or eax, 0x00f
        stosd
        /* clear rest */
@@ -190,7 +190,7 @@ x86_16_BuildPageTables:
        rep stosd
 
        /* One entry in the PDP pointing to PD */
-       mov eax, offset pd_startup
+       mov eax, offset _pd_startup
        or eax, 0x00f
        stosd
        /* clear rest */
@@ -268,7 +268,7 @@ x86_16_SwitchToLong:
        mov eax, 0x00a0                 // Set PAE and PGE: 10100000b
        mov cr4, eax
 
-       mov edx, offset pml4_startup // Point cr3 at PML4
+       mov edx, offset _pml4_startup // Point cr3 at PML4
        mov cr3, edx
 
        mov ecx, 0xC0000080             // Specify EFER MSR
@@ -405,42 +405,42 @@ gdtptr:
        .long   gdt                     /* Base Address */
 
 
-.global BootDrive
-BootDrive:
+.global _BootDrive
+_BootDrive:
     .long 0
     
-.global BootPartition
-BootPartition:
+.global _BootPartition
+_BootPartition:
     .long 0
 
-.global NotAnX64Processor
-NotAnX64Processor:
+.global _NotAnX64Processor
+_NotAnX64Processor:
        .ascii "FreeLoader: No x64-compatible CPU detected! Exiting..."
        .byte 0x0d, 0x0a, 0
 
-.global NoCPUIDSupport
-NoCPUIDSupport:
+.global _NoCPUIDSupport
+_NoCPUIDSupport:
        .ascii "FreeLoader: No CPUID instruction support detected! Exiting..."
        .byte 0x0d, 0x0a, 0
 
 /////////////////////////// Checkpoint messages ///////////////////////////////
-.global CheckPoint0
-CheckPoint0:
+.global _CheckPoint0
+_CheckPoint0:
        .ascii "Starting FreeLoader..."
        .byte 0x0d, 0x0a, 0
        
-.global CheckPoint1
-CheckPoint1:
+.global _CheckPoint1
+_CheckPoint1:
        .ascii "FreeLoader[16-bit]: building page tables..."
        .byte 0x0d, 0x0a, 0
        
-.global CheckPoint2
-CheckPoint2:
+.global _CheckPoint2
+_CheckPoint2:
        .ascii "FreeLoader[16-bit]: checking CPU for x64 long mode..."
        .byte 0x0d, 0x0a, 0
 
-.global CheckPoint3
-CheckPoint3:
+.global _CheckPoint3
+_CheckPoint3:
        .ascii "FreeLoader: Switching to x64 long mode..."
        .byte 0x0d, 0x0a, 0
 
index eb3ba3c..ce7bb35 100644 (file)
 #include <arch.h>
 
 
-EXTERN(ChainLoadBiosBootSectorCode)
+EXTERN(_ChainLoadBiosBootSectorCode)
        .code64
 
        call x86_64_SwitchToReal
        .code16
 
        /* Set the boot drive */
-       mov dl, BootDrive
+       mov dl, _BootDrive
 
        /* Load segment registers */
        cli
@@ -46,7 +46,7 @@ EXTERN(ChainLoadBiosBootSectorCode)
 //     ljmpl   $0x0000,$0x7C00
        jmp 0x7c00:0x0000
 
-EXTERN(SoftReboot)
+EXTERN(_SoftReboot)
        .code64
 
        call    x86_64_SwitchToReal
index 6871fe0..d6b081c 100644 (file)
@@ -24,7 +24,7 @@
 #include <arch.h>
 
 
-EXTERN(DriveMapInt13HandlerStart)
+EXTERN(_DriveMapInt13HandlerStart)
 Int13Handler:
 
        pushw   %bp
@@ -82,7 +82,7 @@ CallOldInt13Handler:
 
        /* Call old int 13h handler with new drive number */
        .byte   0x9a /* lcall */
-EXTERN(DriveMapOldInt13HandlerAddress)
+EXTERN(_DriveMapOldInt13HandlerAddress)
        .word   0
        .word   0
 
@@ -105,7 +105,7 @@ CallersFlags:
 PassedInDriveNumber:
        .byte   0
 
-EXTERN(DriveMapInt13HandlerMapList)
+EXTERN(_DriveMapInt13HandlerMapList)
 Int13HandlerMapCount:
        .byte   0
 
@@ -129,4 +129,4 @@ Int13HandlerDrive4:
 Int13HandlerDriveNew4:
        .byte   0
 
-EXTERN(DriveMapInt13HandlerEnd)
+EXTERN(_DriveMapInt13HandlerEnd)
index ee3ee6f..6dfb91d 100644 (file)
@@ -33,7 +33,7 @@
  *    0x00000400: Found 80486 CPU without CPUID support
  */
 
-EXTERN(CpuidSupported)
+EXTERN(_CpuidSupported)
        .code32
 
        pushl   %ecx                    /* save ECX */
@@ -80,7 +80,7 @@ NoCpuid:
  * VOID GetCpuid(U32 Level, U32 *eax, U32 *ebx, U32 *ecx, U32 *edx);
  */
 
-EXTERN(GetCpuid)
+EXTERN(_GetCpuid)
        .code32
 
        pushl   %ebp
@@ -123,7 +123,7 @@ EXTERN(GetCpuid)
  * U64 RDTSC(VOID);
  */
 
-EXTERN(RDTSC)
+EXTERN(_RDTSC)
        .code32
        rdtsc
        ret
index 1958927..ff0ae71 100644 (file)
@@ -35,7 +35,7 @@ _pnp_bios_entry_point:
 _pnp_bios_data_segment:
        .word   0
 
-EXTERN(PnpBiosSupported)
+EXTERN(_PnpBiosSupported)
        .code64
 
        push rdi
@@ -113,7 +113,7 @@ _pnp_node_size:
 _pnp_node_count:
        .word   0
 
-EXTERN(PnpBiosGetDeviceNodeCount)
+EXTERN(_PnpBiosGetDeviceNodeCount)
        .code64
 
        push rbp
@@ -182,7 +182,7 @@ _pnp_buffer_offset:
 _pnp_node_number:
        .byte   0
 
-EXTERN(PnpBiosGetDeviceNode)
+EXTERN(_PnpBiosGetDeviceNode)
        .code64
 
        push rbp
index 195bf09..833fcc3 100644 (file)
@@ -273,7 +273,7 @@ i386CommonExceptionHandler:
        SAVE_CPU_REGS
 
        pushl   $SCREEN_ATTR
-       call    MachVideoClearScreen
+       call    _MachVideoClearScreen
        add     $4,%esp
 
        movl    $i386ExceptionHandlerText,%esi
@@ -485,7 +485,7 @@ i386PrintChar:
        pushl   $SCREEN_ATTR
        andl    $0xff,%eax
        pushl   %eax
-       call    MachVideoPutChar
+       call    _MachVideoPutChar
        addl    $16,%esp
 
        ret
index a22e409..1c1f2db 100644 (file)
@@ -63,7 +63,7 @@ Int386_regsout:
 /*
  * int Int386(int ivec, REGS* in, REGS* out);
  */
-EXTERN(Int386)
+EXTERN(_Int386)
        .code64
 
        /* Get the function parameters */
index cad77bf..9ca6f85 100644 (file)
@@ -39,6 +39,33 @@ EnableA20()
     /* Already done */
 }
 
+void
+DumpLoaderBlock()
+{
+       DbgPrint("LoaderBlock @ %p.\n", &LoaderBlock);
+       DbgPrint("Flags = 0x%x.\n", LoaderBlock.Flags);
+       DbgPrint("MemLower = 0x%p.\n", (PVOID)LoaderBlock.MemLower);
+       DbgPrint("MemHigher = 0x%p.\n", (PVOID)LoaderBlock.MemHigher);
+       DbgPrint("BootDevice = 0x%x.\n", LoaderBlock.BootDevice);
+       DbgPrint("CommandLine = %s.\n", LoaderBlock.CommandLine);
+       DbgPrint("ModsCount = 0x%x.\n", LoaderBlock.ModsCount);
+       DbgPrint("ModsAddr = 0x%p.\n", LoaderBlock.ModsAddr);
+       DbgPrint("Syms = 0x%s.\n", LoaderBlock.Syms);
+       DbgPrint("MmapLength = 0x%x.\n", LoaderBlock.MmapLength);
+       DbgPrint("MmapAddr = 0x%p.\n", (PVOID)LoaderBlock.MmapAddr);
+       DbgPrint("RdLength = 0x%x.\n", LoaderBlock.RdLength);
+       DbgPrint("RdAddr = 0x%p.\n", (PVOID)LoaderBlock.RdAddr);
+       DbgPrint("DrivesCount = 0x%x.\n", LoaderBlock.DrivesCount);
+       DbgPrint("DrivesAddr = 0x%p.\n", (PVOID)LoaderBlock.DrivesAddr);
+       DbgPrint("ConfigTable = 0x%x.\n", LoaderBlock.ConfigTable);
+       DbgPrint("BootLoaderName = 0x%x.\n", LoaderBlock.BootLoaderName);
+       DbgPrint("PageDirectoryStart = 0x%p.\n", (PVOID)LoaderBlock.PageDirectoryStart);
+       DbgPrint("PageDirectoryEnd = 0x%p.\n", (PVOID)LoaderBlock.PageDirectoryEnd);
+       DbgPrint("KernelBase = 0x%p.\n", (PVOID)LoaderBlock.KernelBase);
+       DbgPrint("ArchExtra = 0x%p.\n", (PVOID)LoaderBlock.ArchExtra);
+
+}
+
 /*++
  * FrLdrStartup
  * INTERNAL
@@ -59,7 +86,222 @@ VOID
 NTAPI
 FrLdrStartup(ULONG Magic)
 {
-       DbgPrint("ReactOS loader is unsupported! Halting.\n", KernelEntryPoint);
-    for(;;);
+       /* Disable Interrupts */
+       _disable();
+
+       /* Re-initalize EFLAGS */
+       __writeeflags(0);
+
+       /* Initialize the page directory */
+       FrLdrSetupPageDirectory();
+
+       /* Set the new PML4 */
+       __writecr3((ULONGLONG)pPML4);
+
+       FrLdrSetupGdtIdt();
+
+       LoaderBlock.FrLdrDbgPrint = DbgPrint;
+
+//     DumpLoaderBlock();
+
+       DbgPrint("Jumping to kernel @ %p.\n", KernelEntryPoint);
+
+       /* Jump to Kernel */
+       (*KernelEntryPoint)(Magic, &LoaderBlock);
+
+}
+
+PPAGE_DIRECTORY_AMD64
+FrLdrGetOrCreatePageDir(PPAGE_DIRECTORY_AMD64 pDir, ULONG Index)
+{
+       PPAGE_DIRECTORY_AMD64 pSubDir;
+
+       if (!pDir)
+               return NULL;
+
+       if (!pDir->Pde[Index].Valid)
+       {
+               pSubDir = MmAllocateMemoryWithType(PAGE_SIZE, LoaderSpecialMemory);
+               if (!pSubDir)
+                       return NULL;
+               RtlZeroMemory(pSubDir, PAGE_SIZE);
+               pDir->Pde[Index].PageFrameNumber = PtrToPfn(pSubDir);
+               pDir->Pde[Index].Valid = 1;
+               pDir->Pde[Index].Write = 1;
+       }
+       else
+       {
+               pSubDir = (PPAGE_DIRECTORY_AMD64)((ULONGLONG)(pDir->Pde[Index].PageFrameNumber) * PAGE_SIZE);
+       }
+       return pSubDir;
+}
+
+BOOLEAN
+FrLdrMapSinglePage(ULONGLONG VirtualAddress, ULONGLONG PhysicalAddress)
+{
+       PPAGE_DIRECTORY_AMD64 pDir3, pDir2, pDir1;
+       ULONG Index;
+
+       pDir3 = FrLdrGetOrCreatePageDir(pPML4, VAtoPXI(VirtualAddress));
+       pDir2 = FrLdrGetOrCreatePageDir(pDir3, VAtoPPI(VirtualAddress));
+       pDir1 = FrLdrGetOrCreatePageDir(pDir2, VAtoPDI(VirtualAddress));
+
+       if (!pDir1)
+               return FALSE;
+
+       Index = VAtoPTI(VirtualAddress);
+       if (pDir1->Pde[Index].Valid)
+       {
+               return FALSE;
+       }
+
+       pDir1->Pde[Index].Valid = 1;
+       pDir1->Pde[Index].Write = 1;
+       pDir1->Pde[Index].PageFrameNumber = PhysicalAddress / PAGE_SIZE;
+
+       return TRUE;
+}
+
+ULONG
+FrLdrMapRangeOfPages(ULONGLONG VirtualAddress, ULONGLONG PhysicalAddress, ULONG cPages)
+{
+       ULONG i;
+
+       for (i = 0; i < cPages; i++)
+       {
+               if (!FrLdrMapSinglePage(VirtualAddress, PhysicalAddress))
+               {
+                       return i;
+               }
+               VirtualAddress += PAGE_SIZE;
+               PhysicalAddress += PAGE_SIZE;
+       }
+       return i;
 }
 
+
+/*++
+ * FrLdrSetupPageDirectory
+ * INTERNAL
+ *
+ *     Sets up the ReactOS Startup Page Directory.
+ *
+ * Params:
+ *     None.
+ *
+ * Returns:
+ *     None.
+ *--*/
+VOID
+FASTCALL
+FrLdrSetupPageDirectory(VOID)
+{
+       ULONG KernelPages;
+       PVOID UserSharedData;
+
+       /* Allocate a Page for the PML4 */
+       pPML4 = MmAllocateMemoryWithType(PAGE_SIZE, LoaderSpecialMemory);
+
+       ASSERT(pPML4);
+
+       /* The page tables are located at 0xfffff68000000000 
+        * We create a recursive self mapping through all 4 levels at 
+        * virtual address 0xfffff6fb7dbedf68 */
+       pPML4->Pde[VAtoPXI(PXE_BASE)].Valid = 1;
+       pPML4->Pde[VAtoPXI(PXE_BASE)].Write = 1;
+       pPML4->Pde[VAtoPXI(PXE_BASE)].PageFrameNumber = PtrToPfn(pPML4);
+
+       /* Setup low memory pages */
+       if (FrLdrMapRangeOfPages(0, 0, 1024) < 1024)
+       {
+               DbgPrint("Could not map low memory pages.\n");
+       }
+
+       /* Setup kernel pages */
+       KernelPages = (ROUND_TO_PAGES(NextModuleBase - KERNEL_BASE_PHYS) / PAGE_SIZE);
+       if (FrLdrMapRangeOfPages(KernelBase, KERNEL_BASE_PHYS, KernelPages) != KernelPages)
+       {
+               DbgPrint("Could not map %d kernel pages.\n", KernelPages);
+       }
+
+       /* Setup a page for the idt */
+       pIdt = MmAllocateMemoryWithType(PAGE_SIZE, LoaderSpecialMemory);
+       IdtBase = KernelBase + KernelPages * PAGE_SIZE;
+       if (!FrLdrMapSinglePage(IdtBase, (ULONGLONG)pIdt))
+       {
+               DbgPrint("Could not map idt page.\n", KernelPages);
+       }
+
+       /* Setup a page for the gdt & tss */
+       pGdt = MmAllocateMemoryWithType(PAGE_SIZE, LoaderSpecialMemory);
+       GdtBase = IdtBase + PAGE_SIZE;
+       TssBase = GdtBase + 20 * sizeof(ULONG64); // FIXME: don't hardcode
+       if (!FrLdrMapSinglePage(GdtBase, (ULONGLONG)pGdt))
+       {
+               DbgPrint("Could not map gdt page.\n", KernelPages);
+       }
+
+       /* Setup KUSER_SHARED_DATA page */
+       UserSharedData = MmAllocateMemoryWithType(PAGE_SIZE, LoaderSpecialMemory);
+       if (!FrLdrMapSinglePage(KI_USER_SHARED_DATA, (ULONG64)UserSharedData))
+       {
+               DbgPrint("Could not map KUSER_SHARED_DATA page.\n", KernelPages);
+       }
+
+       /* Map APIC page */
+       if (!FrLdrMapSinglePage(APIC_BASE, APIC_PHYS_BASE))
+       {
+               DbgPrint("Could not map APIC page.\n");
+       }
+
+}
+
+VOID
+FrLdrSetupGdtIdt()
+{
+       PKGDTENTRY64 Entry;
+       KDESCRIPTOR Desc;
+
+       RtlZeroMemory(pGdt, PAGE_SIZE);
+
+       /* Setup KGDT_64_R0_CODE */
+       Entry = KiGetGdtEntry(pGdt, KGDT_64_R0_CODE);
+       *(PULONG64)Entry = 0x00209b0000000000ULL;
+
+       /* Setup KGDT_64_R0_SS */
+       Entry = KiGetGdtEntry(pGdt, KGDT_64_R0_SS);
+       *(PULONG64)Entry = 0x00cf93000000ffffULL;
+
+       /* Setup KGDT_64_DATA */
+       Entry = KiGetGdtEntry(pGdt, KGDT_64_DATA);
+       *(PULONG64)Entry = 0x00cff3000000ffffULL;
+
+       /* Setup KGDT_64_R3_CODE */
+       Entry = KiGetGdtEntry(pGdt, KGDT_64_R3_CODE);
+       *(PULONG64)Entry = 0x0020fb0000000000ULL;
+
+       /* Setup KGDT_32_R3_TEB */
+       Entry = KiGetGdtEntry(pGdt, KGDT_32_R3_TEB);
+       *(PULONG64)Entry = 0xff40f3fd50003c00ULL;
+
+       /* Setup TSS entry */
+       Entry = KiGetGdtEntry(pGdt, KGDT_TSS);
+       KiInitGdtEntry(Entry, TssBase, sizeof(KTSS), I386_TSS, 0);
+
+       /* Setup the gdt descriptor */
+       Desc.Limit = 12 * sizeof(ULONG64) - 1;
+       Desc.Base = (PVOID)GdtBase;
+
+       /* Set the new Gdt */
+       __lgdt(&Desc.Limit);
+       DbgPrint("Gdtr.Base = %p\n", Desc.Base);
+
+       /* Setup the idt descriptor */
+       Desc.Limit = 12 * sizeof(ULONG64) - 1;
+       Desc.Base = (PVOID)IdtBase;
+
+       /* Set the new Idt */
+       __lidt(&Desc.Limit);
+       DbgPrint("Idtr.Base = %p\n", Desc.Base);
+
+}
index 2d515e9..368338e 100644 (file)
         * This boots the kernel
         */
        .code64
-    .globl PageDirectoryStart
+    .globl _PageDirectoryStart
     
-    .globl pml4_startup
-    .globl pdp_startup
-    .globl pd_startup
+    .globl _pml4_startup
+    .globl _pdp_startup
+    .globl _pd_startup
 
-    .globl PageDirectoryEnd
+    .globl _PageDirectoryEnd
 
        //
        // Boot information structure
        //
 
-EXTERN(reactos_memory_map_descriptor_size)
+EXTERN(_reactos_memory_map_descriptor_size)
        .long   0
 
-EXTERN(reactos_memory_map)
+EXTERN(_reactos_memory_map)
        .rept   (32 * /*sizeof(memory_map_t)*/24)
        .byte   0
        .endr
 
 .bss
-PageDirectoryStart:
-pml4_startup:
+_PageDirectoryStart:
+_pml4_startup:
        .fill 4096, 1, 0
 
-pdp_startup:
+_pdp_startup:
        .fill 4096, 1, 0
 
-pd_startup:
+_pd_startup:
        .fill 4096, 1, 0
 
-PageDirectoryEnd:
+_PageDirectoryEnd:
index 97577aa..d4654cc 100644 (file)
@@ -452,23 +452,7 @@ static LONG DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
         SectorCount = Geometry.Sectors;
     }
     else
-    {
-        DPRINTM(DPRINT_HWDETECT, "Using legacy sector size detection\n");
-
-        /* Fall back to legacy detection */
-        if (DrivePartition == 0xff)
-        {
-            /* This is a CD-ROM device */
-            SectorSize = 2048;
-        }
-        else
-        {
-            /* This is either a floppy disk device (DrivePartition == 0) or
-             * a hard disk device (DrivePartition != 0 && DrivePartition != 0xFF) but
-             * it doesn't matter which one because they both have 512 bytes per sector */
-            SectorSize = 512;
-        }
-    }
+        return EINVAL;
 
     if (DrivePartition != 0xff && DrivePartition != 0)
     {
@@ -1435,10 +1419,10 @@ DetectSerialPorts(PCONFIGURATION_COMPONENT_DATA BusKey)
       /* Set Interrupt */
       PartialDescriptor = &PartialResourceList->PartialDescriptors[1];
       PartialDescriptor->Type = CmResourceTypeInterrupt;
-      PartialDescriptor->ShareDisposition = CmResourceShareShared;
+      PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
       PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
       PartialDescriptor->u.Interrupt.Level = Irq[i];
-      PartialDescriptor->u.Interrupt.Vector = Irq[i];
+      PartialDescriptor->u.Interrupt.Vector = 0;
       PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
 
       /* Set serial data (device specific) */
@@ -1545,7 +1529,7 @@ DetectParallelPorts(PCONFIGURATION_COMPONENT_DATA BusKey)
          PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
          PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
          PartialDescriptor->u.Interrupt.Level = Irq[i];
-         PartialDescriptor->u.Interrupt.Vector = Irq[i];
+         PartialDescriptor->u.Interrupt.Vector = 0;
          PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
        }
 
@@ -1731,7 +1715,7 @@ DetectKeyboardController(PCONFIGURATION_COMPONENT_DATA BusKey)
   PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
   PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
   PartialDescriptor->u.Interrupt.Level = 1;
-  PartialDescriptor->u.Interrupt.Vector = 1;
+  PartialDescriptor->u.Interrupt.Vector = 0;
   PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
 
   /* Set IO Port 0x60 */
@@ -1903,7 +1887,7 @@ DetectPS2Mouse(PCONFIGURATION_COMPONENT_DATA BusKey)
       PartialResourceList.PartialDescriptors[0].ShareDisposition = CmResourceShareUndetermined;
       PartialResourceList.PartialDescriptors[0].Flags = CM_RESOURCE_INTERRUPT_LATCHED;
       PartialResourceList.PartialDescriptors[0].u.Interrupt.Level = 12;
-      PartialResourceList.PartialDescriptors[0].u.Interrupt.Vector = 12;
+      PartialResourceList.PartialDescriptors[0].u.Interrupt.Vector = 0;
       PartialResourceList.PartialDescriptors[0].u.Interrupt.Affinity = 0xFFFFFFFF;
 
       /* Create controller key */
index 1b985f2..74f3e22 100644 (file)
@@ -45,6 +45,7 @@ PcMachInit(const char *CmdLine)
     MachVtbl.PrepareForReactOS = PcPrepareForReactOS;
     MachVtbl.GetMemoryMap = PcMemGetMemoryMap;
     MachVtbl.DiskGetBootPath = DiskGetBootPath;
+    MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath;
     MachVtbl.DiskReadLogicalSectors = PcDiskReadLogicalSectors;
     MachVtbl.DiskGetDriveGeometry = PcDiskGetDriveGeometry;
     MachVtbl.DiskGetCacheableBlockCount = PcDiskGetCacheableBlockCount;
index 704a7ae..442c7be 100644 (file)
@@ -48,6 +48,7 @@ XboxMachInit(const char *CmdLine)
   MachVtbl.PrepareForReactOS = XboxPrepareForReactOS;
   MachVtbl.GetMemoryMap = XboxMemGetMemoryMap;
   MachVtbl.DiskGetBootPath = DiskGetBootPath;
+  MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath;
   MachVtbl.DiskReadLogicalSectors = XboxDiskReadLogicalSectors;
   MachVtbl.DiskGetDriveGeometry = XboxDiskGetDriveGeometry;
   MachVtbl.DiskGetCacheableBlockCount = XboxDiskGetCacheableBlockCount;
index 1f30141..e0aa98c 100644 (file)
@@ -44,6 +44,12 @@ VOID LoadAndBootBootSector(PCSTR OperatingSystemName)
                return;
        }
 
+       if (!MachDiskNormalizeSystemPath(FileName, sizeof(FileName)))
+       {
+               UiMessageBox("Invalid path to boot sector file");
+               return;
+       }
+
        FilePointer = FsOpenFile(FileName);
        if (!FilePointer)
        {
index ff325b3..5c7680b 100644 (file)
@@ -138,20 +138,7 @@ static LONG DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
 
     if (!DissectArcPath(Path, FileName, &DriveNumber, &DrivePartition))
         return EINVAL;
-
-    if (DrivePartition == 0xff)
-    {
-        /* This is a CD-ROM device */
-        SectorSize = 2048;
-    }
-    else
-    {
-        /* This is either a floppy disk device (DrivePartition == 0) or
-         * a hard disk device (DrivePartition != 0 && DrivePartition != 0xFF) but
-         * it doesn't matter which one because they both have 512 bytes per sector */
-         SectorSize = 512;
-    }
-
+    SectorSize = (DrivePartition == 0xff ? 2048 : 512);
     if (DrivePartition != 0xff && DrivePartition != 0)
     {
         if (!XboxDiskGetPartitionEntry(DriveNumber, DrivePartition, &PartitionTableEntry))
index 9abd56b..57cacd2 100644 (file)
@@ -440,6 +440,7 @@ void PpcDefaultMachVtbl()
 
     MachVtbl.GetMemoryMap = PpcGetMemoryMap;
 
+    MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath;
     MachVtbl.DiskGetBootPath = PpcDiskGetBootPath;
     MachVtbl.DiskReadLogicalSectors = PpcDiskReadLogicalSectors;
     MachVtbl.DiskGetDriveGeometry = PpcDiskGetDriveGeometry;
index b7ce329..16ee1be 100644 (file)
@@ -107,80 +107,62 @@ DiskGetBootPath(char *BootPath, unsigned Size)
 {
        static char Path[] = "multi(0)disk(0)";
        char Device[4];
-       char Partition[4];
-       PARTITION_TABLE_ENTRY PartitionEntry;
-       MASTER_BOOT_RECORD MasterBootRecord;
-
-       if (BootDrive < 0x80)
+    
+       _itoa(BootDrive, Device, 10);
+       if (Size <= sizeof(Path) + 6 + strlen(Device))
        {
-               /* This is a floppy */
-
-               if (Size <= sizeof(Path) + 7 + strlen(Device))
-               {
-                       return FALSE;
-               }
-
-               strcpy(BootPath, Path);
-
-               strcat(BootPath, "fdisk");
+               return FALSE;
+       }
+       strcpy(BootPath, Path);
+       strcat(BootPath, BootDrive < 0x80 ? "fdisk" : "cdrom");
+       strcat(strcat(strcat(BootPath, "("), Device), ")");
+    
+       if (strcmp(BootPath, "multi(0)disk(0)cdrom(128)") == 0)
+               strcpy(BootPath, "multi(0)disk(0)rdisk(0)partition(1)");
+       return TRUE;
+}
 
-               _itoa(BootDrive, Device, 10);
-               strcat(BootPath, "(");
-               strcat(BootPath, Device);
-               strcat(BootPath, ")");
+BOOLEAN
+DiskNormalizeSystemPath(char *SystemPath, unsigned Size)
+{
+       CHAR BootPath[256];
+       ULONG PartitionNumber;
+       ULONG DriveNumber;
+       PARTITION_TABLE_ENTRY PartEntry;
+       char *p;
+    
+       if (!DissectArcPath(SystemPath, BootPath, &DriveNumber, &PartitionNumber))
+       {
+               return FALSE;
        }
-       /* FIXME */
-       else if (DiskReadBootRecord(BootDrive, 0, &MasterBootRecord))
+    
+       if (0 != PartitionNumber)
        {
-               /* This is a hard disk */
-
-               if (!DiskGetActivePartitionEntry(BootDrive, &PartitionEntry, &BootPartition))
-               {
-                       DbgPrint("Invalid active partition information\n");
-                       return FALSE;
-               }
-
-               if (Size <= sizeof(Path) + 18 + strlen(Device) + strlen(Partition))
-               {
-                       return FALSE;
-               }
-
-               strcpy(BootPath, Path);
-
-               strcat(BootPath, "rdisk");
-
-               _itoa(BootDrive - 0x80, Device, 10);
-               strcat(BootPath, "(");
-               strcat(BootPath, Device);
-               strcat(BootPath, ")");
-
-               _itoa(BootPartition, Partition, 10);
-               strcat(BootPath, "partition(");
-               strcat(BootPath, Partition);
-               strcat(BootPath, ")");
-        }
-       else
+               return TRUE;
+       }
+    
+       if (! DiskGetActivePartitionEntry(DriveNumber,
+                                         &PartEntry,
+                                         &PartitionNumber) ||
+           PartitionNumber < 1 || 9 < PartitionNumber)
        {
-               /* This is a CD-ROM drive */
-
-               if (Size <= sizeof(Path) + 7 + strlen(Device))
-               {
-                       return FALSE;
-               }
-
-               strcpy(BootPath, Path);
-
-               strcat(BootPath, "cdrom");
-
-               _itoa(BootDrive - 0x80, Device, 10);
-               strcat(BootPath, "(");
-               strcat(BootPath, Device);
-               strcat(BootPath, ")");
+               return FALSE;
        }
-
+    
+       p = SystemPath;
+       while ('\0' != *p && 0 != _strnicmp(p, "partition(", 10)) {
+               p++;
+       }
+       p = strchr(p, ')');
+       if (NULL == p || '0' != *(p - 1)) {
+               return FALSE;
+       }
+       *(p - 1) = '0' + PartitionNumber;
+    
        return TRUE;
 }
 
+
 // This function is in arch/i386/i386disk.c
 //VOID DiskStopFloppyMotor(VOID)
 
index b93b2e1..8966e67 100644 (file)
@@ -197,6 +197,7 @@ BOOLEAN DiskGetFirstExtendedPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord,
 
 BOOLEAN DiskReadBootRecord(ULONG DriveNumber, ULONGLONG LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord)
 {
+       char            ErrMsg[64];
        ULONG           Index;
 
        // Read master boot record
@@ -230,6 +231,9 @@ BOOLEAN DiskReadBootRecord(ULONG DriveNumber, ULONGLONG LogicalSectorNumber, PMA
        // Check the partition table magic value
        if (BootRecord->MasterBootRecordMagic != 0xaa55)
        {
+               sprintf(ErrMsg, "Invalid partition table magic 0x%x found on drive 0x%lx",
+                       BootRecord->MasterBootRecordMagic, DriveNumber);
+               DiskError(ErrMsg, 0);
                return FALSE;
        }
 
index 6aa231c..2b8a8b2 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
+<!DOCTYPE directory SYSTEM "../../../tools/rbuild/project.dtd">
 <module name="freeldr_arch" type="objectlibrary" crt="static">
        <include base="freeldr_base">include</include>
        <include base="freeldr_base">cache</include>
index a8b784b..c8c2ab1 100644 (file)
@@ -23,9 +23,7 @@
                <file>disk.c</file>
                <file>partition.c</file>
                <file>ramdisk.c</file>
-               <if property="ARCH" value="i386">
-                       <file>scsiport.c</file>
-               </if>
+               <file>scsiport.c</file>
        </directory>
        <directory name="fs">
                <file>ext2.c</file>
index 9068e00..af46178 100644 (file)
@@ -45,7 +45,7 @@
 
 #define HYPERSPACE_BASE             0xfffff70000000000ULL
 #define HAL_BASE                    0xffffffff80000000ULL
-#define APIC_BASE                   0xFFFFFFFFFFFE0000ULL
+#define APIC_BASE                   0xfffffffffee00000ULL // FIXME
 
 #define APIC_PHYS_BASE              0xfee00000
 
index 191ee12..daaaa49 100644 (file)
@@ -127,6 +127,7 @@ extern ULONG BootDrive;
 extern ULONG BootPartition;
 
 BOOLEAN DiskGetBootPath(char *BootPath, unsigned Size);
+BOOLEAN DiskNormalizeSystemPath(char *SystemPath, unsigned Size);
 
 
 ///////////////////////////////////////////////////////////////////////////////////////
index 6595205..0c0076f 100644 (file)
@@ -62,6 +62,7 @@ typedef struct tagMACHVTBL
   ULONG (*GetMemoryMap)(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize);
 
   BOOLEAN (*DiskGetBootPath)(char *BootPath, unsigned Size);
+  BOOLEAN (*DiskNormalizeSystemPath)(char *SystemPath, unsigned Size);
   BOOLEAN (*DiskReadLogicalSectors)(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer);
   BOOLEAN (*DiskGetDriveGeometry)(ULONG DriveNumber, PGEOMETRY DriveGeometry);
   ULONG (*DiskGetCacheableBlockCount)(ULONG DriveNumber);
index 5aea40c..10c2017 100644 (file)
@@ -97,6 +97,13 @@ VOID LoadAndBootLinux(PCSTR OperatingSystemName, PCSTR Description)
                goto LinuxBootFailed;
        }
 
+       // Open the boot volume
+       if (!MachDiskNormalizeSystemPath(LinuxBootPath, sizeof(LinuxBootPath)))
+       {
+               UiMessageBox("Invalid boot path");
+               goto LinuxBootFailed;
+       }
+
        // Open the kernel
        LinuxKernel = FsOpenFile(LinuxKernelName);
        if (!LinuxKernel)
index c898bf4..9021a7c 100644 (file)
@@ -37,6 +37,7 @@
 #undef MachBeep
 #undef MachPrepareForReactOS
 #undef MachDiskGetBootPath
+#undef MachDiskNormalizeSystemPath
 #undef MachDiskReadLogicalSectors
 #undef MachDiskGetDriveGeometry
 #undef MachDiskGetCacheableBlockCount
@@ -151,6 +152,12 @@ MachDiskGetBootPath(char *BootPath, unsigned Size)
   return MachVtbl.DiskGetBootPath(BootPath, Size);
 }
 
+BOOLEAN
+MachDiskNormalizeSystemPath(char *SystemPath, unsigned Size)
+{
+  return MachVtbl.DiskNormalizeSystemPath(SystemPath, Size);
+}
+
 BOOLEAN
 MachDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
 {
index 4b7f97a..3ca69fa 100644 (file)
@@ -60,7 +60,7 @@ BOOLEAN DissectArcPath(CHAR *ArcPath, CHAR *BootPath, ULONG* BootDrive, ULONG* B
                if (p == NULL)
                        return FALSE;
                p++;
-               *BootPartition = 0;
+               *BootPartition = 0xff;
        }
        else if (_strnicmp(p, "cdrom(", 6) == 0)
        {
@@ -69,7 +69,7 @@ BOOLEAN DissectArcPath(CHAR *ArcPath, CHAR *BootPath, ULONG* BootDrive, ULONG* B
                 *  multi(0)disk(0)cdrom(x)\path
                 */
                p = p + 6;
-               *BootDrive = atoi(p) + 0x80;
+               *BootDrive = atoi(p);
                p = strchr(p, ')');
                if (p == NULL)
                        return FALSE;
index 81b654b..12c8c66 100644 (file)
@@ -718,6 +718,12 @@ LoadAndBootReactOS(PCSTR OperatingSystemName)
     }
     else
     {
+        if (! MachDiskNormalizeSystemPath(SystemPath,
+                                          sizeof(SystemPath)))
+        {
+            UiMessageBox("Invalid system path");
+            return;
+        }
         /* copy system path into kernel command line */
         strcpy(reactos_kernel_cmdline, SystemPath);
     }
index 5f979c4..3e3288a 100644 (file)
@@ -252,36 +252,28 @@ WinLdrSetupGdt(PVOID GdtBase, ULONG64 TssBase)
        PKGDTENTRY64 Entry;
        KDESCRIPTOR GdtDesc;
 
-       /* Setup KGDT64_NULL */
-       Entry = KiGetGdtEntry(GdtBase, KGDT64_NULL);
-       *(PULONG64)Entry = 0x0000000000000000ULL;
-
-       /* Setup KGDT64_R0_CODE */
-       Entry = KiGetGdtEntry(GdtBase, KGDT64_R0_CODE);
+       /* Setup KGDT_64_R0_CODE */
+       Entry = KiGetGdtEntry(GdtBase, KGDT_64_R0_CODE);
        *(PULONG64)Entry = 0x00209b0000000000ULL;
 
-       /* Setup KGDT64_R0_DATA */
-       Entry = KiGetGdtEntry(GdtBase, KGDT64_R0_DATA);
+       /* Setup KGDT_64_R0_SS */
+       Entry = KiGetGdtEntry(GdtBase, KGDT_64_R0_SS);
        *(PULONG64)Entry = 0x00cf93000000ffffULL;
 
-       /* Setup KGDT64_R3_CMCODE */
-       Entry = KiGetGdtEntry(GdtBase, KGDT64_R3_CMCODE);
-       *(PULONG64)Entry = 0x00cffb000000ffffULL;
-
-       /* Setup KGDT64_R3_DATA */
-       Entry = KiGetGdtEntry(GdtBase, KGDT64_R3_DATA);
+       /* Setup KGDT_64_DATA */
+       Entry = KiGetGdtEntry(GdtBase, KGDT_64_DATA);
        *(PULONG64)Entry = 0x00cff3000000ffffULL;
 
-       /* Setup KGDT64_R3_CODE */
-       Entry = KiGetGdtEntry(GdtBase, KGDT64_R3_CODE);
+       /* Setup KGDT_64_R3_CODE */
+       Entry = KiGetGdtEntry(GdtBase, KGDT_64_R3_CODE);
        *(PULONG64)Entry = 0x0020fb0000000000ULL;
 
-       /* Setup KGDT64_R3_CMTEB */
-       Entry = KiGetGdtEntry(GdtBase, KGDT64_R3_CMTEB);
+       /* Setup KGDT_32_R3_TEB */
+       Entry = KiGetGdtEntry(GdtBase, KGDT_32_R3_TEB);
        *(PULONG64)Entry = 0xff40f3fd50003c00ULL;
 
        /* Setup TSS entry */
-       Entry = KiGetGdtEntry(GdtBase, KGDT64_SYS_TSS);
+       Entry = KiGetGdtEntry(GdtBase, KGDT_TSS);
        KiInitGdtEntry(Entry, TssBase, sizeof(KTSS), I386_TSS, 0);
 
     /* Setup GDT descriptor */
@@ -341,8 +333,15 @@ WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG64 Pcr, IN ULONG64 Tss)
     /* LDT is unused */
 //    __lldt(0);
 
+    /* Load selectors for DS/ES/FS/GS/SS */
+    Ke386SetDs(KGDT_64_DATA | RPL_MASK);   // 0x2b
+    Ke386SetEs(KGDT_64_DATA | RPL_MASK);   // 0x2b
+    Ke386SetFs(KGDT_32_R3_TEB | RPL_MASK); // 0x53
+       Ke386SetGs(KGDT_64_DATA | RPL_MASK);   // 0x2b
+       Ke386SetSs(KGDT_64_R0_SS);             // 0x18
+
        /* Load TSR */
-       __ltr(KGDT64_SYS_TSS);
+       __ltr(KGDT_TSS);
 
     DPRINTM(DPRINT_WINDOWS, "leave WinLdrSetProcessorContext\n");
 }
index c3c21d4..9a09169 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* $Id$
+ *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS Display Control Panel
  * FILE:            lib/cpl/desk/appearance.c
@@ -485,17 +486,11 @@ AppearancePage_OnDestroy(HWND hwndDlg, GLOBALS *g)
        return TRUE;
 }
 
-static void
-UpdateSelectedThemeId(HWND hwndDlg, GLOBALS *g)
-{
-       int sel;
-       sel = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETCURSEL, 0, 0);
-       g->Theme.Id = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETITEMDATA, (WPARAM)sel, 0);
-}
 
 INT_PTR CALLBACK
 AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
+       INT i;
        GLOBALS *g;
        LPNMHDR lpnm;
 
@@ -543,7 +538,8 @@ AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
                                        {
                                                PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
                                                g->Theme.bHasChanged = TRUE;
-                                               UpdateSelectedThemeId(hwndDlg, g);
+                                               i = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETCURSEL, 0, 0);
+                                               g->Theme.Id = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETITEMDATA, (WPARAM)i, 0);
                                                LoadThemeFromReg(g);
                                                //SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, WM_PAINT, 0, 0);
                                        }
@@ -561,7 +557,6 @@ AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
                                case PSN_APPLY:
                                        if (g->Theme.bHasChanged)
                                        {
-                                               UpdateSelectedThemeId(hwndDlg, g);
                                                ApplyTheme(g);
                                        }
                                        return TRUE;
index c03c66d..fe4362a 100644 (file)
@@ -94,17 +94,14 @@ AddListViewItems(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
 
     ZeroMemory(&listItem, sizeof(LV_ITEM));
     listItem.mask       = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE;
-    listItem.state      = 0;
+    listItem.state      = LVIS_SELECTED;
     listItem.pszText    = backgroundItem->szDisplayName;
     listItem.iImage     = -1;
     listItem.iItem      = pGlobalData->listViewItemCount;
     listItem.lParam     = pGlobalData->listViewItemCount;
 
     (void)ListView_InsertItem(hwndBackgroundList, &listItem);
-    ListView_SetItemState(hwndBackgroundList, 
-                          pGlobalData->listViewItemCount,
-                          LVIS_SELECTED,
-                          LVIS_SELECTED);
+    ListView_SetItemState(hwndBackgroundList, pGlobalData->listViewItemCount, LVIS_SELECTED, LVIS_SELECTED);
 
     pGlobalData->listViewItemCount++;
 
@@ -146,17 +143,14 @@ AddListViewItems(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
 
             ZeroMemory(&listItem, sizeof(LV_ITEM));
             listItem.mask       = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE;
-            listItem.state      = 0;
+            listItem.state      = LVIS_SELECTED;
             listItem.pszText    = backgroundItem->szDisplayName;
             listItem.iImage     = sfi.iIcon;
             listItem.iItem      = pGlobalData->listViewItemCount;
             listItem.lParam     = pGlobalData->listViewItemCount;
 
             (void)ListView_InsertItem(hwndBackgroundList, &listItem);
-            ListView_SetItemState(hwndBackgroundList,
-                                  pGlobalData->listViewItemCount,
-                                  LVIS_SELECTED,
-                                  LVIS_SELECTED);
+            ListView_SetItemState(hwndBackgroundList, pGlobalData->listViewItemCount, LVIS_SELECTED, LVIS_SELECTED);
 
             pGlobalData->listViewItemCount++;
         }
@@ -460,17 +454,13 @@ OnBrowseButton(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
 
         ZeroMemory(&listItem, sizeof(LV_ITEM));
         listItem.mask       = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE;
-        listItem.state      = 0;
+        listItem.state      = LVIS_SELECTED;
         listItem.pszText    = backgroundItem->szDisplayName;
         listItem.iImage     = sfi.iIcon;
         listItem.iItem      = pGlobalData->listViewItemCount;
         listItem.lParam     = pGlobalData->listViewItemCount;
 
         (void)ListView_InsertItem(hwndBackgroundList, &listItem);
-        ListView_SetItemState(hwndBackgroundList,
-                              pGlobalData->listViewItemCount,
-                              LVIS_SELECTED,
-                              LVIS_SELECTED);
         SendMessage(hwndBackgroundList, WM_VSCROLL, SB_BOTTOM, 0);
 
         pGlobalData->listViewItemCount++;
index 3a7c8b4..6fd0ac7 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* $Id: effappdlg.c 24836 2007-02-12 03:12:56Z tkreuzer $
+ *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS Display Control Panel
  * FILE:            dll/cpl/desk/effappdlg.c
index 651a167..408f651 100644 (file)
@@ -58,6 +58,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x1
 BEGIN
     GROUPBOX        "²íôîðìàö³ÿ ïðî âåðñ³þ",IDC_STATIC,6,3,210,73
     CONTROL         "Ïîçíà÷èòè ÿê ðîáî÷ó ñòàíö³þ",IDC_REPORTASWORKSTATION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,57,88,10
+    CONTROL         "Ïîçíà÷èòè ÿê ðîáî÷ó ñòàíö³þ",IDC_REPORTASWORKSTATION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,57,88,10
     LTEXT           "ReactOS áóäóºòüñÿ ÿê ñåðâåðíà ÎÑ. Îáðàòè ïðàïîðåöü, ùîá çì³íèòè ëèøå öåé äîäàòîê.",IDC_STATIC,15,15,183,41
     PUSHBUTTON      "OK",IDOK,166,83,50,14
 END
index 2571abb..4420b76 100644 (file)
@@ -336,7 +336,6 @@ CBDAPinControl_fnConstructor(
             if (SUCCEEDED(hr))
             {
                 // register device filter
-                OutputDebugStringW(L"CBDAPinControl_fnConstructor registering device filter with network provider\n");
                 hr = pNetworkProvider->RegisterDeviceFilter(pUnknown, &RegistrationCtx);
                 if (SUCCEEDED(hr))
                 {
@@ -362,6 +361,7 @@ CBDAPinControl_fnConstructor(
                     WCHAR Buffer[100];
                     swprintf(Buffer, L"CBDAPinControl_fnConstructor failed to register filter with %lx\n", hr);
                     OutputDebugStringW(Buffer);
+                    DebugBreak();
                 }
             }
         }
index 8229bd2..e7c4b1f 100644 (file)
@@ -357,7 +357,6 @@ CKsAllocator::GetBuffer(
 
         if (!m_FreeList.empty())
         {
-            OutputDebugStringW(L"CKsAllocator::GetBuffer HACK\n");
             Sample = m_FreeList.top();
             m_FreeList.pop();
         }
index da07796..a6c3bdf 100644 (file)
@@ -71,6 +71,7 @@ CEnumPins::QueryInterface(
     OutputDebugStringW(Buffer);
     CoTaskMemFree(lpstr);
 
+DebugBreak();
     return E_NOINTERFACE;
 }
 
index e56eacb..51b7872 100644 (file)
@@ -700,6 +700,7 @@ CInputPin::Receive(IMediaSample *pSample)
 {
 #ifdef KSPROXY_TRACE
     OutputDebugStringW(L"CInputPin::Receive NotImplemented\n");
+    DebugBreak();
 #endif
 
     return E_NOTIMPL;
@@ -711,6 +712,7 @@ CInputPin::ReceiveMultiple(IMediaSample **pSamples, long nSamples, long *nSample
 {
 #ifdef KSPROXY_TRACE
     OutputDebugStringW(L"CInputPin::ReceiveMultiple NotImplemented\n");
+    DebugBreak();
 #endif
 
     return E_NOTIMPL;
@@ -722,6 +724,7 @@ CInputPin::ReceiveCanBlock( void)
 {
 #ifdef KSPROXY_TRACE
     OutputDebugStringW(L"CInputPin::ReceiveCanBlock NotImplemented\n");
+    DebugBreak();
 #endif
 
     return S_FALSE;
@@ -920,6 +923,7 @@ CInputPin::KsQualityNotify(
     OutputDebugStringW(L"CInputPin::KsQualityNotify NotImplemented\n");
 #endif
 
+    DebugBreak();
     return E_NOTIMPL;
 }
 
@@ -1110,6 +1114,7 @@ CInputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
 {
 #ifdef KSPROXY_TRACE
     OutputDebugStringW(L"CInputPin::Connect NotImplemented\n");
+    DebugBreak();
 #endif
     return NOERROR;
 }
@@ -1194,6 +1199,7 @@ CInputPin::ConnectionMediaType(AM_MEDIA_TYPE *pmt)
 
 #ifdef KSPROXY_TRACE
     OutputDebugStringW(L"CInputPin::ConnectionMediaType NotImplemented\n");
+    DebugBreak();
 #endif
 
     return E_NOTIMPL;
@@ -1490,6 +1496,7 @@ CInputPin::CreatePin(
         WCHAR Buffer[100];
         swprintf(Buffer, L"CInputPin::CreatePin unexpected communication %u %s\n", m_Communication, m_PinName);
         OutputDebugStringW(Buffer);
+        DebugBreak();
 #endif
         hr = E_FAIL;
     }
@@ -1622,6 +1629,7 @@ CInputPin::CreatePinHandle(
         {
 #ifdef KSPROXY_TRACE
             OutputDebugStringW(L"CInputPin::CreatePinHandle GetSupportedSets failed\n");
+            DebugBreak();
 #endif
             return hr;
         }
@@ -1632,6 +1640,7 @@ CInputPin::CreatePinHandle(
         {
 #ifdef KSPROXY_TRACE
             OutputDebugStringW(L"CInputPin::CreatePinHandle LoadProxyPlugins failed\n");
+            DebugBreak();
 #endif
             return hr;
         }
@@ -1774,6 +1783,7 @@ CInputPin::LoadProxyPlugins(
         {
             // store plugin
             m_Plugins.push_back(pUnknown);
+DebugBreak();
         }
         // close key
         RegCloseKey(hSubKey);
index 28270cd..e041193 100644 (file)
@@ -21,6 +21,7 @@ public:
     STDMETHODIMP_(ULONG) Release()
     {
         InterlockedDecrement(&m_Ref);
+        DebugBreak();
         if (!m_Ref)
         {
             if (m_Allocator)
@@ -279,6 +280,7 @@ STDMETHODCALLTYPE
 CMediaSample::SetMediaType(AM_MEDIA_TYPE *pMediaType)
 {
     OutputDebugStringW(L"CMediaSample::SetMediaType NotImplemented\n");
+    DebugBreak();
     return E_NOTIMPL;
 }
 
index 2bf85c8..17f0780 100644 (file)
@@ -246,16 +246,8 @@ COutputPin::COutputPin(
 
     ZeroMemory(m_FramingProp, sizeof(m_FramingProp));
     ZeroMemory(m_FramingEx, sizeof(m_FramingEx));
-    ZeroMemory(&m_MediaFormat, sizeof(AM_MEDIA_TYPE));
 
     hr = KsGetMediaType(0, &m_MediaFormat, KsObjectParent->KsGetObjectHandle(), m_PinId);
-
-#ifdef KSPROXY_TRACE
-    WCHAR Buffer[100];
-    swprintf(Buffer, L"COutputPin::COutputPin Format %p pbFormat %lu\n", &m_MediaFormat, m_MediaFormat.cbFormat);
-    OutputDebugStringW(Buffer);
-#endif
-
     assert(hr == S_OK);
 
     InitializeCriticalSection(&m_Lock);
@@ -1526,8 +1518,6 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
     HRESULT hr;
     ALLOCATOR_PROPERTIES Properties;
     IMemAllocatorCallbackTemp *pMemCallback;
-    LPGUID pGuid;
-    ULONG NumGuids = 0;
 
 #ifdef KSPROXY_TRACE
     WCHAR Buffer[200];
@@ -1550,20 +1540,6 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
          pmt = &m_MediaFormat;
     }
 
-    if (m_hPin == INVALID_HANDLE_VALUE)
-    {
-        hr = CreatePin(pmt);
-        if (FAILED(hr))
-        {
-#ifdef KSPROXY_TRACE
-            swprintf(Buffer, L"COutputPin::Connect CreatePin handle failed with %lx\n", hr);
-            OutputDebugStringW(Buffer);
-#endif
-            return hr;
-        }
-    }
-
-
     // query for IMemInput interface
     hr = pReceivePin->QueryInterface(IID_IMemInputPin, (void**)&m_MemInputPin);
     if (FAILED(hr))
@@ -1572,6 +1548,7 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
         OutputDebugStringW(L"COutputPin::Connect no IMemInputPin interface\n");
 #endif
 
+        DebugBreak();
         return hr;
     }
 
@@ -1672,24 +1649,10 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
         return hr;
     }
 
-
-    assert(m_hPin != INVALID_HANDLE_VALUE);
-
-    // get all supported sets
-    if (m_Plugins.size() == 0)
+    if (!m_hPin)
     {
-        if (GetSupportedSets(&pGuid, &NumGuids))
-        {
-            // load all proxy plugins
-            if (FAILED(LoadProxyPlugins(pGuid, NumGuids)));
-            {
-#ifdef KSPROXY_TRACE
-                OutputDebugStringW(L"COutputPin::Connect LoadProxyPlugins failed\n");
-#endif
-            }
-            // free sets
-            CoTaskMemFree(pGuid);
-        }
+        //FIXME create pin handle
+        assert(0);
     }
 
     // receive connection;
@@ -1983,26 +1946,13 @@ COutputPin::CreatePin(
     // query for pin medium
     hr = KsQueryMediums(&MediumList);
     if (FAILED(hr))
-    {
-#ifdef KSPROXY_TRACE
-        WCHAR Buffer[100];
-        swprintf(Buffer, L"COutputPin::CreatePin KsQueryMediums failed %lx\n", hr);
-        OutputDebugStringW(Buffer);
-#endif
         return hr;
-    }
 
     // query for pin interface
     hr = KsQueryInterfaces(&InterfaceList);
     if (FAILED(hr))
     {
         // failed
-#ifdef KSPROXY_TRACE
-        WCHAR Buffer[100];
-        swprintf(Buffer, L"COutputPin::CreatePin KsQueryInterfaces failed %lx\n", hr);
-        OutputDebugStringW(Buffer);
-#endif
-
         CoTaskMemFree(MediumList);
         return hr;
     }
@@ -2053,12 +2003,6 @@ COutputPin::CreatePin(
                 CoTaskMemFree(MediumList);
                 CoTaskMemFree(InterfaceList);
 
-#ifdef KSPROXY_TRACE
-                WCHAR Buffer[100];
-                swprintf(Buffer, L"COutputPin::CreatePin failed to create interface handler %lx\n", hr);
-                OutputDebugStringW(Buffer);
-#endif
-
                 return hr;
             }
 
@@ -2066,12 +2010,7 @@ COutputPin::CreatePin(
             hr = InterfaceHandler->KsSetPin((IKsPin*)this);
             if (FAILED(hr))
             {
-                // failed to initialize interface handler plugin
-#ifdef KSPROXY_TRACE
-                WCHAR Buffer[100];
-                swprintf(Buffer, L"COutputPin::CreatePin failed to initialize interface handler %lx\n", hr);
-                OutputDebugStringW(Buffer);
-#endif
+                // failed to load interface handler plugin
                 InterfaceHandler->Release();
                 CoTaskMemFree(MediumList);
                 CoTaskMemFree(InterfaceList);
@@ -2088,6 +2027,7 @@ COutputPin::CreatePin(
         WCHAR Buffer[100];
         swprintf(Buffer, L"COutputPin::CreatePin unexpected communication %u %s\n", m_Communication, m_PinName);
         OutputDebugStringW(Buffer);
+        DebugBreak();
 #endif
 
         hr = E_FAIL;
@@ -2097,12 +2037,6 @@ COutputPin::CreatePin(
     CoTaskMemFree(MediumList);
     CoTaskMemFree(InterfaceList);
 
-#ifdef KSPROXY_TRACE
-    WCHAR Buffer[100];
-    swprintf(Buffer, L"COutputPin::CreatePin Result %lx\n", hr);
-    OutputDebugStringW(Buffer);
-#endif
-
     return hr;
 }
 
@@ -2124,14 +2058,11 @@ COutputPin::CreatePinHandle(
     //KSPROPERTY Property;
     //ULONG BytesReturned;
 
-    OutputDebugStringW(L"COutputPin::CreatePinHandle\n");
-
     if (m_hPin != INVALID_HANDLE_VALUE)
     {
         // pin already exists
         //CloseHandle(m_hPin);
         //m_hPin = INVALID_HANDLE_VALUE;
-        OutputDebugStringW(L"COutputPin::CreatePinHandle pin already exists\n");
         return S_OK;
     }
 
@@ -2144,10 +2075,9 @@ COutputPin::CreatePinHandle(
     if (!PinConnect)
     {
         // failed
-        OutputDebugStringW(L"COutputPin::CreatePinHandle out of memory\n");
         return E_OUTOFMEMORY;
     }
-        OutputDebugStringW(L"COutputPin::CreatePinHandle copy pinconnect\n");
+
     // setup request
     CopyMemory(&PinConnect->Interface, Interface, sizeof(KSPIN_INTERFACE));
     CopyMemory(&PinConnect->Medium, Medium, sizeof(KSPIN_MEDIUM));
@@ -2158,7 +2088,7 @@ COutputPin::CreatePinHandle(
 
     // get dataformat offset
     DataFormat = (PKSDATAFORMAT)(PinConnect + 1);
-        OutputDebugStringW(L"COutputPin::CreatePinHandle copy format\n");
+
     // copy data format
     DataFormat->FormatSize = sizeof(KSDATAFORMAT) + pmt->cbFormat;
     DataFormat->Flags = 0;
@@ -2171,19 +2101,13 @@ COutputPin::CreatePinHandle(
     if (pmt->cbFormat)
     {
         // copy extended format
-        WCHAR Buffer[100];
-        swprintf(Buffer, L"COutputPin::CreatePinHandle copy format %p pbFormat %lu\n", pmt, pmt->cbFormat);
-        OutputDebugStringW(Buffer);
         CopyMemory((DataFormat + 1), pmt->pbFormat, pmt->cbFormat);
     }
 
     // get IKsObject interface
     hr = m_ParentFilter->QueryInterface(IID_IKsObject, (LPVOID*)&KsObjectParent);
     if (FAILED(hr))
-    {
-        OutputDebugStringW(L"COutputPin::CreatePinHandle no IID_IKsObject interface\n");
         return hr;
-    }
 
     // get parent filter handle
     hFilter = KsObjectParent->KsGetObjectHandle();
@@ -2192,19 +2116,13 @@ COutputPin::CreatePinHandle(
     KsObjectParent->Release();
 
     if (!hFilter)
-    {
-        OutputDebugStringW(L"COutputPin::CreatePinHandle no filter handle\n");
         return E_HANDLE;
-    }
 
-    OutputDebugStringW(L"COutputPin::CreatePinHandle before creating pin\n");
     // create pin
-    DWORD dwError = KsCreatePin(hFilter, PinConnect, GENERIC_READ, &m_hPin);
+    hr = KsCreatePin(hFilter, PinConnect, GENERIC_READ, &m_hPin);
 
-    if (dwError == ERROR_SUCCESS)
+    if (SUCCEEDED(hr))
     {
-        OutputDebugStringW(L"COutputPin::CreatePinHandle created pin\n");
-
         // store current interface / medium
         CopyMemory(&m_Medium, Medium, sizeof(KSPIN_MEDIUM));
         CopyMemory(&m_Interface, Interface, sizeof(KSPIN_INTERFACE));
@@ -2255,14 +2173,42 @@ COutputPin::CreatePinHandle(
         if (FAILED(InitializeIOThread()))
         {
             OutputDebugStringW(L"COutputPin::CreatePinHandle failed to initialize i/o thread\n");
+            DebugBreak();
+        }
+
+        LPGUID pGuid;
+        ULONG NumGuids = 0;
+
+        // get all supported sets
+        hr = GetSupportedSets(&pGuid, &NumGuids);
+        if (FAILED(hr))
+        {
+#ifdef KSPROXY_TRACE
+            OutputDebugStringW(L"CInputPin::CreatePinHandle GetSupportedSets failed\n");
+            DebugBreak();
+#endif
+            return hr;
         }
 
+        // load all proxy plugins
+        hr = LoadProxyPlugins(pGuid, NumGuids);
+        if (FAILED(hr))
+        {
+#ifdef KSPROXY_TRACE
+            OutputDebugStringW(L"CInputPin::CreatePinHandle LoadProxyPlugins failed\n");
+            DebugBreak();
+#endif
+            return hr;
+        }
+
+        // free sets
+        CoTaskMemFree(pGuid);
+
+
         //TODO
         // connect pin pipes
 
     }
-    else
-        OutputDebugStringW(L"COutputPin::CreatePinHandle failed to create pin\n");
     // free pin connect
      CoTaskMemFree(PinConnect);
 
@@ -2392,6 +2338,7 @@ COutputPin::LoadProxyPlugins(
         {
             // store plugin
             m_Plugins.push_back(pUnknown);
+DebugBreak();
         }
         // close key
         RegCloseKey(hSubKey);
@@ -2410,48 +2357,17 @@ COutputPin::IoProcessRoutine()
     IMediaSample *Sample;
     LONG SampleCount;
     HRESULT hr;
-    PKSSTREAM_SEGMENT StreamSegment;
+    PKSSTREAM_SEGMENT StreamSegment;
     HANDLE hEvent;
-    IMediaSample ** Samples;
-    LONG NumHandles;
-    DWORD dwStatus;
+    IMediaSample * Samples[1];
 
 #ifdef KSPROXY_TRACE
     WCHAR Buffer[200];
 #endif
 
-    NumHandles = m_Properties.cBuffers / 2;
-
-    if (!NumHandles)
-        NumHandles = 8;
-
-    assert(NumHandles);
-
-    //allocate stream segment array
-    StreamSegment = (PKSSTREAM_SEGMENT*)CoTaskMemAlloc(sizeof(PKSSTREAM_SEGMENT) * NumHandles);
-    if (!StreamSegment)
-    {
-        OutputDebugStringW(L"COutputPin::IoProcessRoutine out of memory\n");
-        return E_FAIL;
-    }
-
-    // allocate handle array
-    Samples = (IMediaSample**)CoTaskMemAlloc(sizeof(IMediaSample*) * NumHandles);
-    if (!Samples)
-    {
-        OutputDebugStringW(L"COutputPin::IoProcessRoutine out of memory\n");
-        return E_FAIL;
-    }
-
-    // zero handles array
-    ZeroMemory(StreamSegment, sizeof(PKSSTREAM_SEGMENT) * NumHandles);
-    ZeroMemory(Samples, sizeof(IMediaSample*) * NumHandles);
-
     // first wait for the start event to signal
     WaitForSingleObject(m_hStartEvent, INFINITE);
 
-    m_IoCount = 0;
-
     assert(m_InterfaceHandler);
     do
     {
@@ -2476,14 +2392,14 @@ COutputPin::IoProcessRoutine()
 
         // fill buffer
         SampleCount = 1;
-        Samples[m_IoCount] = Sample;
+        Samples[0] = Sample;
 
         Sample->SetTime(NULL, NULL);
         hr = m_InterfaceHandler->KsProcessMediaSamples(NULL, /* FIXME */
-                                                       &Samples[m_IoCount],
+                                                       Samples,
                                                        &SampleCount,
                                                        KsIoOperation_Read,
-                                                       &StreamSegment[m_IoCount]);
+                                                       &StreamSegment);
         if (FAILED(hr) || !StreamSegment)
         {
 #ifdef KSPROXY_TRACE
@@ -2493,26 +2409,14 @@ COutputPin::IoProcessRoutine()
             break;
         }
 
-        // interface handle should increment pending i/o count
-        assert(m_IoCount >= 1);
-
-        swprintf(Buffer, L"COutputPin::IoProcessRoutine m_IoCount %lu NumHandles %lu\n", m_IoCount, NumHandles);
-        OutputDebugStringW(Buffer);
-
-        if (m_IoCount != NumHandles)
-            continue;
-
-        // get completion handle
-        hEvent = StreamSegment[0]->CompletionEvent;
+        // get completion event
+        hEvent = StreamSegment->CompletionEvent;
 
         // wait for i/o completion
-        dwStatus = WaitForSingleObject(hEvent, INFINITE);
-
-        swprintf(Buffer, L"COutputPin::IoProcessRoutine dwStatus %lx Error %lx NumHandles %lu\n", dwStatus, GetLastError(), NumHandles);
-        OutputDebugStringW(Buffer);
+        WaitForSingleObject(hEvent, INFINITE);
 
         // perform completion
-        m_InterfaceHandler->KsCompleteIo(StreamSegment[0]);
+        m_InterfaceHandler->KsCompleteIo(StreamSegment);
 
         // close completion event
         CloseHandle(hEvent);
@@ -2522,7 +2426,7 @@ COutputPin::IoProcessRoutine()
             assert(m_MemInputPin);
 
             // now deliver the sample
-            hr = m_MemInputPin->Receive(Samples[0]);
+            hr = m_MemInputPin->Receive(Sample);
 
 #ifdef KSPROXY_TRACE
             swprintf(Buffer, L"COutputPin::IoProcessRoutine PinName %s IMemInputPin::Receive hr %lx Sample %p m_MemAllocator %p\n", m_PinName, hr, Sample, m_MemAllocator);
@@ -2534,11 +2438,6 @@ COutputPin::IoProcessRoutine()
 
             Sample = NULL;
         }
-
-        //circular stream segment array
-        RtlMoveMemory(StreamSegment, &StreamSegment[1], sizeof(PKSSTREAM_SEGMENT) * (NumHandles - 1));
-        RtlMoveMemory(Samples, &Samples[1], sizeof(IMediaSample*) * (NumHandles - 1));
-
     }while(TRUE);
 
     // signal end of i/o thread
index f7268b1..eae5de0 100644 (file)
@@ -3,7 +3,7 @@
 #define _FORCENAMELESSUNION
 #define BUILDING_KS
 #define _KSDDK_
-#define KSPROXY_TRACE
+//#define KSPROXY_TRACE
 #include <dshow.h>
 //#include <streams.h>
 #include <ks.h>
index 175eff2..bd34ec8 100644 (file)
@@ -1954,6 +1954,7 @@ CKsProxy::IsDirty()
 {
 #ifdef KSPROXY_TRACE
     OutputDebugStringW(L"CKsProxy::IsDirty Notimplemented\n");
+    DebugBreak();
 #endif
     return E_NOTIMPL;
 }
@@ -2034,6 +2035,7 @@ CKsProxy::Load(
 
     }while(Length > 0);
 
+    DebugBreak();
     return S_OK;
 }
 
@@ -2057,6 +2059,7 @@ CKsProxy::GetSizeMax(
 {
 #ifdef KSPROXY_TRACE
     OutputDebugStringW(L"CKsProxy::GetSizeMax Notimplemented\n");
+    DebugBreak();
 #endif
 
     return E_NOTIMPL;
@@ -2477,50 +2480,23 @@ CKsProxy::CreatePins()
         // query current instance count
         hr = GetPinInstanceCount(Index, &Instances);
         if (FAILED(hr))
-        {
-#ifdef KSPROXY_TRACE
-            WCHAR Buffer[100];
-            swprintf(Buffer, L"CKsProxy::CreatePins GetPinInstanceCount failed with %lx\n", hr);
-            OutputDebugStringW(Buffer);
-#endif
             continue;
-        }
-
 
         // query pin communication;
         hr = GetPinCommunication(Index, &Communication);
         if (FAILED(hr))
-        {
-#ifdef KSPROXY_TRACE
-            WCHAR Buffer[100];
-            swprintf(Buffer, L"CKsProxy::CreatePins GetPinCommunication failed with %lx\n", hr);
-            OutputDebugStringW(Buffer);
-#endif
             continue;
-        }
 
         if (Instances.CurrentCount == Instances.PossibleCount)
         {
             // already maximum reached for this pin
-#ifdef KSPROXY_TRACE
-            WCHAR Buffer[100];
-            swprintf(Buffer, L"CKsProxy::CreatePins Instances.CurrentCount == Instances.PossibleCount\n");
-            OutputDebugStringW(Buffer);
-#endif
             continue;
         }
 
         // get direction of pin
         hr = GetPinDataflow(Index, &DataFlow);
         if (FAILED(hr))
-        {
-#ifdef KSPROXY_TRACE
-            WCHAR Buffer[100];
-            swprintf(Buffer, L"CKsProxy::CreatePins GetPinDataflow failed with %lx\n", hr);
-            OutputDebugStringW(Buffer);
-#endif
             continue;
-        }
 
         if (DataFlow == KSPIN_DATAFLOW_IN)
             hr = GetPinName(Index, DataFlow, InputPin, &PinName);
@@ -2528,14 +2504,7 @@ CKsProxy::CreatePins()
             hr = GetPinName(Index, DataFlow, OutputPin, &PinName);
 
         if (FAILED(hr))
-        {
-#ifdef KSPROXY_TRACE
-            WCHAR Buffer[100];
-            swprintf(Buffer, L"CKsProxy::CreatePins GetPinName failed with %lx\n", hr);
-            OutputDebugStringW(Buffer);
-#endif
             continue;
-        }
 
         // construct the pins
         if (DataFlow == KSPIN_DATAFLOW_IN)
@@ -2543,11 +2512,6 @@ CKsProxy::CreatePins()
             hr = CInputPin_Constructor((IBaseFilter*)this, PinName, m_hDevice, Index, Communication, IID_IPin, (void**)&pPin);
             if (FAILED(hr))
             {
-#ifdef KSPROXY_TRACE
-                WCHAR Buffer[100];
-                swprintf(Buffer, L"CKsProxy::CreatePins CInputPin_Constructor failed with %lx\n", hr);
-                OutputDebugStringW(Buffer);
-#endif
                 CoTaskMemFree(PinName);
                 continue;
             }
@@ -2558,11 +2522,6 @@ CKsProxy::CreatePins()
             hr = COutputPin_Constructor((IBaseFilter*)this, PinName, Index, Communication, IID_IPin, (void**)&pPin);
             if (FAILED(hr))
             {
-#ifdef KSPROXY_TRACE
-                WCHAR Buffer[100];
-                swprintf(Buffer, L"CKsProxy::CreatePins COutputPin_Constructor failed with %lx\n", hr);
-                OutputDebugStringW(Buffer);
-#endif
                 CoTaskMemFree(PinName);
                 continue;
             }
@@ -2668,12 +2627,9 @@ CKsProxy::Load(IPropertyBag *pPropBag, IErrorLog *pErrorLog)
     hr = LoadProxyPlugins(pGuid, NumGuids);
     if (FAILED(hr))
     {
-#if 0 //HACK
         CloseHandle(m_hDevice);
         m_hDevice = NULL;
         return hr;
-#endif
-        OutputDebugStringW(L"CKsProxy::LoadProxyPlugins failed!\n");
     }
 
     // free sets
@@ -2682,14 +2638,6 @@ CKsProxy::Load(IPropertyBag *pPropBag, IErrorLog *pErrorLog)
     // now create the input / output pins
     hr = CreatePins();
 
-#ifdef KSPROXY_TRACE
-    swprintf(Buffer, L"CKsProxy::Load CreatePins %lx\n", hr);
-    OutputDebugStringW(Buffer);
-#endif
-
-    //HACK
-    hr = S_OK;
-
     return hr;
 }
 
@@ -3038,6 +2986,10 @@ STDMETHODCALLTYPE
 CKsProxy::EnumPins(
     IEnumPins **ppEnum)
 {
+#ifdef KSPROXY_TRACE