sync with trunk r46493
authorJérôme Gardou <jerome.gardou@reactos.org>
Sat, 27 Mar 2010 20:19:56 +0000 (20:19 +0000)
committerJérôme Gardou <jerome.gardou@reactos.org>
Sat, 27 Mar 2010 20:19:56 +0000 (20:19 +0000)
svn path=/branches/reactos-yarotows/; revision=46494

323 files changed:
1  2 
ReactOS-amd64.rbuild
ReactOS-i386.rbuild
base/applications/paint/rsrc.rc
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/sambatng.txt
base/applications/rapps/rapps/seamonkey.txt
base/applications/rapps/rapps/smplayer.txt
base/applications/rapps/rapps/thunderbird.txt
base/applications/sndrec32/audio_wavein.hpp
base/applications/sndrec32/audio_waveout.hpp
base/setup/usetup/partlist.c
base/shell/cmd/cmd.c
baseaddress.rbuild
boot/bootdata/bootcd/bootcd.rbuild
boot/bootdata/livecd/livecd.rbuild
boot/bootdata/packages/reactos.dff
boot/freeldr/freeldr/debug.c
dll/cpl/sysdm/general.c
dll/cpl/usrmgr/lang/de-DE.rc
dll/directx/bdaplgin/controlnode.cpp
dll/directx/bdaplgin/devicecontrol.cpp
dll/directx/bdaplgin/digitaldemo.cpp
dll/directx/bdaplgin/frequencyfilter.cpp
dll/directx/bdaplgin/lnbinfo.cpp
dll/directx/bdaplgin/pincontrol.cpp
dll/directx/bdaplgin/precomp.h
dll/directx/bdaplgin/signalstatistics.cpp
dll/directx/ksproxy/allocator.cpp
dll/directx/ksproxy/basicaudio.cpp
dll/directx/ksproxy/clockforward.cpp
dll/directx/ksproxy/cvpconfig.cpp
dll/directx/ksproxy/cvpvbiconfig.cpp
dll/directx/ksproxy/datatype.cpp
dll/directx/ksproxy/enum_mediatypes.cpp
dll/directx/ksproxy/enumpins.cpp
dll/directx/ksproxy/input_pin.cpp
dll/directx/ksproxy/interface.cpp
dll/directx/ksproxy/ksproxy.cpp
dll/directx/ksproxy/ksproxy.rbuild
dll/directx/ksproxy/node.cpp
dll/directx/ksproxy/output_pin.cpp
dll/directx/ksproxy/precomp.h
dll/directx/ksproxy/proxy.cpp
dll/directx/ksproxy/qualityforward.cpp
dll/directx/msdvbnp/msdvbnp.cpp
dll/directx/msdvbnp/networkprovider.cpp
dll/directx/msdvbnp/pin.cpp
dll/directx/msdvbnp/precomp.h
dll/directx/msdvbnp/scanningtuner.cpp
dll/directx/qedit/samplegrabber.c
dll/directx/quartz/filtermapper.c
dll/nls/idndl/idndl.rbuild
dll/ntdll/dbg/dbgui.c
dll/ntdll/dispatch/dispatch.c
dll/ntdll/ldr/startup.c
dll/ntdll/ldr/utils.c
dll/ntdll/rtl/libsupp.c
dll/win32/acledit/acledit.c
dll/win32/acledit/stubs.c
dll/win32/advapi32/reg/reg.c
dll/win32/advapi32/sec/misc.c
dll/win32/avicap32/avicap32.c
dll/win32/avifil32/api.c
dll/win32/batt/batt.c
dll/win32/batt/batt.rbuild
dll/win32/batt/batt.rc
dll/win32/batt/batt.spec
dll/win32/batt/resource.h
dll/win32/batt/resources/battery.ico
dll/win32/beepmidi/beepmidi.c
dll/win32/browseui/internettoolbar.cpp
dll/win32/crypt32/chain.c
dll/win32/crypt32/main.c
dll/win32/crypt32/oid.c
dll/win32/dbghelp/dbghelp_private.h
dll/win32/dbghelp/dwarf.c
dll/win32/dbghelp/elf_module.c
dll/win32/dbghelp/macho_module.c
dll/win32/dbghelp/module.c
dll/win32/dbghelp/pe_module.c
dll/win32/dbghelp/symbol.c
dll/win32/fusion/fusion.c
dll/win32/fusion/fusion.spec
dll/win32/gdiplus/brush.c
dll/win32/gdiplus/image.c
dll/win32/hlink/browse_ctx.c
dll/win32/hlink/hlink_main.c
dll/win32/hlink/link.c
dll/win32/iphlpapi/iphlpapi_private.h
dll/win32/iphlpapi/resinfo_reactos.c
dll/win32/kernel32/misc/dllmain.c
dll/win32/kernel32/misc/toolhelp.c
dll/win32/kernel32/synch/critical.c
dll/win32/kernel32/thread/fiber.c
dll/win32/mshtml/De.rc
dll/win32/mshtml/Fr.rc
dll/win32/mshtml/It.rc
dll/win32/mshtml/Ja.rc
dll/win32/mshtml/Lt.rc
dll/win32/mshtml/No.rc
dll/win32/mshtml/Si.rc
dll/win32/mshtml/htmldoc.c
dll/win32/mshtml/htmldoc3.c
dll/win32/mshtml/htmlelem2.c
dll/win32/mshtml/htmlevent.c
dll/win32/mshtml/htmlevent.h
dll/win32/mshtml/htmlimg.c
dll/win32/mshtml/htmlwindow.c
dll/win32/mshtml/mshtml_private.h
dll/win32/mshtml/mutation.c
dll/win32/mshtml/navigate.c
dll/win32/mshtml/nsevents.c
dll/win32/mshtml/nsio.c
dll/win32/mshtml/omnavigator.c
dll/win32/mshtml/persist.c
dll/win32/msi/database.c
dll/win32/msi/msi_De.rc
dll/win32/msi/msi_Fr.rc
dll/win32/msi/msi_It.rc
dll/win32/msi/msi_Lt.rc
dll/win32/msi/msi_Ro.rc
dll/win32/msi/msi_Ru.rc
dll/win32/msi/msi_Si.rc
dll/win32/msi/msiquery.c
dll/win32/msi/msiserver.idl
dll/win32/msvcrt/msvcrt.def
dll/win32/msxml3/domdoc.c
dll/win32/ole32/compobj.c
dll/win32/ole32/stg_bigblockfile.c
dll/win32/ole32/stg_prop.c
dll/win32/ole32/storage32.c
dll/win32/ole32/storage32.h
dll/win32/oleaut32/typelib.c
dll/win32/oleaut32/typelib2.c
dll/win32/oledlg/oledlg_De.rc
dll/win32/oledlg/oledlg_Fr.rc
dll/win32/oledlg/oledlg_Ja.rc
dll/win32/oledlg/oledlg_Lt.rc
dll/win32/oledlg/oledlg_Si.rc
dll/win32/riched20/caret.c
dll/win32/riched20/clipboard.c
dll/win32/riched20/editor.c
dll/win32/riched20/editor.h
dll/win32/riched20/editstr.h
dll/win32/riched20/list.c
dll/win32/riched20/paint.c
dll/win32/riched20/para.c
dll/win32/riched20/reader.c
dll/win32/riched20/richole.c
dll/win32/riched20/rtf.h
dll/win32/riched20/run.c
dll/win32/riched20/style.c
dll/win32/riched20/table.c
dll/win32/riched20/txthost.c
dll/win32/riched20/txtsrv.c
dll/win32/riched20/undo.c
dll/win32/riched20/wrap.c
dll/win32/riched20/writer.c
dll/win32/rpcrt4/cproxy.c
dll/win32/rpcrt4/cpsf.c
dll/win32/rpcrt4/cpsf.h
dll/win32/rpcrt4/cstub.c
dll/win32/rpcrt4/ndr_contexthandle.c
dll/win32/rpcrt4/ndr_fullpointer.c
dll/win32/rpcrt4/ndr_marshall.c
dll/win32/rpcrt4/ndr_misc.h
dll/win32/rpcrt4/ndr_ole.c
dll/win32/rpcrt4/rpc_transport.c
dll/win32/rsaenh/implglue.c
dll/win32/rsaenh/implglue.h
dll/win32/rsaenh/rsaenh.c
dll/win32/rsaenh/rsaenh.rbuild
dll/win32/shdocvw/dochost.c
dll/win32/shdocvw/iexplore.c
dll/win32/shdocvw/navigate.c
dll/win32/shdocvw/oleobject.c
dll/win32/shdocvw/shdocvw.h
dll/win32/shdocvw/webbrowser.c
dll/win32/shell32/autocomplete.c
dll/win32/shlwapi/ordinal.c
dll/win32/shlwapi/shlwapi.spec
dll/win32/shlwapi/string.c
dll/win32/shlwapi/url.c
dll/win32/syssetup/install.c
dll/win32/urlmon/internet.c
dll/win32/urlmon/sec_mgr.c
dll/win32/urlmon/uri.c
dll/win32/urlmon/urlmon.spec
dll/win32/user32/controls/scrollbar.c
dll/win32/user32/include/dde_private.h
dll/win32/user32/include/user32.h
dll/win32/user32/misc/dllmain.c
dll/win32/user32/windows/defwnd.c
dll/win32/user32/windows/draw.c
dll/win32/user32/windows/menu.c
dll/win32/user32/windows/message.c
dll/win32/usp10/usp10.c
dll/win32/version/info.c
dll/win32/version/resource.c
dll/win32/win32.rbuild
dll/win32/windowscodecs/info.c
dll/win32/windowscodecs/jpegformat.c
dll/win32/windowscodecs/pngformat.c
dll/win32/wininet/http.c
dll/win32/wininet/internet.c
dll/win32/wininet/internet.h
dll/win32/ws2_32/misc/stubs.c
drivers/base/bootvid/bootvid.rbuild
drivers/base/bootvid/i386/bootvid.c
drivers/base/bootvid/i386/vga.c
drivers/battery/battc/battc.c
drivers/bus/acpi/acpi.rbuild
drivers/bus/acpi/busmgr/bus.c
drivers/bus/acpi/busmgr/button.c
drivers/bus/acpi/buspdo.c
drivers/bus/acpi/cmbatt/cmbatt.c
drivers/bus/acpi/cmbatt/cmbatt.h
drivers/bus/acpi/cmbatt/cmbatt.rbuild
drivers/bus/acpi/cmbatt/cmbpnp.c
drivers/bus/acpi/cmbatt/cmbwmi.c
drivers/bus/acpi/cmbatt/cmexec.c
drivers/bus/acpi/compbatt/compbatt.c
drivers/bus/acpi/compbatt/compbatt.h
drivers/bus/acpi/compbatt/compbatt.rbuild
drivers/bus/acpi/compbatt/compbatt.rc
drivers/bus/acpi/compbatt/compmisc.c
drivers/bus/acpi/compbatt/comppnp.c
drivers/bus/acpi/include/acpi_bus.h
drivers/bus/acpi/include/acpisys.h
drivers/bus/acpi/main.c
drivers/bus/acpi/osl.c
drivers/bus/isapnp/isapnp.c
drivers/directx/dxg/ddhmg.c
drivers/filesystems/ntfs/attrib.c
drivers/input/i8042prt/keyboard.c
drivers/network/afd/afd/connect.c
drivers/network/afd/afd/write.c
drivers/network/dd/ne2000/include/ne2000.h
drivers/network/dd/ne2000/ne2000/8390.c
drivers/network/ndis/include/ndissys.h
drivers/network/ndis/ndis/io.c
drivers/network/ndis/ndis/miniport.c
drivers/network/ndis/ndis/misc.c
drivers/network/tcpip/datalink/lan.c
drivers/network/tcpip/tcpip/dispatch.c
drivers/serial/serenum/detect.c
drivers/serial/serial/devctrl.c
drivers/storage/class/class2/class2.c
drivers/storage/floppy/floppy.c
drivers/storage/ide/atapi/atapi.c
drivers/storage/scsiport/scsiport.c
drivers/storage/scsiport/scsiport.rbuild
drivers/video/displays/framebuf_new/framebuf_new.rbuild
drivers/video/displays/vga/main/enable.c
drivers/video/font/bmfd/font.c
drivers/video/font/bmfd/glyph.c
drivers/video/videoprt/agp.c
drivers/video/videoprt/int10.c
drivers/video/videoprt/interrupt.c
drivers/video/videoprt/resource.c
drivers/video/videoprt/services.c
drivers/video/videoprt/videoprt.c
drivers/wdm/audio/legacy/wdmaud/interface.h
hal/hal.rbuild
hal/halx86/generic/amd64/systimer.S
hal/halx86/generic/amd64/x86bios.c
hal/halx86/generic/cmos.c
hal/halx86/generic/i386/portio.c
hal/halx86/generic/i386/systimer.S
hal/halx86/generic/i386/trap.S
hal/halx86/generic/misc.c
hal/halx86/generic/spinlock.c
hal/halx86/hal_generic.rbuild
hal/halx86/hal_generic_mp.rbuild
hal/halx86/hal_generic_up.rbuild
hal/halx86/halamd64.rbuild
hal/halx86/halmps.rbuild
hal/halx86/include/halp.h
hal/halx86/mp/amd64/mps.S
hal/halx86/mp/i386/mps.S
hal/halx86/mp/i386/mpsboot.asm
hal/halx86/mp/i386/mpsirql.c
include/ddk/acpiioct.h
include/ddk/wdm.h
include/dxsdk/dxsdk.rbuild
include/ndk/pstypes.h
include/ndk/rtlfuncs.h
include/ndk/rtltypes.h
include/ndk/umtypes.h
include/psdk/ntstatus.h
include/psdk/urlmon.idl
include/psdk/wincodec.idl
include/psdk/wincrypt.h
include/reactos/win32k/ntuser.h
include/reactos/wine/config.h
include/reactos/wine/port.h
lib/sdk/crt/math/i386/pow_asm.s
media/doc/README.WINE
media/inf/battery.inf
media/inf/cpu.inf
media/inf/inf.rbuild
ntoskrnl/config/cmalloc.c
ntoskrnl/dbgk/dbgkutil.c
ntoskrnl/include/internal/cm_x.h
ntoskrnl/io/pnpmgr/pnpmgr.c
ntoskrnl/ke/i386/usercall.c
ntoskrnl/mm/ARM3/procsup.c
ntoskrnl/po/events.c
ntoskrnl/po/power.c
ntoskrnl/rtl/libsupp.c
ntoskrnl/se/semgr.c
ntoskrnl/se/token.c
subsystems/subsystems.rbuild
subsystems/win32/win32k/include/menu.h
subsystems/win32/win32k/include/msgqueue.h
subsystems/win32/win32k/ntuser/keyboard.c
subsystems/win32/win32k/ntuser/menu.c
subsystems/win32/win32k/ntuser/message.c
subsystems/win32/win32k/ntuser/windc.c
subsystems/win32/win32k/objects/gdibatch.c

diff --combined ReactOS-amd64.rbuild
@@@ -42,6 -42,9 +42,9 @@@
                <linkerflag>-section-alignment=0x1000</linkerflag>
                <linkerflag>--unique=.eh_frame</linkerflag>
                <linkerflag>-static</linkerflag>
+               <linkerflag>-fno-leading-underscore</linkerflag>
+               <linkerflag>-shared</linkerflag>
+               <linkerflag>--exclude-all-symbols</linkerflag>
        </group>
  
        <if property="USERMODE" value="1">
diff --combined ReactOS-i386.rbuild
@@@ -28,6 -28,8 +28,8 @@@
                <compilerflag>-mpreferred-stack-boundary=2</compilerflag>
                <compilerflag compiler="midl">-m32 --win32</compilerflag>
                <compilerflag compiler="cc,cxx">-gstabs+</compilerflag>
+               <compilerflag compiler="cc,cxx">-fno-set-stack-executable</compilerflag>
+               <compilerflag compiler="cc,cxx">-fno-optimize-sibling-calls</compilerflag>
                <compilerflag compiler="as">-gstabs+</compilerflag>
        </group>
  
@@@ -42,4 -42,9 +42,9 @@@
  // THIS WILL MAKE THE PROGRAM USE THE COMMON CONTROLS
  // LIBRARY VERSION 6.0 (IF IT IS AVAILABLE)
  //
+ #ifdef _AMD64_
+ 1 24 "paint.exe.amd64.manifest"
+ #elif _X86_
  1 24 "paint.exe.manifest"
+ #endif
@@@ -2,10 -2,10 +2,10 @@@
  
  [Section]
  Name = Mozilla Firefox 3.0
- Version = 3.0.17
+ Version = 3.0.18
  Licence = MPL/GPL/LGPL
  Description = The most popular and one of the best free Web Browsers out there.
- Size = 7.1M
+ Size = 7.2M
  Category = 5
  URLSite = http://www.mozilla.com/en-US/
  URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/win32/en-US/Firefox%20Setup%203.0.18.exe
@@@ -13,7 -13,7 +13,7 @@@ CDPath = non
  
  [Section.0407]
  Description = Der populärste und einer der besten freien Webbrowser.
- Size = 6.9M
+ Size = 7.0M
  URLSite = http://www.mozilla-europe.org/de/
  URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/win32/de/Firefox%20Setup%203.0.18.exe
  
@@@ -2,13 -2,13 +2,13 @@@
  
  [Section]
  Name = Miranda IM
- Version = 0.8.13
+ 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.13-unicode.exe
+ URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.8.18-unicode.exe
  CDPath = none
  
  [Section.0407]
@@@ -2,13 -2,13 +2,13 @@@
  
  [Section]
  Name = OpenTTD
- Version = 0.7.3
+ 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 = 2.9MB
  Category = 4
  URLSite = http://www.openttd.org/
- URLDownload = http://ovh.dl.sourceforge.net/sourceforge/openttd/openttd-0.7.3-windows-win32.exe
+ URLDownload = http://binaries.openttd.org/releases/0.7.5/openttd-0.7.5-windows-win32.exe
  CDPath = none
  
  [Section.0407]
@@@ -2,13 -2,13 +2,13 @@@
  
  [Section]
  Name = Opera
- Version = 10.10
+ Version = 10.51
  Licence = Freeware
  Description = The popular Opera Browser with many advanced features and including a Mail and BitTorrent client.
  Size = 11.0M
  Category = 5
  URLSite = http://www.opera.com/
- URLDownload = http://ftp.opera.com/pub/opera/win/1010/int/Opera_1010_in_Setup.exe
+ URLDownload = http://get4.opera.com/pub/opera/win/1051/int/Opera_1051_int_Setup.exe
  CDPath = none
  
  [Section.0407]
@@@ -2,10 -2,10 +2,10 @@@
  
  [Section]
  Name = Samba TNG
- Version = 0.4.99cvs
+ Version = 0.5-RC1
  Licence = GPL
  Description = This tool allows you to access your Windows shared folders/printers with ReactOS.
- Size = 1MB
+ Size = 2.1MB
  Category = 5
  URLSite = http://samba-tng.org/
  URLDownload = http://svn.reactos.org/packages/samba-tng.exe
@@@ -2,31 -2,31 +2,31 @@@
  
  [Section]
  Name = Mozilla SeaMonkey
- Version = 2.0.2
+ 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.2/win32/en-US/SeaMonkey%20Setup%202.0.2.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.2/win32/de/SeaMonkey%20Setup%202.0.2.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.2/win32/es-ES/SeaMonkey%20Setup%202.0.2.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.2/win32/pl/SeaMonkey%20Setup%202.0.2.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.2/win32/ru/SeaMonkey%20Setup%202.0.2.exe
+ URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.3/win32/ru/SeaMonkey%20Setup%202.0.3.exe
@@@ -2,13 -2,13 +2,13 @@@
  
  [Section]
  Name = SMPlayer
- Version = 0.6.8
+ Version = 0.6.9
  Licence = GPL
  Description = SMPlayer.
- Size = 13.38MB
+ Size = 14.2MB
  Category = 1
  URLSite = http://smplayer.sourceforge.net/
- URLDownload = http://downloads.sourceforge.net/project/smplayer/SMPlayer/0.6.8/smplayer-0.6.8-win32.exe
+ URLDownload = http://downloads.sourceforge.net/project/smplayer/SMPlayer/0.6.9/smplayer-0.6.9-win32.exe
  CDPath = none
  
  [Section.0407]
@@@ -2,35 -2,35 +2,35 @@@
  
  [Section]
  Name = Mozilla Thunderbird
- Version = 3.0.1
+ 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.1/win32/en-US/Thunderbird%20Setup%203.0.1.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.4M
  URLSite = http://www.mozilla-europe.org/de/products/thunderbird/
- URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.1/win32/de/Thunderbird%20Setup%203.0.1.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.1/win32/es-ES/Thunderbird%20Setup%203.0.1.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.2M
+ Size = 9.3M
  URLSite = http://www.mozilla-europe.org/pl/products/thunderbird/
- URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.1/win32/pl/Thunderbird%20Setup%203.0.1.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.1/win32/ru/Thunderbird%20Setup%203.0.1.exe
+ URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.3/win32/ru/Thunderbird%20Setup%203.0.3.exe
@@@ -305,7 -305,7 +305,7 @@@ class audio_wavei
              if ( aud_info.bits() == 16 )
                  svalue = ( unsigned int )  abs( *(( short * ) (main_buffer + aud_info.bytes_in_samples( nsamp ))));
              else if ( aud_info.bits() == 8 )
-                svalue = (unsigned int)(( unsigned char * ) *(main_buffer + aud_info.bytes_in_samples( nsamp )));
+                svalue = (unsigned int)(( ptrdiff_t ) *(main_buffer + aud_info.bytes_in_samples( nsamp )));
  
              else 
                  svalue = 0;
@@@ -229,7 -229,7 +229,7 @@@ class audio_waveou
              if ( aud_info.bits() == 16 )
                  svalue = ( unsigned int )  abs( *(( short * ) (main_buffer + aud_info.bytes_in_samples( nsamp ))));
              else if ( aud_info.bits() == 8 )
-                svalue = (unsigned int)(( unsigned char * ) *(main_buffer + aud_info.bytes_in_samples( nsamp )));
+                svalue = (unsigned int)(( ptrdiff_t ) *(main_buffer + aud_info.bytes_in_samples( nsamp )));
  
              else 
                  svalue = 0;
@@@ -846,10 -846,10 +846,10 @@@ AddDiskToList (HANDLE FileHandle
    DiskEntry->SectorsPerTrack = DiskGeometry.SectorsPerTrack;
    DiskEntry->BytesPerSector = DiskGeometry.BytesPerSector;
  
-   DPRINT ("Cylinders %d\n", DiskEntry->Cylinders);
-   DPRINT ("TracksPerCylinder %d\n", DiskEntry->TracksPerCylinder);
-   DPRINT ("SectorsPerTrack %d\n", DiskEntry->SectorsPerTrack);
-   DPRINT ("BytesPerSector %d\n", DiskEntry->BytesPerSector);
+   DPRINT ("Cylinders %I64u\n", DiskEntry->Cylinders);
+   DPRINT ("TracksPerCylinder %I64u\n", DiskEntry->TracksPerCylinder);
+   DPRINT ("SectorsPerTrack %I64u\n", DiskEntry->SectorsPerTrack);
+   DPRINT ("BytesPerSector %I64u\n", DiskEntry->BytesPerSector);
  
    DiskEntry->TrackSize =
      (ULONGLONG)DiskGeometry.SectorsPerTrack *
diff --combined base/shell/cmd/cmd.c
@@@ -244,7 -244,7 +244,7 @@@ static BOOL IsConsoleProcess(HANDLE Pro
                return TRUE;
        }
  
-       return IMAGE_SUBSYSTEM_WINDOWS_CUI == ProcessPeb.ImageSubSystem;
+       return IMAGE_SUBSYSTEM_WINDOWS_CUI == ProcessPeb.ImageSubsystem;
  }
  
  
diff --combined baseaddress.rbuild
        <property name="BASEADDRESS_CARDS"              value="0x701a0000" />
        <property name="BASEADDRESS_WININET"            value="0x70200000" />
        <property name="BASEADDRESS_WINHTTP"            value="0x70c60000" />
+       <property name="BASEADDRESS_BATT"               value="0x70cb0000" />
        <property name="BASEADDRESS_AMSTREAM"           value="0x71030000" />
        <property name="BASEADDRESS_ACLUI"              value="0x71550000" />
        <property name="BASEADDRESS_DHCPCSVC"           value="0x71650000" />
@@@ -1,5 -1,12 +1,12 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
- <module name="bootcd" type="iso" output="ReactOS.iso">
-       <bootsector>isoboot</bootsector>
- </module>
+ <if property="ARCH" value="i386>
+       <module name="bootcd" type="iso" output="ReactOS.iso">
+               <bootsector>isoboot</bootsector>
+       </module>
+ </if>
+ <ifnot property="ARCH" value="i386>
+       <module name="bootcd" type="iso" output="ReactOS-$(ARCH).iso">
+               <bootsector>isoboot</bootsector>
+       </module>
+ </ifnot>
@@@ -1,5 -1,12 +1,12 @@@
  <?xml version="1.0"?>
  <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
- <module name="livecd" type="liveiso" output="ReactOS-LiveCD.iso">
-       <bootsector>isoboot</bootsector>
- </module>
+ <if property="ARCH" value="i386>
+       <module name="livecd" type="liveiso" output="ReactOS-LiveCD.iso">
+               <bootsector>isoboot</bootsector>
+       </module>
+ </if>
+ <ifnot property="ARCH" value="i386>
+       <module name="livecd" type="liveiso" output="ReactOS-LiveCD-$(ARCH).iso">
+               <bootsector>isoboot</bootsector>
+       </module>
+ </ifnot>
index 71f53de,0000000..1a37bcc
mode 100644,000000..100644
--- /dev/null
@@@ -1,813 -1,0 +1,814 @@@
 +; Main ReactOS package
 +
 +.Set DiskLabelTemplate="ReactOS"                ; Label of disk
 +.Set CabinetNameTemplate="reactos.cab"          ; reactos.cab
 +.Set InfFileName="reactos.inf"                  ; reactos.inf
 +
 +
 +;.Set Cabinet=on
 +;.Set Compress=on
 +
 +.InfBegin
 +[Version]
 +Signature = "$ReactOS$"
 +
 +[Directories]
 +1 = system32
 +2 = system32\drivers
 +3 = Fonts
 +4 =
 +5 = system32\drivers\etc
 +6 = inf
 +7 = bin
 +8 = media
 +
 +.InfEnd
 +
 +; Contents of disk
 +.InfBegin
 +[SourceFiles]
 +.InfEnd
 +
 +
 +; Base files
 +base\applications\cacls\cacls.exe                       1
 +base\applications\calc\calc.exe                         1
 +base\applications\charmap\charmap.exe                   1
 +base\applications\cmdutils\dbgprint\dbgprint.exe        1
 +base\applications\cmdutils\doskey\doskey.exe            1
 +base\applications\cmdutils\find\find.exe                1
 +base\applications\cmdutils\hostname\hostname.exe        1
 +base\applications\cmdutils\lodctr\lodctr.exe            1
 +base\applications\cmdutils\more\more.exe                1
 +base\applications\cmdutils\reg\reg.exe                  1
 +base\applications\cmdutils\xcopy\xcopy.exe              1
 +base\applications\control\control.exe                   1
 +base\applications\dxdiag\dxdiag.exe                     1
 +base\applications\fontview\fontview.exe                 1
 +base\applications\mscutils\devmgmt\devmgmt.exe          1
 +base\applications\mscutils\eventvwr\eventvwr.exe        1
 +base\applications\games\solitaire\sol.exe               1
 +base\applications\games\spider\spider.exe               1
 +base\applications\games\winemine\winemine.exe           1
 +base\applications\hh\hh.exe                             4
 +base\applications\kbswitch\kbswitch.exe                 1
 +base\applications\kbswitch\kbsdll\kbsdll.dll            1
 +base\applications\logoff\logoff.exe                     1
 +base\applications\magnify\magnify.exe                   1
 +base\applications\mplay32\mplay32.exe                   1
 +base\applications\msconfig\msconfig.exe                 1
 +base\applications\mstsc\mstsc.exe                       1
 +base\applications\network\arp\arp.exe                   1
 +base\applications\network\dwnl\dwnl.exe                 1
 +base\applications\network\route\route.exe               1
 +base\applications\network\finger\finger.exe             1
 +base\applications\network\ftp\ftp.exe                   1
 +base\applications\network\ipconfig\ipconfig.exe         1
 +base\applications\network\netstat\netstat.exe           1
 +base\applications\network\nslookup\nslookup.exe         1
 +base\applications\network\ping\ping.exe                 1
 +base\applications\network\telnet\telnet.exe             1
 +base\applications\network\tracert\tracert.exe           1
 +base\applications\network\whois\whois.exe               1
 +base\applications\notepad\notepad.exe                   1
 +base\applications\paint\paint.exe                       1
 +base\applications\rapps\rapps.exe                       1
 +base\applications\regedit\regedit.exe                   4
 +base\applications\regedit\clb\clb.dll                   1
 +base\applications\regedt32\regedt32.exe                 1
 +base\applications\sc\sc.exe                             1
 +base\applications\screensavers\3dtext\3dtext.scr        1
 +base\applications\screensavers\logon\logon.scr          1
 +base\applications\mscutils\servman\servman.exe          1
 +base\applications\shutdown\shutdown.exe                 1
 +base\applications\sndrec32\sndrec32.exe                 1
 +base\applications\sndvol32\sndvol32.exe                 1
 +base\applications\taskmgr\taskmgr.exe                   1
 +base\applications\winhlp32\winhlp32.exe                 4
 +base\applications\winver\winver.exe                     1
 +base\applications\wordpad\wordpad.exe                   1
 +base\applications\write\write.exe                       1
 +
 +base\services\audiosrv\audiosrv.exe                 1
 +base\services\dhcp\dhcp.exe                         1
 +base\services\eventlog\eventlog.exe                 1
 +base\services\rpcss\rpcss.exe                       1
 +base\services\spoolsv\spoolsv.exe                   1
 +base\services\tcpsvcs\tcpsvcs.exe                   1
 +base\services\telnetd\telnetd.exe                   1
 +base\services\tcpsvcs\quotes                        5
 +base\services\umpnpmgr\umpnpmgr.exe                 1
 +base\services\wlansvc\wlansvc.exe                   1
 +base\services\svchost\svchost.exe                   1
 +
 +base\setup\setup\setup.exe                          1
 +base\setup\vmwinst\vmwinst.exe                      1
 +
 +base\shell\cmd\cmd.exe                              1
 +base\shell\explorer\explorer.exe                    4
 +base\shell\explorer\explorer-cfg-template.xml       4
 +base\shell\explorer\notifyhook\notifyhook.dll       1
 +base\shell\explorer-new\explorer_new.exe            4   optional
 +
 +base\system\autochk\autochk.exe                     1
 +base\system\bootok\bootok.exe                       1
 +base\system\format\format.exe                       1
 +base\system\lsass\lsass.exe                         1
 +base\system\msiexec\msiexec.exe                     1
 +base\system\regsvr32\regsvr32.exe                   1
 +base\system\rundll32\rundll32.exe                   1
 +base\system\runonce\runonce.exe                     1
 +base\system\services\services.exe                   1
 +base\system\userinit\userinit.exe                   1
 +base\system\winlogon\winlogon.exe                   1
 +base\system\expand\expand.exe                       1
 +base\system\smss\smss.exe                           1
 +
 +
 +; Dynamic Link Libraries
 +dll\3rdparty\mesa32\mesa32.dll                      1
 +dll\3rdparty\libjpeg\libjpeg.dll                    1
 +dll\3rdparty\libxslt\libxslt.dll                    1
 +dll\3rdparty\dxtn\dxtn.dll                          1   optional
 +
 +dll\cpl\access\access.cpl                           1
 +dll\cpl\appwiz\appwiz.cpl                           1
 +dll\cpl\console\console.dll                         1
 +dll\cpl\desk\desk.cpl                               1
 +dll\cpl\hdwwiz\hdwwiz.cpl                           1
 +dll\cpl\input\input.dll                             1
 +dll\cpl\intl\intl.cpl                               1
 +dll\cpl\joy\joy.cpl                                 1
 +;dll\cpl\liccpa\liccpa.cpl                          1
 +dll\cpl\main\main.cpl                               1
 +dll\cpl\mmsys\mmsys.cpl                             1
 +dll\cpl\ncpa\ncpa.cpl                               1
 +;dll\cpl\odbccp32\odbccp32.cpl                      1
 +dll\cpl\powercfg\powercfg.cpl                       1
 +dll\cpl\sysdm\sysdm.cpl                             1
 +;dll\cpl\telephon\telephon.cpl                      1
 +dll\cpl\timedate\timedate.cpl                       1
 +;dll\cpl\usrmgr\usrmgr.cpl                          1
 +
 +dll\directx\amstream\amstream.dll                   1
 +dll\directx\dinput\dinput.dll                       1
 +dll\directx\dinput8\dinput8.dll                     1
 +dll\directx\dmusic\dmusic.dll                       1
 +dll\directx\dplay\dplay.dll                         1
 +dll\directx\dplayx\dplayx.dll                       1
 +dll\directx\dsound\dsound.dll                       1
 +dll\directx\dxdiagn\dxdiagn.dll                     1
 +dll\directx\wine\ddraw\ddraw.dll                    1
 +dll\directx\d3d8thk\d3d8thk.dll                     1
 +dll\directx\devenum\devenum.dll                     1
 +dll\directx\ksproxy\ksproxy.ax                      1
 +dll\directx\ksuser\ksuser.dll                       1
 +dll\directx\msdmo\msdmo.dll                         1
 +dll\directx\quartz\quartz.dll                       1
 +dll\directx\qedit\qedit.dll                         1
 +dll\directx\wine\d3d8\d3d8.dll                      1
 +dll\directx\wine\wined3d\wined3d.dll                1
 +dll\directx\wine\d3d9\d3d9.dll                      1
 +
 +dll\keyboard\kbda1\kbda1.dll                        1
 +dll\keyboard\kbda2\kbda2.dll                        1
 +dll\keyboard\kbda3\kbda3.dll                        1
 +dll\keyboard\kbdal\kbdal.dll                        1
 +dll\keyboard\kbdarme\kbdarme.dll                    1
 +dll\keyboard\kbdarmw\kbdarmw.dll                    1
 +dll\keyboard\kbdaze\kbdaze.dll                      1
 +dll\keyboard\kbdazel\kbdazel.dll                    1
 +dll\keyboard\kbdbgm\kbdbgm.dll                      1
 +dll\keyboard\kbdbgt\kbdbgt.dll                      1
 +dll\keyboard\kbdblr\kbdblr.dll                      1
 +dll\keyboard\kbdbr\kbdbr.dll                        1
 +dll\keyboard\kbdbga\kbdbga.dll                      1
 +dll\keyboard\kbdbe\kbdbe.dll                        1
 +dll\keyboard\kbdbur\kbdbur.dll                      1
 +dll\keyboard\kbdcan\kbdcan.dll                      1
 +dll\keyboard\kbdcr\kbdcr.dll                        1
 +dll\keyboard\kbdcz\kbdcz.dll                        1
 +dll\keyboard\kbdcz1\kbdcz1.dll                      1
 +dll\keyboard\kbdda\kbdda.dll                        1
 +dll\keyboard\kbddv\kbddv.dll                        1
 +dll\keyboard\kbdes\kbdes.dll                        1
 +dll\keyboard\kbdest\kbdest.dll                      1
 +dll\keyboard\kbdfc\kbdfc.dll                        1
 +dll\keyboard\kbdfi\kbdfi.dll                        1
 +dll\keyboard\kbdfr\kbdfr.dll                        1
 +dll\keyboard\kbdgeo\kbdgeo.dll                      1
 +dll\keyboard\kbdgerg\kbdgerg.dll                    1
 +dll\keyboard\kbdgneo\kbdgneo.dll                    1
 +dll\keyboard\kbdgrist\kbdgrist.dll                  1
 +dll\keyboard\kbdgr\kbdgr.dll                        1
 +dll\keyboard\kbdhe\kbdhe.dll                        1
 +dll\keyboard\kbdheb\kbdheb.dll                      1
 +dll\keyboard\kbdhu\kbdhu.dll                        1
 +dll\keyboard\kbdic\kbdic.dll                        1
 +dll\keyboard\kbdinasa\kbdinasa.dll                  1
 +dll\keyboard\kbdinben\kbdinben.dll                  1
 +dll\keyboard\kbdindev\kbdindev.dll                  1
 +dll\keyboard\kbdinguj\kbdinguj.dll                  1
 +dll\keyboard\kbdinmal\kbdinmal.dll                  1
 +dll\keyboard\kbdir\kbdir.dll                        1
 +dll\keyboard\kbdit\kbdit.dll                        1
 +dll\keyboard\kbdja\kbdja.dll                        1
 +dll\keyboard\kbdkaz\kbdkaz.dll                      1
 +dll\keyboard\kbdla\kbdla.dll                        1
 +dll\keyboard\kbdlt1\kbdlt1.dll                      1
 +dll\keyboard\kbdlv\kbdlv.dll                        1
 +dll\keyboard\kbdmac\kbdmac.dll                      1
 +dll\keyboard\kbdne\kbdne.dll                        1
 +dll\keyboard\kbdno\kbdno.dll                        1
 +dll\keyboard\kbdpl1\kbdpl1.dll                      1
 +dll\keyboard\kbdpo\kbdpo.dll                        1
 +dll\keyboard\kbdro\kbdro.dll                        1
 +dll\keyboard\kbdru\kbdru.dll                        1
 +dll\keyboard\kbdru1\kbdru1.dll                      1
 +dll\keyboard\kbdsg\kbdsg.dll                        1
 +dll\keyboard\kbdsk\kbdsk.dll                        1
 +dll\keyboard\kbdsk1\kbdsk1.dll                      1
 +dll\keyboard\kbdsw\kbdsw.dll                        1
 +dll\keyboard\kbdtat\kbdtat.dll                      1
 +dll\keyboard\kbdth0\kbdth0.dll                      1
 +dll\keyboard\kbdth1\kbdth1.dll                      1
 +dll\keyboard\kbdth2\kbdth2.dll                      1
 +dll\keyboard\kbdth3\kbdth3.dll                      1
 +dll\keyboard\kbdtuf\kbdtuf.dll                      1
 +dll\keyboard\kbdtuq\kbdtuq.dll                      1
 +dll\keyboard\kbduk\kbduk.dll                        1
 +dll\keyboard\kbdur\kbdur.dll                        1
 +dll\keyboard\kbdurs\kbdurs.dll                      1
 +dll\keyboard\kbdus\kbdus.dll                        1
 +dll\keyboard\kbdusa\kbdusa.dll                      1
 +dll\keyboard\kbdusl\kbdusl.dll                      1
 +dll\keyboard\kbdusr\kbdusr.dll                      1
 +dll\keyboard\kbdusx\kbdusx.dll                      1
 +dll\keyboard\kbduzb\kbduzb.dll                      1
 +dll\keyboard\kbdvntc\kbdvntc.dll                    1
 +dll\keyboard\kbdycc\kbdycc.dll                      1
 +dll\keyboard\kbdycl\kbdycl.dll                      1
 +dll\keyboard\kbdko\kbdko.dll                        1
 +
 +dll\ntdll\ntdll.dll                                 1
 +
 +dll\win32\acledit\acledit.dll                       1
 +dll\win32\aclui\aclui.dll                           1
 +dll\win32\activeds\activeds.dll                     1
 +dll\win32\advapi32\advapi32.dll                     1
 +dll\win32\advpack\advpack.dll                       1
 +dll\win32\actxprxy\actxprxy.dll                     1
 +dll\win32\atl\atl.dll                               1
 +dll\win32\authz\authz.dll                           1
 +dll\win32\avicap32\avicap32.dll                     1
 +dll\win32\avifil32\avifil32.dll                     1
++dll\win32\batt\batt.dll                             1
 +dll\win32\bcrypt\bcrypt.dll                         1
 +dll\win32\beepmidi\beepmidi.dll                     1
 +dll\win32\browseui\browseui.dll                     1
 +dll\win32\cabinet\cabinet.dll                       1
 +dll\win32\cards\cards.dll                           1
 +dll\win32\cfgmgr32\cfgmgr32.dll                     1
 +dll\win32\clusapi\clusapi.dll                       1
 +dll\win32\comcat\comcat.dll                         1
 +dll\win32\comctl32\comctl32.dll                     1
 +dll\win32\comdlg32\comdlg32.dll                     1
 +dll\win32\compstui\compstui.dll                     1
 +dll\win32\credui\credui.dll                         1
 +dll\win32\crtdll\crtdll.dll                         1
 +dll\win32\crypt32\crypt32.dll                       1
 +dll\win32\cryptdlg\cryptdlg.dll                     1
 +dll\win32\cryptdll\cryptdll.dll                     1
 +dll\win32\cryptnet\cryptnet.dll                     1
 +dll\win32\cryptui\cryptui.dll                       1
 +dll\win32\dbghelp\dbghelp.dll                       1
 +dll\win32\dciman32\dciman32.dll                     1
 +dll\win32\dwmapi\dwmapi.dll                         1
 +dll\win32\devmgr\devmgr.dll                         1
 +dll\win32\dhcpcsvc\dhcpcsvc.dll                     1
 +dll\win32\dnsapi\dnsapi.dll                         1
 +dll\win32\faultrep\faultrep.dll                     1
 +dll\win32\fmifs\fmifs.dll                           1
 +dll\win32\fusion\fusion.dll                         1
 +dll\win32\gdi32\gdi32.dll                           1
 +dll\win32\gdiplus\gdiplus.dll                       1
 +dll\win32\getuname\getuname.dll                     1
 +dll\win32\glu32\glu32.dll                           1
 +dll\win32\hhctrl.ocx\hhctrl.ocx                     1
 +dll\win32\hid\hid.dll                               1
 +dll\win32\hlink\hlink.dll                           1
 +dll\win32\hnetcfg\hnetcfg.dll                       1
 +dll\win32\httpapi\httpapi.dll                       1
 +dll\win32\iccvid\iccvid.dll                         1
 +dll\win32\icmp\icmp.dll                             1
 +dll\win32\imaadp32.acm\imaadp32.acm                 1
 +dll\win32\imagehlp\imagehlp.dll                     1
 +dll\win32\imm32\imm32.dll                           1
 +dll\win32\inetcomm\inetcomm.dll                     1
 +dll\win32\inetmib1\inetmib1.dll                     1
 +dll\win32\initpki\initpki.dll                       1
 +dll\win32\inseng\inseng.dll                         1
 +dll\win32\iphlpapi\iphlpapi.dll                     1
 +dll\win32\itircl\itircl.dll                         1
 +dll\win32\itss\itss.dll                             1
 +dll\win32\jscript\jscript.dll                       1
 +dll\win32\kernel32\kernel32.dll                     1
 +dll\win32\loadperf\loadperf.dll                     1
 +dll\win32\localspl\localspl.dll                     1
 +dll\win32\localui\localui.dll                       1
 +dll\win32\lsasrv\lsasrv.dll                         1
 +dll\win32\lz32\lz32.dll                             1
 +dll\win32\mapi32\mapi32.dll                         1
 +dll\win32\mciavi32\mciavi32.dll                     1
 +dll\win32\mcicda\mcicda.dll                         1
 +dll\win32\mciqtz32\mciqtz32.dll                     1
 +dll\win32\mciseq\mciseq.dll                         1
 +dll\win32\mciwave\mciwave.dll                       1
 +dll\win32\mlang\mlang.dll                           1
 +dll\win32\mmdrv\mmdrv.dll                           1
 +dll\win32\modemui\modemui.dll                       1
 +dll\win32\mpr\mpr.dll                               1
 +dll\win32\mprapi\mprapi.dll                         1
 +dll\win32\msacm32\msacm32.dll                       1
 +dll\win32\msacm32\msacm32.drv\msacm32.drv           1
 +dll\win32\msadp32.acm\msadp32.acm                   1
 +dll\win32\msafd\msafd.dll                           1
 +dll\win32\mscat32\mscat32.dll                       1
 +dll\win32\mscms\mscms.dll                           1
 +dll\win32\mscoree\mscoree.dll                       1
 +dll\win32\msctf\msctf.dll                           1
 +dll\win32\msftedit\msftedit.dll                     1
 +dll\win32\msg711.acm\msg711.acm                     1
 +dll\win32\msgina\msgina.dll                         1
 +dll\win32\msgsm32.acm\msgsm32.acm                   1
 +dll\win32\mshtml\mshtml.dll                         1
 +dll\win32\mshtml.tlb\mshtml.tlb                     1
 +dll\win32\msi\msi.dll                               1
 +dll\win32\msimg32\msimg32.dll                       1
 +dll\win32\msimtf\msimtf.dll                         1
 +dll\win32\msisip\msisip.dll                         1
 +dll\win32\msisys.ocx\msisys.ocx                     1
 +dll\win32\msnet32\msnet32.dll                       1
 +dll\win32\msrle32\msrle32.dll                       1
 +dll\win32\mssign32\mssign32.dll                     1
 +dll\win32\mssip32\mssip32.dll                       1
 +dll\win32\mstask\mstask.dll                         1
 +dll\win32\msvcrt\msvcrt.dll                         1
 +dll\win32\msvcrt20\msvcrt20.dll                     1
 +dll\win32\msvcrt40\msvcrt40.dll                     1
 +dll\win32\msvfw32\msvfw32.dll                       1
 +dll\win32\msvidc32\msvidc32.dll                     1
 +dll\win32\mswsock\mswsock.dll                       1
 +dll\win32\msxml3\msxml3.dll                         1
 +dll\win32\nddeapi\nddeapi.dll                       1
 +dll\win32\netapi32\netapi32.dll                     1
 +dll\win32\netcfgx\netcfgx.dll                       1
 +dll\win32\netid\netid.dll                           1
 +dll\win32\netshell\netshell.dll                     1
 +dll\win32\newdev\newdev.dll                         1
 +dll\win32\ntdsapi\ntdsapi.dll                       1
 +dll\win32\ntlanman\ntlanman.dll                     1
 +dll\win32\ntmarta\ntmarta.dll                       1
 +dll\win32\ntprint\ntprint.dll                       1
 +dll\win32\objsel\objsel.dll                         1
 +dll\win32\odbc32\odbc32.dll                         1
 +dll\win32\odbccp32\odbccp32.dll                     1
 +dll\win32\ole32\ole32.dll                           1
 +dll\win32\oleacc\oleacc.dll                         1
 +dll\win32\oleaut32\oleaut32.dll                     1
 +dll\win32\olecli32\olecli32.dll                     1
 +dll\win32\oledlg\oledlg.dll                         1
 +dll\win32\olepro32\olepro32.dll                     1
 +dll\win32\olesvr32\olesvr32.dll                     1
 +dll\win32\olethk32\olethk32.dll                     1
 +dll\win32\opengl32\opengl32.dll                     1
 +dll\win32\pdh\pdh.dll                               1
 +dll\win32\pidgen\pidgen.dll                         1
 +dll\win32\powrprof\powrprof.dll                     1
 +dll\win32\printui\printui.dll                       1
 +dll\win32\psapi\psapi.dll                           1
 +dll\win32\pstorec\pstorec.dll                       1
 +dll\win32\qmgr\qmgr.dll                             1
 +dll\win32\qmgrprxy\qmgrprxy.dll                     1
 +dll\win32\query\query.dll                           1
 +dll\win32\rasadhlp\rasadhlp.dll                     1
 +dll\win32\rasapi32\rasapi32.dll                     1
 +dll\win32\rasdlg\rasdlg.dll                         1
 +dll\win32\resutils\resutils.dll                     1
 +dll\win32\rasman\rasman.dll                         1
 +dll\win32\riched20\riched20.dll                     1
 +dll\win32\riched32\riched32.dll                     1
 +dll\win32\rpcrt4\rpcrt4.dll                         1
 +dll\win32\rsabase\rsabase.dll                       1
 +dll\win32\rsaenh\rsaenh.dll                         1
 +dll\win32\samlib\samlib.dll                         1
 +dll\win32\samsrv\samsrv.dll                         1
 +dll\win32\sccbase\sccbase.dll                       1
 +dll\win32\schannel\schannel.dll                     1
 +dll\win32\secur32\secur32.dll                       1
 +dll\win32\security\security.dll                     1
 +dll\win32\sensapi\sensapi.dll                       1
 +dll\win32\serialui\serialui.dll                     1
 +dll\win32\setupapi\setupapi.dll                     1
 +dll\win32\sfc\sfc.dll                               1
 +dll\win32\sfc_os\sfc_os.dll                         1
 +dll\win32\shdoclc\shdoclc.dll                       1
 +dll\win32\shdocvw\shdocvw.dll                       1
 +dll\win32\shell32\shell32.dll                       1
 +dll\win32\shfolder\shfolder.dll                     1
 +dll\win32\shimgvw\shimgvw.dll                       1
 +dll\win32\shlwapi\shlwapi.dll                       1
 +dll\win32\slbcsp\slbcsp.dll                         1
 +dll\win32\smdll\smdll.dll                           1
 +dll\win32\snmpapi\snmpapi.dll                       1
 +dll\win32\softpub\softpub.dll                       1
 +dll\win32\spoolss\spoolss.dll                       1
 +dll\win32\srclient\srclient.dll                     1
 +dll\win32\stdole2.tlb\stdole2.tlb                   1
 +dll\win32\stdole32.tlb\stdole32.tlb                 1
 +dll\win32\sti\sti.dll                               1
 +dll\win32\sxs\sxs.dll                               1
 +dll\win32\syssetup\syssetup.dll                     1
 +dll\win32\t2embed\t2embed.dll                       1
 +dll\win32\tapi32\tapi32.dll                         1
 +dll\win32\tapiui\tapiui.dll                         1
 +dll\win32\traffic\traffic.dll                       1
 +dll\win32\twain_32\twain_32.dll                     1
 +dll\win32\uext2\uext2.dll                           1
 +dll\win32\ufat\ufat.dll                             1
 +dll\win32\ufatx\ufatx.dll                           1   optional
 +dll\win32\untfs\untfs.dll                           1
 +dll\win32\updspapi\updspapi.dll                     1
 +dll\win32\url\url.dll                               1
 +dll\win32\urlmon\urlmon.dll                         1
 +dll\win32\user32\user32.dll                         1
 +dll\win32\userenv\userenv.dll                       1
 +dll\win32\usp10\usp10.dll                           1
 +dll\win32\uxtheme\uxtheme.dll                       1
 +dll\win32\vdmdbg\vdmdbg.dll                         1
 +dll\win32\version\version.dll                       1
 +dll\win32\windowscodecs\windowscodecs.dll           1
 +dll\win32\winemp3.acm\winemp3.acm                   1
 +dll\win32\winfax\winfax.dll                         1
 +dll\win32\winhttp\winhttp.dll                       1
 +dll\win32\wininet\wininet.dll                       1
 +dll\win32\winmm\winmm.dll                           1
 +dll\win32\winspool\winspool.drv                     1
 +dll\win32\winsta\winsta.dll                         1
 +dll\win32\wlanapi\wlanapi.dll                       1
 +dll\win32\wintrust\wintrust.dll                     1
 +dll\win32\wldap32\wldap32.dll                       1
 +dll\win32\wmi\wmi.dll                               1
 +dll\win32\ws2_32\ws2_32.dll                         1
 +dll\win32\ws2help\ws2help.dll                       1
 +dll\win32\wshirda\wshirda.dll                       1
 +dll\win32\wshtcpip\wshtcpip.dll                     1
 +dll\win32\wsock32\wsock32.dll                       1
 +dll\win32\wtsapi32\wtsapi32.dll                     1
 +dll\win32\wuapi\wuapi.dll                           1
 +dll\win32\xinput1_1\xinput1_1.dll                   1
 +dll\win32\xinput1_2\xinput1_2.dll                   1
 +dll\win32\xinput1_3\xinput1_3.dll                   1
 +dll\win32\xinput9_1_0\xinput9_1_0.dll               1
 +dll\win32\xmllite\xmllite.dll                       1
 +dll\win32\winmm\midimap\midimap.dll                 1
 +dll\win32\wdmaud.drv\wdmaud.drv                     1
 +
 +; Shell Extensions
 +dll\shellext\deskadp\deskadp.dll                    1
 +dll\shellext\deskmon\deskmon.dll                    1
 +
 +; Drivers
 +drivers\base\bootvid\bootvid.dll                    1
 +drivers\base\beep\beep.sys                          2
 +drivers\base\null\null.sys                          2
 +drivers\base\nmidebug\nmidebug.sys                  2
 +
 +drivers\battery\cmbatt\cmbatt.sys                   2
 +drivers\battery\battc\battc.sys                     2
 +
 +drivers\bus\isapnp\isapnp.sys                       2
 +
 +drivers\directx\dxapi\dxapi.sys                     2
 +drivers\directx\dxg\dxg.sys                         2
 +drivers\directx\dxgthk\dxgthk.sys                   2
 +
 +drivers\filesystems\fs_rec\fs_rec.sys               2
 +drivers\filesystems\msfs\msfs.sys                   2
 +drivers\filesystems\mup\mup.sys                     2
 +drivers\filesystems\npfs\npfs.sys                   2
 +
 +drivers\input\mouclass\mouclass.sys                 2
 +drivers\input\sermouse\sermouse.sys                 2
 +
 +drivers\ksfilter\ks\ks.sys                          2
 +
 +drivers\network\afd\afd.sys                         2
 +drivers\network\ndis\ndis.sys                       2
 +drivers\network\tcpip\tcpip.sys                     2
 +drivers\network\tdi\tdi.sys                         2
 +drivers\network\dd\ne2000\ne2000.sys                2
 +drivers\network\dd\pcnet\pcnet.sys                  2
 +
 +drivers\serial\serenum\serenum.sys                  2
 +drivers\serial\serial\serial.sys                    2
 +
 +drivers\storage\ide\pciide\pciide.sys               2
 +drivers\storage\ide\pciidex\pciidex.sys             2
 +
 +;drivers\usb\miniport\usbohci\usbohci.sys           2
 +;drivers\usb\miniport\usbuhci\usbuhci.sys           2
 +;drivers\usb\usbhub\usbhub.sys                      2
 +;drivers\usb\usbport\usbport.sys                    2
 +drivers\usb\nt4compat\usbdriver\usbdriver.sys       2
 +
 +drivers\video\displays\vga\vgaddi.dll               1
 +drivers\video\displays\framebuf\framebuf.dll        1
 +drivers\video\miniport\vga\vgamp.sys                2
 +drivers\video\miniport\vbe\vbemp.sys                2
 +drivers\video\videoprt\videoprt.sys                 2
 +drivers\video\font\ftfd\ftfd.dll                   1
 +
 +drivers\wdm\audio\filters\kmixer\kmixer.sys         2
 +drivers\wdm\audio\sysaudio\sysaudio.sys             2
 +drivers\wdm\audio\legacy\wdmaud\wdmaud.sys          2
 +drivers\wdm\audio\backpln\portcls\portcls.sys       2
 +drivers\wdm\audio\drm\drmk\drmk.sys                 2
 +drivers\wmi\wmilib.sys                              2
 +
 +; Media
 +media\fonts\DejaVuSans.ttf                          3
 +media\fonts\DejaVuSans-Bold.ttf                     3
 +media\fonts\DejaVuSans-BoldOblique.ttf              3
 +media\fonts\DejaVuSansMono.ttf                      3
 +media\fonts\DejaVuSansMono-Bold.ttf                 3
 +media\fonts\DejaVuSansMono-BoldOblique.ttf          3
 +media\fonts\DejaVuSansMono-Oblique.ttf              3
 +media\fonts\DejaVuSans-Oblique.ttf                  3
 +media\fonts\DejaVuSerif.ttf                         3
 +media\fonts\DejaVuSerif-Bold.ttf                    3
 +media\fonts\DejaVuSerif-BoldItalic.ttf              3
 +media\fonts\DejaVuSerif-Italic.ttf                  3
 +
 +media\fonts\FreeMono.ttf                            3
 +media\fonts\FreeMonoBold.ttf                        3
 +media\fonts\FreeMonoBoldOblique.ttf                 3
 +media\fonts\FreeMonoOblique.ttf                     3
 +
 +media\fonts\LiberationMono-Bold.ttf                 3
 +media\fonts\LiberationMono-BoldItalic.ttf           3
 +media\fonts\LiberationMono-Italic.ttf               3
 +media\fonts\LiberationMono-Regular.ttf              3
 +media\fonts\LiberationSans-Bold.ttf                 3
 +media\fonts\LiberationSans-BoldItalic.ttf           3
 +media\fonts\LiberationSans-Italic.ttf               3
 +media\fonts\LiberationSans-Regular.ttf              3
 +media\fonts\LiberationSerif-Bold.ttf                3
 +media\fonts\LiberationSerif-BoldItalic.ttf          3
 +media\fonts\LiberationSerif-Italic.ttf              3
 +media\fonts\LiberationSerif-Regular.ttf             3
 +
 +media\fonts\Marlett.ttf                             3
 +media\fonts\symbol.ttf                              3
 +media\fonts\tahoma.ttf                              3
 +media\fonts\tahomabd.ttf                            3
 +
 +media\vgafonts\vgafonts.cab                         4
 +
 +media\nls\c_037.nls                                 1
 +media\nls\c_424.nls                                 1
 +media\nls\c_500.nls                                 1
 +media\nls\c_737.nls                                 1
 +media\nls\c_775.nls                                 1
 +media\nls\c_850.nls                                 1
 +media\nls\c_852.nls                                 1
 +media\nls\c_855.nls                                 1
 +media\nls\c_856.nls                                 1
 +media\nls\c_857.nls                                 1
 +media\nls\c_860.nls                                 1
 +media\nls\c_861.nls                                 1
 +media\nls\c_862.nls                                 1
 +media\nls\c_863.nls                                 1
 +media\nls\c_864.nls                                 1
 +media\nls\c_865.nls                                 1
 +media\nls\c_866.nls                                 1
 +media\nls\c_869.nls                                 1
 +media\nls\c_874.nls                                 1
 +media\nls\c_875.nls                                 1
 +media\nls\c_878.nls                                 1
 +media\nls\c_932.nls                                 1
 +media\nls\c_936.nls                                 1
 +media\nls\c_949.nls                                 1
 +media\nls\c_950.nls                                 1
 +media\nls\c_1006.nls                                1
 +media\nls\c_1026.nls                                1
 +media\nls\c_1250.nls                                1
 +media\nls\c_1251.nls                                1
 +media\nls\c_1253.nls                                1
 +media\nls\c_1254.nls                                1
 +media\nls\c_1255.nls                                1
 +media\nls\c_1256.nls                                1
 +media\nls\c_1257.nls                                1
 +media\nls\c_1258.nls                                1
 +media\nls\c_10000.nls                               1
 +media\nls\c_10006.nls                               1
 +media\nls\c_10007.nls                               1
 +media\nls\c_10029.nls                               1
 +media\nls\c_10079.nls                               1
 +media\nls\c_10081.nls                               1
 +media\nls\c_20866.nls                               1
 +media\nls\c_21866.nls                               1
 +media\nls\c_28591.nls                               1
 +media\nls\c_28592.nls                               1
 +media\nls\c_28593.nls                               1
 +media\nls\c_28594.nls                               1
 +media\nls\c_28595.nls                               1
 +media\nls\c_28596.nls                               1
 +media\nls\c_28597.nls                               1
 +media\nls\c_28598.nls                               1
 +media\nls\c_28599.nls                               1
 +media\nls\c_28600.nls                               1
 +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\services                          5
 +media\inf\audio.inf                                 6
 +media\inf\acpi.inf                                  6
 +media\inf\battery.inf                               6
 +media\inf\cdrom.inf                                 6
 +media\inf\cpu.inf                                   6
 +media\inf\display.inf                               6
 +media\inf\font.inf                                  6
 +media\inf\fdc.inf                                   6
 +media\inf\hdc.inf                                   6
 +media\inf\intl.inf                                  6
 +media\inf\layout.inf                                6
 +media\inf\machine.inf                               6
 +media\inf\msmouse.inf                               6
 +media\inf\keyboard.inf                              6
 +media\inf\ks.inf                                    6
 +media\inf\NET_NIC.inf                               6
 +media\inf\netamd.inf                                6
 +media\inf\netisa.inf                                6
 +media\inf\netrtpnt.inf                              6
 +media\inf\nettcpip.inf                              6
 +media\inf\ports.inf                                 6
 +media\inf\scsi.inf                                  6
 +media\inf\syssetup.inf                              6
 +media\inf\usbport.inf                               6
 +media\inf\usb.inf                                   6
 +media\inf\usbstor.inf                               6
 +media\inf\xboxdisp.inf                              6
 +
 +
 +; Media Files
 +media\sounds\ReactOS_LogOn.wav                      8
 +
 +; Ini Files
 +boot\bootdata\system.ini                            4
 +
 +; Regression Testing
 +boot\bootdata\bootcdregtest\regtest.cmd             7   optional
 +
 +; Subsystems
 +subsystems\win32\csrss\csrss.exe                    1
 +subsystems\win32\csrss\win32csr\win32csr.dll        1
 +subsystems\win32\csrss\csrsrv\csrsrv.dll            1
 +subsystems\ntvdm\ntvdm.exe                          1
 +subsystems\win32\win32k\win32k.sys                  1
 +
 +; Optional/proprietary files
 +modules\optional\DroidSansFallback.ttf              3  optional
 +modules\optional\NOTICE_for_Droid_Font.txt          4  optional
 +modules\optional\netkvm2k.inf                       6  optional
 +modules\optional\netkvm2k.cat                       6  optional
 +modules\optional\netkvm.sys                         2  optional
 +modules\optional\alcxwdm.inf                        6  optional
 +modules\optional\alcxwdm.sys                        2  optional
 +modules\optional\mfc42.dll                          1  optional
 +modules\optional\mfc42u.dll                         1  optional
 +modules\optional\mfc71.dll                          1  optional
 +modules\optional\mfc71u.dll                         1  optional
 +modules\optional\msvbvm50.dll                       1  optional
 +modules\optional\msvbvm60.dll                       1  optional
 +modules\optional\msvcirt.dll                        1  optional
 +modules\optional\msvcp71.dll                        1  optional
 +modules\optional\msvcr71.dll                        1  optional
 +modules\optional\vmx_fb.dll                         1  optional
 +modules\optional\vmx_mode.dll                       1  optional
 +modules\optional\vmx_svga.inf                       6  optional
 +modules\optional\vmx_svga.sys                       2  optional
 +modules\optional\wine_gecko-1.0.0-x86.cab           4  optional
 +
 +; Rosapps
 +modules\rosapps\applications\screensavers\cylfrac\cylfrac.scr              1   optional
 +modules\rosapps\applications\screensavers\matrix\matrix.scr                1   optional
 +modules\rosapps\applications\screensavers\blankscr\scrnsave.scr            1   optional
 +modules\rosapps\applications\screensavers\starfield\starfield.scr          1   optional
 +modules\rosapps\applications\screensavers\mazescr\mazescr.scr              1   optional
 +modules\rosapps\applications\screensavers\butterflies\butterflies.scr      1   optional
 +modules\rosapps\applications\cmdutils\comp\comp.exe                                     1   optional
 +modules\rosapps\applications\cmdutils\mode\mode.exe                                     1   optional
 +modules\rosapps\applications\cmdutils\sort\sort.exe                                     1   optional
 +modules\rosapps\applications\cmdutils\tee\tee.exe                                       1   optional
 +modules\rosapps\applications\cmdutils\touch\touch.exe                                   1   optional
 +modules\rosapps\applications\cmdutils\uptime\uptime.exe                                 1   optional
 +modules\rosapps\applications\cmdutils\y\y.exe                                           1   optional
 +modules\rosapps\applications\devutils\gdb2\gdb2.exe                                     1   optional
 +modules\rosapps\applications\devutils\gdihv\gdihv.exe                                   1   optional
 +modules\rosapps\applications\devutils\genguid\genguid.exe                               1   optional
 +modules\rosapps\applications\sysutils\gettype\gettype.exe                               1   optional
 +modules\rosapps\applications\net\ncftp\ncftp.exe                                        1   optional
 +modules\rosapps\applications\net\netreg\netreg.exe                                      1   optional
 +modules\rosapps\applications\net\niclist\niclist.exe                                    1   optional
 +modules\rosapps\applications\net\roshttpd\roshttpd.exe                                  1   optional
 +modules\rosapps\applications\notevil\notevil.exe                                        1   optional
 +modules\rosapps\applications\sysutils\chkdsk\chkdsk.exe                                 1   optional
 +modules\rosapps\applications\sysutils\systeminfo\systeminfo.exe                         1   optional
 +modules\rosapps\applications\sysutils\chklib\chklib.exe                                 1   optional
 +modules\rosapps\applications\sysutils\ctm\ctm.exe                                       1   optional
 +modules\rosapps\applications\sysutils\kill\kill.exe                                     1   optional
 +modules\rosapps\applications\sysutils\lsdd\lsdd.exe                                     1   optional
 +modules\rosapps\applications\sysutils\man\man.exe                                       1   optional
 +modules\rosapps\applications\sysutils\pedump\pedump.exe                                 1   optional
 +modules\rosapps\applications\sysutils\regexpl\regexpl.exe                               1   optional
 +modules\rosapps\applications\sysutils\tcat\tcat.exe                                     1   optional
 +modules\rosapps\applications\sysutils\tlist\tlist.exe                                   1   optional
 +modules\rosapps\applications\sysutils\screenshot\screenshot.exe                         1   optional
 +modules\rosapps\applications\sysutils\utils\binpatch\binpatch.exe                       1   optional
 +modules\rosapps\applications\sysutils\utils\cat\cat.exe                                 1   optional
 +modules\rosapps\applications\sysutils\utils\driver\load\load.exe                        1   optional
 +modules\rosapps\applications\sysutils\utils\driver\unload\unload.exe                    1   optional
 +modules\rosapps\applications\sysutils\utils\infinst\infinst.exe                         1   optional
 +modules\rosapps\applications\sysutils\utils\nts2w32err\nts2w32err.exe                   1   optional
 +modules\rosapps\applications\sysutils\utils\objdir\objdir.exe                           1   optional
 +modules\rosapps\applications\sysutils\utils\partinfo\partinfo.exe                       1   optional
 +modules\rosapps\applications\sysutils\utils\ps\ps.exe                                   1   optional
 +modules\rosapps\applications\sysutils\utils\rosperf\rosperf.exe                         1   optional
 +modules\rosapps\applications\sysutils\utils\stats\stats.exe                             1   optional
 +modules\rosapps\applications\sysutils\utils\tickcount\tickcount.exe                     1   optional
 +modules\rosapps\applications\winfile\winfile.exe                                        1   optional
 +modules\rosapps\demos\maze\maze.exe                                        1   optional
 +modules\rosapps\drivers\green\green.sys                                    2   optional
 +
 +; Rostests
 +modules\rostests\rosautotest\rosautotest.exe                               1   optional
 +modules\rostests\tests\pseh2\pseh2_test.exe                                7   optional
 +modules\rostests\winetests\advapi32\advapi32_winetest.exe                  7   optional
 +modules\rostests\winetests\advpack\advpack_winetest.exe                    7   optional
 +modules\rostests\winetests\browseui\browseui_winetest.exe                  7   optional
 +modules\rostests\winetests\cabinet\cabinet_winetest.exe                    7   optional
 +modules\rostests\winetests\comcat\comcat_winetest.exe                      7   optional
 +modules\rostests\winetests\comctl32\comctl32_winetest.exe                  7   optional
 +modules\rostests\winetests\comdlg32\comdlg32_winetest.exe                  7   optional
 +modules\rostests\winetests\crypt32\crypt32_winetest.exe                    7   optional
 +modules\rostests\winetests\cryptnet\cryptnet_winetest.exe                  7   optional
 +modules\rostests\winetests\dsound\dsound_winetest.exe                      7   optional
 +modules\rostests\winetests\gdi32\gdi32_winetest.exe                        7   optional
 +modules\rostests\winetests\gdiplus\gdiplus_winetest.exe                    7   optional
 +modules\rostests\winetests\hlink\hlink_winetest.exe                        7   optional
 +modules\rostests\winetests\icmp\icmp_winetest.exe                          7   optional
 +modules\rostests\winetests\iphlpapi\iphlpapi_winetest.exe                  7   optional
 +modules\rostests\winetests\jscript\jscript_winetest.exe                    7   optional
 +modules\rostests\winetests\kernel32\kernel32_winetest.exe                  7   optional
 +modules\rostests\winetests\lz32\lz32_winetest.exe                          7   optional
 +modules\rostests\winetests\mapi32\mapi32_winetest.exe                      7   optional
 +modules\rostests\winetests\mlang\mlang_winetest.exe                        7   optional
 +modules\rostests\winetests\mshtml\mshtml_winetest.exe                      7   optional
 +modules\rostests\winetests\msi\msi_winetest.exe                            7   optional
 +modules\rostests\winetests\mstask\mstask_winetest.exe                      7   optional
 +modules\rostests\winetests\msvcrt\msvcrt_winetest.exe                      7   optional
 +modules\rostests\winetests\msxml3\msxml3_winetest.exe                      7   optional
 +modules\rostests\winetests\netapi32\netapi32_winetest.exe                  7   optional
 +modules\rostests\winetests\ntdll\ntdll_winetest.exe                        7   optional
 +modules\rostests\winetests\odbccp32\odbccp32_winetest.exe                  7   optional
 +modules\rostests\winetests\ole32\ole32_winetest.exe                        7   optional
 +modules\rostests\winetests\oleaut32\oleaut32_winetest.exe                  7   optional
 +modules\rostests\winetests\powrprof\powrprof_winetest.exe                  7   optional
 +modules\rostests\winetests\psapi\psapi_winetest.exe                        7   optional
 +modules\rostests\winetests\riched20\riched20_winetest.exe                  7   optional
 +modules\rostests\winetests\rpcrt4\rpcrt4_winetest.exe                      7   optional
 +modules\rostests\winetests\rsabase\rsabase_winetest.exe                    7   optional
 +modules\rostests\winetests\rsaenh\rsaenh_winetest.exe                      7   optional
 +modules\rostests\winetests\schannel\schannel_winetest.exe                  7   optional
 +modules\rostests\winetests\secur32\secur32_winetest.exe                    7   optional
 +modules\rostests\winetests\setupapi\setupapi_winetest.exe                  7   optional
 +modules\rostests\winetests\shdocvw\shdocvw_winetest.exe                    7   optional
 +modules\rostests\winetests\shell32\shell32_winetest.exe                    7   optional
 +modules\rostests\winetests\shlwapi\shlwapi_winetest.exe                    7   optional
 +modules\rostests\winetests\urlmon\urlmon_winetest.exe                      7   optional
 +modules\rostests\winetests\user32\user32_winetest.exe                      7   optional
 +modules\rostests\winetests\usp10\usp10_winetest.exe                        7   optional
 +modules\rostests\winetests\uxtheme\uxtheme_winetest.exe                    7   optional
 +modules\rostests\winetests\version\version_winetest.exe                    7   optional
 +modules\rostests\winetests\winhttp\winhttp_winetest.exe                    7   optional
 +modules\rostests\winetests\wininet\wininet_winetest.exe                    7   optional
 +modules\rostests\winetests\winmm\winmm_winetest.exe                        7   optional
 +modules\rostests\winetests\wintrust\wintrust_winetest.exe                  7   optional
 +modules\rostests\winetests\wlanapi\wlanapi_winetest.exe                    7   optional
 +modules\rostests\winetests\ws2_32\ws2_32_winetest.exe                      7   optional
 +modules\rostests\winetests\xmllite\xmllite_winetest.exe                    7   optional
 +
 +
 +modules\wallpaper\Angelus_02_ROSWP.bmp                                     4   optional
@@@ -351,7 -351,7 +351,7 @@@ KeBugCheckEx
      IN ULONG_PTR  BugCheckParameter3,
      IN ULONG_PTR  BugCheckParameter4)
  {
-     char Buffer[64];
+     char Buffer[70];
      sprintf(Buffer, "*** STOP: 0x%08lX (0x%08lX, 0x%08lX, 0x%08lX, 0x%08lX)",
          BugCheckCode, BugCheckParameter1, BugCheckParameter2,
          BugCheckParameter3, BugCheckParameter4);
diff --combined dll/cpl/sysdm/general.c
@@@ -96,7 -96,16 +96,16 @@@ LRESULT CALLBACK RosImageProc(HWND hwnd
                                        // build new bitmap
                                        GetObject(pImgInfo->hBitmap, sizeof(BITMAP), &bitmap);
                                        dc = CreateCompatibleDC(GetDC(NULL));
+                                       if (dc == NULL)
+                                       {
+                                               break;
+                                       }
                                        sdc = CreateCompatibleDC(dc);
+                                       if (sdc == NULL)
+                                       {
+                                               DeleteDC(dc);
+                                               break;
+                                       }
                                        ncm.cbSize = sizeof(NONCLIENTMETRICS);
                                        SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &ncm, 0);
  
@@@ -46,9 -46,9 +46,9 @@@ BEGI
      EDITTEXT IDC_USER_GENERAL_FULL_NAME,77,43,168,13,ES_AUTOHSCROLL
      LTEXT "Beschreibung:", -1, 7, 64, 63, 8
      EDITTEXT IDC_USER_GENERAL_DESCRIPTION,77,61,168,13,ES_AUTOHSCROLL
-     AUTOCHECKBOX    "Benutzer muss das Passwort bei der ersten Anmeldung ändern",IDC_USER_GENERAL_FORCE_CHANGE,7,82,210,10
-     AUTOCHECKBOX    "Benutzer kann das Passwort nicht ändern",IDC_USER_GENERAL_CANNOT_CHANGE,7,95,210,10
-     AUTOCHECKBOX    "Passwort läuft nie ab",IDC_USER_GENERAL_NEVER_EXPIRES,7,108,210,10
+     AUTOCHECKBOX    "Benutzer muss das Passwort bei der ersten Anmeldung ändern",IDC_USER_GENERAL_FORCE_CHANGE,7,82,230,10
+     AUTOCHECKBOX    "Benutzer kann das Passwort nicht ändern",IDC_USER_GENERAL_CANNOT_CHANGE,7,95,210,10
+     AUTOCHECKBOX    "Passwort läuft nie ab",IDC_USER_GENERAL_NEVER_EXPIRES,7,108,210,10
      AUTOCHECKBOX    "Konto ist deativiert",IDC_USER_GENERAL_DISABLED,7,121,210,10
      AUTOCHECKBOX    "Konto ist gesperrt",IDC_USER_GENERAL_LOCKED,7,134,210,10
  END
@@@ -106,7 -106,7 +106,7 @@@ EN
  
  IDD_CHANGE_PASSWORD DIALOGEX DISCARDABLE  0, 0, 267, 74
  STYLE  DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT
- CAPTION "Passwort ändern"
+ CAPTION "Passwort ändern"
  FONT 8, "MS Shell Dlg"
  BEGIN
      EDITTEXT        IDC_EDIT_PASSWORD1,107,7,153,14,ES_AUTOHSCROLL | ES_PASSWORD
@@@ -126,16 -126,16 +126,16 @@@ BEGI
      EDITTEXT        IDC_USER_NEW_NAME,107,7,153,14,ES_AUTOHSCROLL
      RTEXT           "Benutzername:", -1,7,10,96,8
      EDITTEXT        IDC_USER_NEW_FULL_NAME,107,25,153,14,ES_AUTOHSCROLL
-     RTEXT           "Vollständiger Name:", -1,7,28,96,8
+     RTEXT           "Vollständiger Name:", -1,7,28,96,8
      EDITTEXT        IDC_USER_NEW_DESCRIPTION,107,43,153,14,ES_AUTOHSCROLL
      RTEXT           "Beschreibung:", -1,7,46,96,8
      EDITTEXT        IDC_USER_NEW_PASSWORD1,107,67,153,14,ES_AUTOHSCROLL | ES_PASSWORD
      RTEXT           "Passwort:", -1,7,70,96,8
      EDITTEXT        IDC_USER_NEW_PASSWORD2,107,85,153,14,ES_AUTOHSCROLL | ES_PASSWORD
      RTEXT           "Passwort wiederholen:", -1,7,88,96,8
-     AUTOCHECKBOX    "Benutzer muss das Passwort bei der ersten Anmeldung ändern",IDC_USER_NEW_FORCE_CHANGE,7,109,200,10
-     AUTOCHECKBOX    "Benutzer kann das Passwort nicht ändern",IDC_USER_NEW_CANNOT_CHANGE,7,123,200,10,WS_DISABLED
-     AUTOCHECKBOX    "Passwort läuft nie ab",IDC_USER_NEW_NEVER_EXPIRES,7,137,200,10,WS_DISABLED
+     AUTOCHECKBOX    "Benutzer muss das Passwort bei der ersten Anmeldung ändern",IDC_USER_NEW_FORCE_CHANGE,7,109,230,10
+     AUTOCHECKBOX    "Benutzer kann das Passwort nicht ändern",IDC_USER_NEW_CANNOT_CHANGE,7,123,200,10,WS_DISABLED
+     AUTOCHECKBOX    "Passwort läuft nie ab",IDC_USER_NEW_NEVER_EXPIRES,7,137,200,10,WS_DISABLED
      AUTOCHECKBOX    "Konto ist deaktiviert",IDC_USER_NEW_DISABLED,7,151,200,10
      DEFPUSHBUTTON   "OK",IDOK,156,179,50,14,WS_DISABLED
      PUSHBUTTON      "Abbrechen",IDCANCEL,210,179,50,14
@@@ -179,9 -179,9 +179,9 @@@ BEGI
      END
      POPUP ""
      BEGIN
-         MENUITEM "Mitglied hinzufügen", IDM_GROUP_ADD_MEMBER, GRAYED
+         MENUITEM "Mitglied hinzufügen", IDM_GROUP_ADD_MEMBER, GRAYED
          MENUITEM SEPARATOR
-         MENUITEM "Löschen", IDM_GROUP_DELETE
+         MENUITEM "Löschen", IDM_GROUP_DELETE
          MENUITEM "Umbenennen", IDM_GROUP_RENAME
          MENUITEM SEPARATOR
          MENUITEM "Eigenschaften", IDM_GROUP_PROPERTIES
@@@ -197,9 -197,9 +197,9 @@@ BEGI
      END
      POPUP ""
      BEGIN
-         MENUITEM "Passwort ändern", IDM_USER_CHANGE_PASSWORD
+         MENUITEM "Passwort ändern", IDM_USER_CHANGE_PASSWORD
          MENUITEM SEPARATOR
-         MENUITEM "Löschen", IDM_USER_DELETE
+         MENUITEM "Löschen", IDM_USER_DELETE
          MENUITEM "Umbenennen", IDM_USER_RENAME
          MENUITEM SEPARATOR
          MENUITEM "Eigenschaften", IDM_USER_PROPERTIES
@@@ -9,7 -9,9 +9,9 @@@
  
  #include "precomp.h"
  
+ #ifndef _MSC_VER
  const GUID IID_IKsPropertySet = {0x31efac30, 0x515c, 0x11d0, {0xa9,0xaa, 0x00,0xaa,0x00,0x61,0xbe,0x93}};
+ #endif
  
  class CControlNode : public IUnknown
  {
@@@ -32,12 -34,12 +34,12 @@@ public
          return m_Ref;
      }
  
-     CControlNode(HANDLE hFile, ULONG NodeType, ULONG PinId) : m_Ref(0), m_hFile(hFile), m_NodeType(NodeType), m_PinId(PinId){};
+     CControlNode(IKsPropertySet * pProperty, ULONG NodeType, ULONG PinId) : m_Ref(0), m_pKsProperty(pProperty), m_NodeType(NodeType), m_PinId(PinId){};
      virtual ~CControlNode(){};
  
  protected:
      LONG m_Ref;
-     HANDLE m_hFile;
+     IKsPropertySet * m_pKsProperty;
      ULONG m_NodeType;
      ULONG m_PinId;
  };
@@@ -58,19 -60,19 +60,19 @@@ CControlNode::QueryInterface
      }
      else if(IsEqualGUID(refiid, IID_IBDA_FrequencyFilter))
      {
-         return CBDAFrequencyFilter_fnConstructor(m_hFile, m_NodeType, refiid, Output);
+         return CBDAFrequencyFilter_fnConstructor(m_pKsProperty, m_NodeType, refiid, Output);
      }
      else if(IsEqualGUID(refiid, IID_IBDA_SignalStatistics))
      {
-         return CBDASignalStatistics_fnConstructor(m_hFile, m_NodeType, refiid, Output);
+         return CBDASignalStatistics_fnConstructor(m_pKsProperty, m_NodeType, refiid, Output);
      }
      else if(IsEqualGUID(refiid, IID_IBDA_LNBInfo))
      {
-         return CBDALNBInfo_fnConstructor(m_hFile, m_NodeType, refiid, Output);
+         return CBDALNBInfo_fnConstructor(m_pKsProperty, m_NodeType, refiid, Output);
      }
      else if(IsEqualGUID(refiid, IID_IBDA_DigitalDemodulator))
      {
-         return CBDADigitalDemodulator_fnConstructor(m_hFile, m_NodeType, refiid, Output);
+         return CBDADigitalDemodulator_fnConstructor(m_pKsProperty, m_NodeType, refiid, Output);
      }
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[MAX_PATH];
@@@ -88,7 -90,6 +90,6 @@@
  HRESULT
  WINAPI
  CControlNode_fnConstructor(
-     HANDLE hFile,
      IBaseFilter * pFilter,
      ULONG NodeType,
      ULONG PinId,
@@@ -98,7 -99,7 +99,7 @@@
      WCHAR Buffer[100];
      HRESULT hr;
      IPin * pPin = NULL;
-     IKsObject * pObject = NULL;
+     IKsPropertySet * pProperty;
  
      // store pin id
      swprintf(Buffer, L"%u", PinId);
          return hr;
      }
  
-     // query IKsObject interface
-     hr = pPin->QueryInterface(IID_IKsObject, (void**)&pObject);
+     // query for IKsPropertySet interface
+     hr = pPin->QueryInterface(IID_IKsPropertySet, (void**)&pProperty);
+     if (FAILED(hr))
+         return hr;
  
  #ifdef BDAPLGIN_TRACE
      swprintf(Buffer, L"CControlNode_fnConstructor get IID_IKsObject status %lx\n", hr);
      OutputDebugStringW(Buffer);
  #endif
  
-     if (SUCCEEDED(hr))
-     {
-         // get pin handle
-         hFile = pObject->KsGetObjectHandle();
-         // release IKsObject interface
-         pObject->Release();
-     }
      // release IPin interface
      pPin->Release();
  
      // construct device control
-     CControlNode * handler = new CControlNode(hFile, NodeType, PinId);
+     CControlNode * handler = new CControlNode(pProperty, NodeType, PinId);
  
  #ifdef BDAPLGIN_TRACE
      OutputDebugStringW(L"CControlNode_fnConstructor\n");
@@@ -9,20 -9,24 +9,24 @@@
  
  #include "precomp.h"
  
- const GUID CLSID_DVBTNetworkProvider = {0x216c62df, 0x6d7f, 0x4e9a, {0x85, 0x71, 0x5, 0xf1, 0x4e, 0xdb, 0x76, 0x6a}};
- const GUID IID_IAC3Filter         = {0xe4539501, 0xc609, 0x46ea, {0xad, 0x2a, 0x0e, 0x97, 0x00, 0x24, 0x56, 0x83}};
- const GUID IID_IAsyncReader       = {0x56A868AA, 0x0AD4, 0x11CE, {0xB0, 0x3A, 0x00, 0x20, 0xAF, 0x0B, 0xA7, 0x70}};
- const GUID IID_IMatrixMixer       = {0xafc57835, 0x2fd1, 0x4541, {0xa6, 0xd9, 0x0d, 0xb7, 0x18, 0x56, 0xe5, 0x89}};
- const GUID IID_IBDA_NetworkProvider   = {0xfd501041, 0x8ebe, 0x11ce, {0x81, 0x83, 0x00, 0xaa, 0x00, 0x57, 0x7d, 0xa2}};
- const GUID IID_IAMOpenProgress    = {0x8E1C39A1, 0xDE53, 0x11cf, {0xAA, 0x63, 0x00, 0x80, 0xC7, 0x44, 0x52, 0x8D}};
- const GUID IID_IDistributorNotify = {0x56a868af, 0x0ad4, 0x11ce, {0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
- const GUID IID_IBDA_DeviceControl = {0xFD0A5AF3, 0xB41D, 0x11d2, {0x9C, 0x95, 0x00, 0xC0, 0x4F, 0x79, 0x71, 0xE0}};
- const GUID IID_IBDA_Topology      = {0x79B56888, 0x7FEA, 0x4690, {0xB4, 0x5D, 0x38, 0xFD, 0x3C, 0x78, 0x49, 0xBE}};
  const GUID IID_IKsObject           = {0x423c13a2, 0x2070, 0x11d0, {0x9e, 0xf7, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1}};
+ #ifndef _MSC_VER
+ const GUID CLSID_DVBTNetworkProvider = {0x216c62df, 0x6d7f, 0x4e9a, {0x85, 0x71, 0x5, 0xf1, 0x4e, 0xdb, 0x76, 0x6a}};
  const GUID KSPROPSETID_BdaTopology = {0xa14ee835, 0x0a23, 0x11d3, {0x9c, 0xc7, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0}};
  const GUID KSMETHODSETID_BdaDeviceConfiguration = {0x71985f45, 0x1ca1, 0x11d3, {0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0}};
- const GUID IID_IBaseFilter         = {0x56a86895, 0x0ad4, 0x11ce, {0xb0,0x3a, 0x00,0x20,0xaf,0x0b,0xa7,0x70}};
  const GUID KSMETHODSETID_BdaChangeSync = {0xfd0a5af3, 0xb41d, 0x11d2, {0x9c, 0x95, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0}};
+ const GUID IID_IBaseFilter         = {0x56a86895, 0x0ad4, 0x11ce, {0xb0,0x3a, 0x00,0x20,0xaf,0x0b,0xa7,0x70}};
+ const GUID IID_IAsyncReader       = {0x56A868AA, 0x0AD4, 0x11CE, {0xB0, 0x3A, 0x00, 0x20, 0xAF, 0x0B, 0xA7, 0x70}};
+ const GUID IID_IAMOpenProgress    = {0x8E1C39A1, 0xDE53, 0x11cf, {0xAA, 0x63, 0x00, 0x80, 0xC7, 0x44, 0x52, 0x8D}};
+ const GUID IID_IBDA_Topology      = {0x79B56888, 0x7FEA, 0x4690, {0xB4, 0x5D, 0x38, 0xFD, 0x3C, 0x78, 0x49, 0xBE}};
+ const GUID IID_IBDA_NetworkProvider   = {0xfd501041, 0x8ebe, 0x11ce, {0x81, 0x83, 0x00, 0xaa, 0x00, 0x57, 0x7d, 0xa2}};
+ const GUID IID_IBDA_DeviceControl = {0xFD0A5AF3, 0xB41D, 0x11d2, {0x9C, 0x95, 0x00, 0xC0, 0x4F, 0x79, 0x71, 0xE0}};
+ const GUID IID_IDistributorNotify = {0x56a868af, 0x0ad4, 0x11ce, {0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
+ #endif
  
  class CBDADeviceControl : public IBDA_DeviceControl,
                            public IBDA_Topology
@@@ -468,15 -472,15 +472,15 @@@ CBDADeviceControl::GetControlNode(ULON
      hr = KsSynchronousDeviceControl(m_Handle, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSP_BDA_NODE_PIN) + sizeof(ULONG), &PinId, sizeof(ULONG), &BytesReturned);
  
  #ifdef BDAPLGIN_TRACE
-     WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDADeviceControl::GetControlNode: hr %lx, BytesReturned %lu PinId %lu\n", hr, BytesReturned, PinId);
+     WCHAR Buffer[200];
+     swprintf(Buffer, L"CBDADeviceControl::GetControlNode: hr %lx, BytesReturned %lu PinId %lu ulInputPinId %lu ulOutputPinId %lu ulNodeType %lu\n", hr, BytesReturned, PinId, ulInputPinId, ulOutputPinId, ulNodeType);
      OutputDebugStringW(Buffer);
  #endif
  
      if (FAILED(hr))
          return hr;
  
-     hr = CControlNode_fnConstructor(m_Handle, m_pFilter, ulNodeType, PinId, IID_IUnknown, (LPVOID*)ppControlNode);
+     hr = CControlNode_fnConstructor(m_pFilter, ulNodeType, PinId, IID_IUnknown, (LPVOID*)ppControlNode);
  
  #ifdef BDAPLGIN_TRACE
      swprintf(Buffer, L"CBDADeviceControl::GetControlNode: hr %lx\n", hr);
@@@ -9,8 -9,10 +9,10 @@@
  
  #include "precomp.h"
  
+ #ifndef _MSC_VER
  const GUID IID_IBDA_DigitalDemodulator = {0xef30f379, 0x985b, 0x4d10, {0xb6, 0x40, 0xa7, 0x9d, 0x5e, 0x04, 0xe1, 0xe0}};
  const GUID KSPROPSETID_BdaDigitalDemodulator = {0xef30f379, 0x985b, 0x4d10, {0xb6, 0x40, 0xa7, 0x9d, 0x5e, 0x4, 0xe1, 0xe0}};
+ #endif
  
  class CBDADigitalDemodulator : public IBDA_DigitalDemodulator
  {
@@@ -48,12 -50,12 +50,12 @@@ public
      HRESULT STDMETHODCALLTYPE put_SpectralInversion(SpectralInversion *pSpectralInversion);
      HRESULT STDMETHODCALLTYPE get_SpectralInversion(SpectralInversion *pSpectralInversion);
  
-     CBDADigitalDemodulator(HANDLE hFile, ULONG NodeId) : m_Ref(0), m_hFile(hFile), m_NodeId(NodeId){};
+     CBDADigitalDemodulator(IKsPropertySet * pProperty, ULONG NodeId) : m_Ref(0), m_pProperty(pProperty), m_NodeId(NodeId){};
      ~CBDADigitalDemodulator(){};
  
  protected:
      LONG m_Ref;
-     HANDLE m_hFile;
+     IKsPropertySet * m_pProperty;
      ULONG m_NodeId;
  };
  
@@@ -86,6 -88,7 +88,7 @@@ CBDADigitalDemodulator::QueryInterface
      swprintf(Buffer, L"CBDADigitalDemodulator::QueryInterface: NoInterface for %s", lpstr);
      OutputDebugStringW(Buffer);
      CoTaskMemFree(lpstr);
+ DebugBreak();
  #endif
  
      return E_NOINTERFACE;
@@@ -98,20 -101,17 +101,17 @@@ CBDADigitalDemodulator::put_ModulationT
      KSP_NODE Node;
      HRESULT hr;
  
-     ULONG BytesReturned;
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaDigitalDemodulator;
-     Node.Property.Id = KSPROPERTY_BDA_MODULATION_TYPE;
-     Node.Property.Flags = KSPROPERTY_TYPE_TOPOLOGY | KSPROPERTY_TYPE_SET;
      Node.NodeId = m_NodeId;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), pModulationType, sizeof(ModulationType), &BytesReturned);
+     hr = m_pProperty->Set(KSPROPSETID_BdaDigitalDemodulator, KSPROPERTY_BDA_MODULATION_TYPE, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), pModulationType, sizeof(ModulationType));
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDADigitalDemodulator::put_ModulationType: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
+     swprintf(Buffer, L"CBDADigitalDemodulator::put_ModulationType: pModulationType %lu hr %lx\n", *pModulationType, hr);
      OutputDebugStringW(Buffer);
  #endif
  
@@@ -131,20 -131,18 +131,18 @@@ CBDADigitalDemodulator::put_InnerFECMet
  {
      KSP_NODE Node;
      HRESULT hr;
-     ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaDigitalDemodulator;
-     Node.Property.Id = KSPROPERTY_BDA_INNER_FEC_TYPE;
-     Node.Property.Flags = KSPROPERTY_TYPE_TOPOLOGY | KSPROPERTY_TYPE_SET;
      Node.NodeId = m_NodeId;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), pFECMethod, sizeof(FECMethod), &BytesReturned);
+     hr = m_pProperty->Set(KSPROPSETID_BdaDigitalDemodulator, KSPROPERTY_BDA_INNER_FEC_TYPE, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), pFECMethod, sizeof(FECMethod));
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDADigitalDemodulator::put_InnerFECMethod: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
+     swprintf(Buffer, L"CBDADigitalDemodulator::put_InnerFECMethod: pFECMethod %lu hr %lx\n", *pFECMethod, hr);
      OutputDebugStringW(Buffer);
  #endif
  
@@@ -165,20 -163,16 +163,16 @@@ CBDADigitalDemodulator::put_InnerFECRat
      KSP_NODE Node;
      HRESULT hr;
  
-     ULONG BytesReturned;
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaDigitalDemodulator;
-     Node.Property.Id = KSPROPERTY_BDA_INNER_FEC_RATE;
-     Node.Property.Flags = KSPROPERTY_TYPE_TOPOLOGY | KSPROPERTY_TYPE_SET;
      Node.NodeId = m_NodeId;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), pFECRate, sizeof(BinaryConvolutionCodeRate), &BytesReturned);
+     hr = m_pProperty->Set(KSPROPSETID_BdaDigitalDemodulator, KSPROPERTY_BDA_INNER_FEC_RATE, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), pFECRate, sizeof(BinaryConvolutionCodeRate));
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDADigitalDemodulator::put_InnerFECRate: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
+     swprintf(Buffer, L"CBDADigitalDemodulator::put_InnerFECRate: pFECRate %lu hr %lx\n", *pFECRate, hr);
      OutputDebugStringW(Buffer);
  #endif
  
@@@ -198,20 -192,17 +192,17 @@@ CBDADigitalDemodulator::put_OuterFECMet
  {
      KSP_NODE Node;
      HRESULT hr;
-     ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaDigitalDemodulator;
-     Node.Property.Id = KSPROPERTY_BDA_OUTER_FEC_TYPE;
-     Node.Property.Flags = KSPROPERTY_TYPE_TOPOLOGY | KSPROPERTY_TYPE_SET;
      Node.NodeId = m_NodeId;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), pFECMethod, sizeof(FECMethod), &BytesReturned);
+     hr = m_pProperty->Set(KSPROPSETID_BdaDigitalDemodulator, KSPROPERTY_BDA_OUTER_FEC_TYPE, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), pFECMethod, sizeof(FECMethod));
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDADigitalDemodulator::put_OuterFECMethod: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
+     swprintf(Buffer, L"CBDADigitalDemodulator::put_OuterFECMethod: pFECMethod %lu hr %lx\n", *pFECMethod, hr);
      OutputDebugStringW(Buffer);
  #endif
  
@@@ -232,20 -223,16 +223,16 @@@ CBDADigitalDemodulator::put_OuterFECRat
      KSP_NODE Node;
      HRESULT hr;
  
-     ULONG BytesReturned;
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaDigitalDemodulator;
-     Node.Property.Id = KSPROPERTY_BDA_OUTER_FEC_RATE;
-     Node.Property.Flags = KSPROPERTY_TYPE_TOPOLOGY | KSPROPERTY_TYPE_SET;
      Node.NodeId = m_NodeId;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), pFECRate, sizeof(BinaryConvolutionCodeRate), &BytesReturned);
+     hr = m_pProperty->Set(KSPROPSETID_BdaDigitalDemodulator, KSPROPERTY_BDA_OUTER_FEC_RATE, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), pFECRate, sizeof(BinaryConvolutionCodeRate));
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDADigitalDemodulator::put_OuterFECRate: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
+     swprintf(Buffer, L"CBDADigitalDemodulator::put_OuterFECRate: pFECRate %lu hr %lx\n", *pFECRate, hr);
      OutputDebugStringW(Buffer);
  #endif
  
@@@ -265,20 -252,17 +252,17 @@@ CBDADigitalDemodulator::put_SymbolRate(
  {
      KSP_NODE Node;
      HRESULT hr;
-     ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaDigitalDemodulator;
-     Node.Property.Id = KSPROPERTY_BDA_SYMBOL_RATE;
-     Node.Property.Flags = KSPROPERTY_TYPE_TOPOLOGY | KSPROPERTY_TYPE_SET;
      Node.NodeId = m_NodeId;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), pSymbolRate, sizeof(ULONG), &BytesReturned);
+     hr = m_pProperty->Set(KSPROPSETID_BdaDigitalDemodulator, KSPROPERTY_BDA_SYMBOL_RATE, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), pSymbolRate, sizeof(ULONG));
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDADigitalDemodulator::put_SymbolRate: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
+     swprintf(Buffer, L"CBDADigitalDemodulator::put_SymbolRate: pSymbolRate %lu hr %lx\n", *pSymbolRate, hr);
      OutputDebugStringW(Buffer);
  #endif
  
@@@ -298,20 -282,17 +282,17 @@@ CBDADigitalDemodulator::put_SpectralInv
  {
      KSP_NODE Node;
      HRESULT hr;
-     ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaDigitalDemodulator;
-     Node.Property.Id = KSPROPERTY_BDA_SPECTRAL_INVERSION;
-     Node.Property.Flags = KSPROPERTY_TYPE_TOPOLOGY | KSPROPERTY_TYPE_SET;
      Node.NodeId = m_NodeId;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), pSpectralInversion, sizeof(SpectralInversion), &BytesReturned);
+     hr = m_pProperty->Set(KSPROPSETID_BdaDigitalDemodulator, KSPROPERTY_BDA_SPECTRAL_INVERSION, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), pSpectralInversion, sizeof(SpectralInversion));
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDADigitalDemodulator::put_SpectralInversion: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
+     swprintf(Buffer, L"CBDADigitalDemodulator::put_SpectralInversion: pSpectralInversion %lu hr %lx\n", *pSpectralInversion, hr);
      OutputDebugStringW(Buffer);
  #endif
  
@@@ -329,13 -310,13 +310,13 @@@ CBDADigitalDemodulator::get_SpectralInv
  HRESULT
  WINAPI
  CBDADigitalDemodulator_fnConstructor(
-     HANDLE hFile,
+     IKsPropertySet * pProperty,
      ULONG NodeId,
      REFIID riid,
      LPVOID * ppv)
  {
      // construct device control
-     CBDADigitalDemodulator * handler = new CBDADigitalDemodulator(hFile, NodeId);
+     CBDADigitalDemodulator * handler = new CBDADigitalDemodulator(pProperty, NodeId);
  
  #ifdef BDAPLGIN_TRACE
      OutputDebugStringW(L"CBDADigitalDemodulator_fnConstructor\n");
@@@ -9,8 -9,10 +9,10 @@@
  
  #include "precomp.h"
  
+ #ifndef _MSC_VER
  const GUID IID_IBDA_FrequencyFilter = {0x71985f47, 0x1ca1, 0x11d3, {0x9c, 0xc8, 0x00, 0xc0, 0x4f, 0x79, 0x71, 0xe0}};
  const GUID KSPROPSETID_BdaFrequencyFilter = {0x71985f47, 0x1ca1, 0x11d3, {0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0}};
+ #endif
  
  class CBDAFrequencyFilter : public IBDA_FrequencyFilter
  {
@@@ -46,12 -48,12 +48,12 @@@ public
      HRESULT STDMETHODCALLTYPE put_FrequencyMultiplier(ULONG ulMultiplier);
      HRESULT STDMETHODCALLTYPE get_FrequencyMultiplier(ULONG *pulMultiplier);
  
-     CBDAFrequencyFilter(HANDLE hFile, ULONG NodeId) : m_Ref(0), m_hFile(hFile), m_NodeId(NodeId){};
+     CBDAFrequencyFilter(IKsPropertySet * pProperty, ULONG NodeId) : m_Ref(0), m_pProperty(pProperty), m_NodeId(NodeId){};
      virtual ~CBDAFrequencyFilter(){};
  
  protected:
      LONG m_Ref;
-     HANDLE m_hFile;
+     IKsPropertySet * m_pProperty;
      ULONG m_NodeId;
  };
  
@@@ -84,6 -86,7 +86,7 @@@ CBDAFrequencyFilter::QueryInterface
      swprintf(Buffer, L"CControlNode::QueryInterface: NoInterface for %s", lpstr);
      OutputDebugStringW(Buffer);
      CoTaskMemFree(lpstr);
+ DebugBreak();
  #endif
  
      return E_NOINTERFACE;
@@@ -110,20 -113,16 +113,16 @@@ CBDAFrequencyFilter::put_Frequency(ULON
      KSP_NODE Node;
      HRESULT hr;
  
-     ULONG BytesReturned;
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaFrequencyFilter;
-     Node.Property.Id = KSPROPERTY_BDA_RF_TUNER_FREQUENCY;
-     Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
      Node.NodeId = m_NodeId;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), &ulFrequency, sizeof(ULONG), &BytesReturned);
+     hr = m_pProperty->Set(KSPROPSETID_BdaFrequencyFilter, KSPROPERTY_BDA_RF_TUNER_FREQUENCY, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &ulFrequency, sizeof(ULONG));
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDAFrequencyFilter::put_Frequency: m_NodeId %lu hr %lx, BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+     swprintf(Buffer, L"CBDAFrequencyFilter::put_Frequency: m_NodeId %lu ulFrequency %lu hr %lx\n", m_NodeId, ulFrequency, hr);
      OutputDebugStringW(Buffer);
  #endif
  
@@@ -143,20 -142,17 +142,17 @@@ CBDAFrequencyFilter::put_Polarity(Polar
  {
      KSP_NODE Node;
      HRESULT hr;
-     ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaFrequencyFilter;
-     Node.Property.Id = KSPROPERTY_BDA_RF_TUNER_POLARITY;
-     Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
      Node.NodeId = m_NodeId;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), &Polarity, sizeof(Polarisation), &BytesReturned);
+     hr = m_pProperty->Set(KSPROPSETID_BdaFrequencyFilter, KSPROPERTY_BDA_RF_TUNER_POLARITY, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &Polarity, sizeof(Polarisation));
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDAFrequencyFilter::put_Polarity: m_NodeId %lu hr %lx, BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+     swprintf(Buffer, L"CBDAFrequencyFilter::put_Polarity: m_NodeId %lu Polarity %lu hr %lx\n", m_NodeId, Polarity, hr);
      OutputDebugStringW(Buffer);
  #endif
  
@@@ -176,20 -172,17 +172,17 @@@ CBDAFrequencyFilter::put_Range(ULONG ul
  {
      KSP_NODE Node;
      HRESULT hr;
-     ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaFrequencyFilter;
-     Node.Property.Id = KSPROPERTY_BDA_RF_TUNER_RANGE;
-     Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
      Node.NodeId = m_NodeId;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), &ulRange, sizeof(ULONG), &BytesReturned);
+     hr = m_pProperty->Set(KSPROPSETID_BdaFrequencyFilter, KSPROPERTY_BDA_RF_TUNER_RANGE, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &ulRange, sizeof(ULONG));
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDAFrequencyFilter::put_Polarity: m_NodeId %lu hr %lx, BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+     swprintf(Buffer, L"CBDAFrequencyFilter::put_Range: m_NodeId %lu ulRange %lu hr %lx\n", m_NodeId, ulRange, hr);
      OutputDebugStringW(Buffer);
  #endif
  
@@@ -209,20 -202,17 +202,17 @@@ CBDAFrequencyFilter::put_Bandwidth(ULON
  {
      KSP_NODE Node;
      HRESULT hr;
-     ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaFrequencyFilter;
-     Node.Property.Id = KSPROPERTY_BDA_RF_TUNER_BANDWIDTH;
-     Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
      Node.NodeId = m_NodeId;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), &ulBandwidth, sizeof(ULONG), &BytesReturned);
+     hr = m_pProperty->Set(KSPROPSETID_BdaFrequencyFilter, KSPROPERTY_BDA_RF_TUNER_BANDWIDTH, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &ulBandwidth, sizeof(ULONG));
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDAFrequencyFilter::put_Bandwidth: m_NodeId %lu hr %lx, BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+     swprintf(Buffer, L"CBDAFrequencyFilter::put_Bandwidth: m_NodeId %lu ulBandwidth %lu hr %lx\n", m_NodeId, ulBandwidth, hr);
      OutputDebugStringW(Buffer);
  #endif
  
@@@ -241,20 -231,17 +231,17 @@@ CBDAFrequencyFilter::put_FrequencyMulti
  {
      KSP_NODE Node;
      HRESULT hr;
-     ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaFrequencyFilter;
-     Node.Property.Id = KSPROPERTY_BDA_RF_TUNER_FREQUENCY_MULTIPLIER;
-     Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
      Node.NodeId = m_NodeId;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), &ulMultiplier, sizeof(ULONG), &BytesReturned);
+     hr = m_pProperty->Set(KSPROPSETID_BdaFrequencyFilter, KSPROPERTY_BDA_RF_TUNER_FREQUENCY_MULTIPLIER, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &ulMultiplier, sizeof(ULONG));
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDAFrequencyFilter::put_FrequencyMultiplier: m_NodeId %lu hr %lx, BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+     swprintf(Buffer, L"CBDAFrequencyFilter::put_FrequencyMultiplier: m_NodeId %lu ulMultiplier %lu hr %lx\n", m_NodeId, ulMultiplier, hr);
      OutputDebugStringW(Buffer);
  #endif
  
@@@ -271,13 -258,13 +258,13 @@@ CBDAFrequencyFilter::get_FrequencyMulti
  HRESULT
  WINAPI
  CBDAFrequencyFilter_fnConstructor(
-     HANDLE hFile,
+     IKsPropertySet* pProperty,
      ULONG NodeId,
      REFIID riid,
      LPVOID * ppv)
  {
      // construct device control
-     CBDAFrequencyFilter * handler = new CBDAFrequencyFilter(hFile, NodeId);
+     CBDAFrequencyFilter * handler = new CBDAFrequencyFilter(pProperty, NodeId);
  
  #ifdef BDAPLGIN_TRACE
      OutputDebugStringW(L"CBDAFrequencyFilter_fnConstructor\n");
@@@ -9,8 -9,10 +9,10 @@@
  
  #include "precomp.h"
  
+ #ifndef _MSC_VER
  const GUID IID_IBDA_LNBInfo = {0x992cf102, 0x49f9, 0x4719, {0xa6, 0x64,  0xc4, 0xf2, 0x3e, 0x24, 0x08, 0xf4}};
  const GUID KSPROPSETID_BdaLNBInfo = {0x992cf102, 0x49f9, 0x4719, {0xa6, 0x64, 0xc4, 0xf2, 0x3e, 0x24, 0x8, 0xf4}};
+ #endif
  
  class CBDALNBInfo : public IBDA_LNBInfo
  {
@@@ -41,12 -43,12 +43,12 @@@ public
      HRESULT STDMETHODCALLTYPE put_HighLowSwitchFrequency(ULONG ulSwitchFrequency);
      HRESULT STDMETHODCALLTYPE get_HighLowSwitchFrequency(ULONG *pulSwitchFrequency);
  
-     CBDALNBInfo(HANDLE hFile, ULONG NodeId) : m_Ref(0), m_hFile(hFile), m_NodeId(NodeId){};
+     CBDALNBInfo(IKsPropertySet *pProperty, ULONG NodeId) : m_Ref(0), m_pProperty(pProperty), m_NodeId(NodeId){};
      ~CBDALNBInfo(){};
  
  protected:
      LONG m_Ref;
-     HANDLE m_hFile;
+     IKsPropertySet * m_pProperty;
      ULONG m_NodeId;
  };
  
@@@ -90,20 -92,17 +92,17 @@@ CBDALNBInfo::put_LocalOscilatorFrequenc
  {
      KSP_NODE Node;
      HRESULT hr;
-     ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaLNBInfo;
-     Node.Property.Id = KSPROPERTY_BDA_LNB_LOF_LOW_BAND;
-     Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
      Node.NodeId = m_NodeId;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), &ulLOFLow, sizeof(ULONG), &BytesReturned);
+     hr = m_pProperty->Set(KSPROPSETID_BdaLNBInfo, KSPROPERTY_BDA_LNB_LOF_LOW_BAND, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &ulLOFLow, sizeof(LONG));
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDALNBInfo::put_LocalOscilatorFrequencyLowBand: m_NodeId %lu hr %lx, BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+     swprintf(Buffer, L"CBDALNBInfo::put_LocalOscilatorFrequencyLowBand: m_NodeId %lu ulLOFLow %lu hr %lx\n", m_NodeId, ulLOFLow, hr);
      OutputDebugStringW(Buffer);
  #endif
  
@@@ -123,20 -122,17 +122,17 @@@ CBDALNBInfo::put_LocalOscilatorFrequenc
  {
      KSP_NODE Node;
      HRESULT hr;
-     ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaLNBInfo;
-     Node.Property.Id = KSPROPERTY_BDA_LNB_LOF_HIGH_BAND;
-     Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
      Node.NodeId = m_NodeId;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), &ulLOFHigh, sizeof(ULONG), &BytesReturned);
+     hr = m_pProperty->Set(KSPROPSETID_BdaLNBInfo, KSPROPERTY_BDA_LNB_LOF_HIGH_BAND, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &ulLOFHigh, sizeof(ULONG));
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDALNBInfo::put_LocalOscilatorFrequencyHighBand: m_NodeId %lu hr %lx, BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+     swprintf(Buffer, L"CBDALNBInfo::put_LocalOscilatorFrequencyHighBand: m_NodeId %lu ulLOFHigh %lu hr %lx\n", m_NodeId, ulLOFHigh, hr);
      OutputDebugStringW(Buffer);
  #endif
  
@@@ -156,20 -152,17 +152,17 @@@ CBDALNBInfo::put_HighLowSwitchFrequency
  {
      KSP_NODE Node;
      HRESULT hr;
-     ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaLNBInfo;
-     Node.Property.Id = KSPROPERTY_BDA_LNB_SWITCH_FREQUENCY;
-     Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
      Node.NodeId = m_NodeId;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), &ulSwitchFrequency, sizeof(ULONG), &BytesReturned);
+     hr = m_pProperty->Set(KSPROPSETID_BdaLNBInfo, KSPROPERTY_BDA_LNB_SWITCH_FREQUENCY, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &ulSwitchFrequency, sizeof(ULONG));
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDALNBInfo::put_HighLowSwitchFrequency: m_NodeId %lu hr %lx, BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+     swprintf(Buffer, L"CBDALNBInfo::put_HighLowSwitchFrequency: m_NodeId %lu ulSwitchFrequency %lu hr %lx\n", m_NodeId, ulSwitchFrequency, hr);
      OutputDebugStringW(Buffer);
  #endif
  
@@@ -186,13 -179,13 +179,13 @@@ CBDALNBInfo::get_HighLowSwitchFrequency
  HRESULT
  WINAPI
  CBDALNBInfo_fnConstructor(
-     HANDLE hFile,
+     IKsPropertySet *pProperty,
      ULONG NodeId,
      REFIID riid,
      LPVOID * ppv)
  {
      // construct device control
-     CBDALNBInfo * handler = new CBDALNBInfo(hFile, NodeId);
+     CBDALNBInfo * handler = new CBDALNBInfo(pProperty, NodeId);
  
  #ifdef BDAPLGIN_TRACE
      OutputDebugStringW(L"CBDALNBInfo_fnConstructor\n");
@@@ -9,9 -9,12 +9,12 @@@
  
  #include "precomp.h"
  
- const GUID IID_IBDA_PinControl       = {0x0DED49D5, 0xA8B7, 0x4d5d, {0x97, 0xA1, 0x12, 0xB0, 0xC1, 0x95, 0x87, 0x4D}};
+ #ifndef _MSC_VER
  const GUID KSPROPSETID_BdaPinControl = {0x0ded49d5, 0xa8b7, 0x4d5d, {0x97, 0xa1, 0x12, 0xb0, 0xc1, 0x95, 0x87, 0x4d}};
+ const GUID IID_IBDA_PinControl       = {0x0DED49D5, 0xA8B7, 0x4d5d, {0x97, 0xA1, 0x12, 0xB0, 0xC1, 0x95, 0x87, 0x4D}};
  const GUID IID_IPin = {0x56a86891, 0x0ad4, 0x11ce, {0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
+ #endif
  
  class CBDAPinControl : public IBDA_PinControl
  {
@@@ -39,7 -42,7 +42,7 @@@ public
      HRESULT STDMETHODCALLTYPE RegistrationContext(ULONG *pulRegistrationCtx);
  
  
-     CBDAPinControl(HANDLE hFile, IBDA_NetworkProvider * pProvider, IPin * pConnectedPin) : m_Ref(0), m_Handle(hFile), m_pProvider(pProvider), m_pConnectedPin(pConnectedPin){};
+     CBDAPinControl(HANDLE hFile, IBDA_NetworkProvider * pProvider, IPin * pConnectedPin, ULONG RegistrationCtx) : m_Ref(0), m_Handle(hFile), m_pProvider(pProvider), m_pConnectedPin(pConnectedPin), m_RegistrationCtx(RegistrationCtx){};
      virtual ~CBDAPinControl()
      {
          //m_pConnectedPin->Release();
@@@ -51,6 -54,7 +54,7 @@@ protected
      HANDLE m_Handle;
      IBDA_NetworkProvider * m_pProvider;
      IPin * m_pConnectedPin;
+     ULONG m_RegistrationCtx;
  };
  
  HRESULT
@@@ -72,16 -76,7 +76,7 @@@ CBDAPinControl::QueryInterface
          reinterpret_cast<IBDA_PinControl*>(*Output)->AddRef();
          return NOERROR;
      }
- #ifdef BDAPLGIN_TRACE
-     WCHAR Buffer[MAX_PATH];
-     LPOLESTR lpstr;
-     StringFromCLSID(refiid, &lpstr);
-     swprintf(Buffer, L"CBDAPinControl::QueryInterface: NoInterface for %s", lpstr);
-     OutputDebugStringW(Buffer);
-     CoTaskMemFree(lpstr);
- #endif
+ DebugBreak();
      return E_NOINTERFACE;
  }
  //-------------------------------------------------------------------
@@@ -142,46 -137,124 +137,124 @@@ STDMETHODCALLTYP
  CBDAPinControl::RegistrationContext(ULONG *pulRegistrationCtx)
  {
  #ifdef BDAPLGIN_TRACE
-     OutputDebugStringW(L"CBDAPinControl::RegistrationContext: NotImplemented\n");
+     OutputDebugStringW(L"CBDAPinControl::RegistrationContext\n");
  #endif
  
-     return E_NOTIMPL;
+     if (!pulRegistrationCtx)
+     {
+         // invalid argument
+         return E_POINTER;
+     }
+     if (m_RegistrationCtx)
+     {
+         // is registered
+         *pulRegistrationCtx = m_RegistrationCtx;
+         return NOERROR;
+     }
+     //pin not registered
+     return E_FAIL;
  }
  
+ //-------------------------------------------------------------------
  HRESULT
- WINAPI
- CBDAPinControl_fnConstructor(
+ GetNetworkProviderFromGraph(
+     IFilterGraph * pGraph,
+     IBDA_NetworkProvider ** pOutNetworkProvider)
+ {
+     IEnumFilters *pEnumFilters = NULL;
+     IBaseFilter * ppFilter[1];
+     IBDA_NetworkProvider * pNetworkProvider = NULL;
+     HRESULT hr;
+     // get IEnumFilters interface
+     hr = pGraph->EnumFilters(&pEnumFilters);
+     if (FAILED(hr))
+     {
+         //clean up
+         *pOutNetworkProvider = NULL;
+         return hr;
+     }
+     while(pEnumFilters->Next(1, ppFilter, NULL) == S_OK)
+     {
+         // check if that filter supports the IBDA_NetworkProvider interface
+         hr = ppFilter[0]->QueryInterface(IID_IBDA_NetworkProvider, (void**)&pNetworkProvider);
+         // release IBaseFilter
+         ppFilter[0]->Release();
+         if (SUCCEEDED(hr))
+             break;
+     }
+     // release IEnumFilters interface
+     pEnumFilters->Release();
+     //store result
+     *pOutNetworkProvider = pNetworkProvider;
+     if (pNetworkProvider)
+         return S_OK;
+     else
+         return E_FAIL;
+ }
+ HRESULT
+ CBDAPinControl_RealConstructor(
+     HANDLE hPin,
+     IBDA_NetworkProvider *pNetworkProvider,
+     IPin * pConnectedPin,
+     ULONG RegistrationCtx,
      IUnknown * pUnkOuter,
      REFIID riid,
      LPVOID * ppv)
  {
-     IPin * pConnectedPin = NULL;
-     IBDA_NetworkProvider * pNetworkProvider = NULL;
-     HANDLE hFile = INVALID_HANDLE_VALUE;
+     CBDAPinControl * handler = new CBDAPinControl(hPin, pNetworkProvider, pConnectedPin, RegistrationCtx);
  
- #if 0
-     if (!IsEqualGUID(riid, IID_IUnknown))
-     {
  #ifdef BDAPLGIN_TRACE
-     OutputDebugStringW(L"CBDAPinControl_fnConstructor: Expected IUnknown\n");
+     OutputDebugStringW(L"CBDAPinControl_fnConstructor\n");
  #endif
-         return REGDB_E_CLASSNOTREG;
+     if (!handler)
+         return E_OUTOFMEMORY;
+     if (FAILED(handler->QueryInterface(riid, ppv)))
+     {
+         /* not supported */
+         delete handler;
+         return E_NOINTERFACE;
      }
  
+     return NOERROR;
+ }
  
+ HRESULT
+ WINAPI
+ CBDAPinControl_fnConstructor(
+     IUnknown * pUnkOuter,
+     REFIID riid,
+     LPVOID * ppv)
+ {
+     IPin * pConnectedPin = NULL;
+     IBDA_NetworkProvider * pNetworkProvider = NULL;
+     HANDLE hFile = INVALID_HANDLE_VALUE;
      HRESULT hr;
      IKsObject * pObject = NULL;
      IPin * pPin = NULL;
-     IEnumFilters *pEnumFilters = NULL;
-     IBaseFilter * ppFilter[1];
+     IUnknown * pUnknown = NULL;
      PIN_INFO PinInfo;
      FILTER_INFO FilterInfo;
+     ULONG RegistrationCtx = 0;
  
      if (!pUnkOuter)
          return E_POINTER;
  
+     OutputDebugStringW(L"CBDAPinControl_fnConstructor\n");
+     //DebugBreak();
      // query for IKsObject interface
      hr = pUnkOuter->QueryInterface(IID_IKsObject, (void**)&pObject);
  
         return hr;
      }
  
+     if (!PinInfo.pFilter)
+     {
+         //clean up
+        pObject->Release();
+        pPin->Release();
+        return hr;
+     }
      // sanity checks
-     assert(PinInfo.dir == PINDIR_OUTPUT);
      assert(PinInfo.pFilter != NULL);
  
      // query filter info
      // sanity check
      assert(FilterInfo.pGraph != NULL);
  
-     // get IEnumFilters interface
-     hr = FilterInfo.pGraph->EnumFilters(&pEnumFilters);
-     if (FAILED(hr))
-     {
-         //clean up
-        FilterInfo.pGraph->Release();
-        PinInfo.pFilter->Release();
-        pObject->Release();
-        pPin->Release();
-        return hr;
-     }
+     // get network provider interface
+     hr = GetNetworkProviderFromGraph(FilterInfo.pGraph, &pNetworkProvider);
  
-     while(pEnumFilters->Next(1, ppFilter, NULL) == S_OK)
+     if (SUCCEEDED(hr))
      {
-         // check if that filter supports the IBDA_NetworkProvider interface
-         hr = ppFilter[0]->QueryInterface(IID_IBDA_NetworkProvider, (void**)&pNetworkProvider);
-         // release IBaseFilter
-         ppFilter[0]->Release();
-         if (SUCCEEDED(hr))
-             break;
+         if (PinInfo.dir == PINDIR_OUTPUT)
+         {
+             // get connected pin handle
+             hr = pPin->ConnectedTo(&pConnectedPin);
+             if (SUCCEEDED(hr))
+             {
+                 // get file handle
+                 hFile = pObject->KsGetObjectHandle();
+                 if (hFile)
+                 {
+                     hr = CBDAPinControl_RealConstructor(hFile, pNetworkProvider, pConnectedPin, 0, pUnkOuter, riid, ppv);
+                     if (SUCCEEDED(hr))
+                     {
+                         // set to null to prevent releasing
+                         pNetworkProvider = NULL;
+                         pConnectedPin = NULL;
+                     }
+                 }
+                 else
+                 {
+                     // expected file handle
+                     hr = E_UNEXPECTED;
+                 }
+             }
+         }
+         else
+         {
+             // get IUnknown from base filter
+             hr = PinInfo.pFilter->QueryInterface(IID_IUnknown, (void**)&pUnknown);
+             if (SUCCEEDED(hr))
+             {
+                 // register device filter
+                 hr = pNetworkProvider->RegisterDeviceFilter(pUnknown, &RegistrationCtx);
+                 if (SUCCEEDED(hr))
+                 {
+                     // get file handle
+                     hFile = pObject->KsGetObjectHandle();
+                     if (hFile)
+                     {
+                         hr = CBDAPinControl_RealConstructor(hFile, pNetworkProvider, NULL, RegistrationCtx, pUnkOuter, riid, ppv);
+                         if (SUCCEEDED(hr))
+                         {
+                             // set to null to prevent releasing
+                             pNetworkProvider = NULL;
+                         }
+                     }
+                     else
+                     {
+                         // expected file handle
+                         hr = E_UNEXPECTED;
+                     }
+                 }
+                 else
+                 {
+                     WCHAR Buffer[100];
+                     swprintf(Buffer, L"CBDAPinControl_fnConstructor failed to register filter with %lx\n", hr);
+                     OutputDebugStringW(Buffer);
+                     DebugBreak();
+                 }
+             }
+         }
      }
  
-     // release IEnumFilters interface
-     pEnumFilters->Release();
      // release IFilterGraph interface
      FilterInfo.pGraph->Release();
  
      // release IBaseFilter interface
      PinInfo.pFilter->Release();
  
-     if (pNetworkProvider)
-     {
-         // get connected pin handle
-         hr = pPin->ConnectedTo(&pConnectedPin);
-         // get file handle
-         hFile = pObject->KsGetObjectHandle();
-         if (FAILED(hr) || hFile == INVALID_HANDLE_VALUE)
-         {
-             // pin not connected
-             pNetworkProvider->Release();
-             // set zero
-             pNetworkProvider = NULL;
-         }
-     }
      // release IPin 
      pPin->Release();
  
      pObject->Release();
  
  
-     if (pNetworkProvider == NULL)
+     if (pNetworkProvider)
      {
-         // no network provider interface in graph
-         return E_NOINTERFACE;
+         // release network provider
+         pNetworkProvider->Release();
      }
- #endif
-     CBDAPinControl * handler = new CBDAPinControl(hFile, pNetworkProvider, pConnectedPin);
  
- #ifdef BDAPLGIN_TRACE
-     OutputDebugStringW(L"CBDAPinControl_fnConstructor");
- #endif
-     DebugBreak();
-     if (!handler)
-         return E_OUTOFMEMORY;
+     if (pConnectedPin)
+     {
+         // release connected pin
+         pConnectedPin->Release();
+     }
  
-     if (FAILED(handler->QueryInterface(riid, ppv)))
+     if (pUnknown)
      {
-         /* not supported */
-         delete handler;
-         return E_NOINTERFACE;
+         // release filter
+         pUnknown->Release();
      }
  
-     return NOERROR;
+     return hr;
  }
@@@ -1,7 -1,7 +1,7 @@@
  #ifndef PRECOMP_H__
  #define PRECOMP_H__
  
//#define BDAPLGIN_TRACE
+ #define BDAPLGIN_TRACE
  #define BUILDING_KS
  #define _KSDDK_
  #include <dshow.h>
@@@ -9,6 -9,7 +9,7 @@@
  #include <ks.h>
  #define __STREAMS__
  #include <ksproxy.h>
+ #include <ksmedia.h>
  #include <stdio.h>
  #include <wchar.h>
  #include <tchar.h>
@@@ -55,7 -56,6 +56,6 @@@ CBDAPinControl_fnConstructor
  HRESULT
  WINAPI
  CControlNode_fnConstructor(
-     HANDLE hFile,
      IBaseFilter * pFilter,
      ULONG NodeType,
      ULONG PinId,
@@@ -67,7 -67,7 +67,7 @@@
  HRESULT
  WINAPI
  CBDAFrequencyFilter_fnConstructor(
-     HANDLE hFile,
+     IKsPropertySet * pProperty,
      ULONG NodeId,
      REFIID riid,
      LPVOID * ppv);
@@@ -77,7 -77,7 +77,7 @@@
  HRESULT
  WINAPI
  CBDASignalStatistics_fnConstructor(
-     HANDLE hFile,
+     IKsPropertySet * pProperty,
      ULONG NodeId,
      REFIID riid,
      LPVOID * ppv);
@@@ -87,7 -87,7 +87,7 @@@
  HRESULT
  WINAPI
  CBDALNBInfo_fnConstructor(
-     HANDLE hFile,
+     IKsPropertySet * pProperty,
      ULONG NodeId,
      REFIID riid,
      LPVOID * ppv);
  HRESULT
  WINAPI
  CBDADigitalDemodulator_fnConstructor(
-     HANDLE hFile,
+     IKsPropertySet * pProperty,
      ULONG NodeId,
      REFIID riid,
      LPVOID * ppv);
  
+ extern const GUID IID_IKsObject;
  #endif
@@@ -9,8 -9,10 +9,10 @@@
  
  #include "precomp.h"
  
+ #ifndef _MSC_VER
  const GUID IID_IBDA_SignalStatistics = {0x1347d106, 0xcf3a, 0x428a, {0xa5, 0xcb, 0xac, 0x0d, 0x9a, 0x2a, 0x43, 0x38}};
  const GUID KSPROPSETID_BdaSignalStats = {0x1347d106, 0xcf3a, 0x428a, {0xa5, 0xcb, 0xac, 0xd, 0x9a, 0x2a, 0x43, 0x38}};
+ #endif
  
  class CBDASignalStatistics : public IBDA_SignalStatistics
  {
@@@ -45,12 -47,12 +47,12 @@@ public
      HRESULT STDMETHODCALLTYPE put_SampleTime(LONG lmsSampleTime);
      HRESULT STDMETHODCALLTYPE get_SampleTime(LONG *plmsSampleTime);
  
-     CBDASignalStatistics(HANDLE hFile, ULONG NodeId) : m_Ref(0), m_hFile(hFile), m_NodeId(NodeId){};
+     CBDASignalStatistics(IKsPropertySet * pProperty, ULONG NodeId) : m_Ref(0), m_pProperty(pProperty), m_NodeId(NodeId){};
      ~CBDASignalStatistics(){};
  
  protected:
      LONG m_Ref;
-     HANDLE m_hFile;
+     IKsPropertySet * m_pProperty;
      ULONG m_NodeId;
  };
  
@@@ -75,7 -77,6 +77,6 @@@ CBDASignalStatistics::QueryInterface
          reinterpret_cast<IBDA_SignalStatistics*>(*Output)->AddRef();
          return NOERROR;
      }
      return E_NOINTERFACE;
  }
  
@@@ -95,13 -96,13 +96,13 @@@ CBDASignalStatistics::get_SignalStrengt
      ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaSignalStats;
-     Node.Property.Id = KSPROPERTY_BDA_SIGNAL_STRENGTH;
-     Node.Property.Flags = KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_TOPOLOGY;
      Node.NodeId = (ULONG)-1;
+     Node.Reserved = 0;
+     assert(m_pProperty);
+     hr = m_pProperty->Get(KSPROPSETID_BdaSignalStats, KSPROPERTY_BDA_SIGNAL_STRENGTH, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), plDbStrength, sizeof(LONG), &BytesReturned);
  
-     // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), plDbStrength, sizeof(LONG), &BytesReturned);
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
@@@ -128,13 -129,11 +129,11 @@@ CBDASignalStatistics::get_SignalQuality
      ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaSignalStats;
-     Node.Property.Id = KSPROPERTY_BDA_SIGNAL_QUALITY;
-     Node.Property.Flags = KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_TOPOLOGY;
      Node.NodeId = (ULONG)-1;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), plPercentQuality, sizeof(LONG), &BytesReturned);
+     hr = m_pProperty->Get(KSPROPSETID_BdaSignalStats, KSPROPERTY_BDA_SIGNAL_QUALITY, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), plPercentQuality, sizeof(LONG), &BytesReturned);
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
@@@ -162,13 -161,12 +161,12 @@@ CBDASignalStatistics::get_SignalPresent
      ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaSignalStats;
-     Node.Property.Id = KSPROPERTY_BDA_SIGNAL_PRESENT;
-     Node.Property.Flags = KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_TOPOLOGY;
      Node.NodeId = (ULONG)-1;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), &Present, sizeof(ULONG), &BytesReturned);
+     hr = m_pProperty->Get(KSPROPSETID_BdaSignalStats, KSPROPERTY_BDA_SIGNAL_PRESENT, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &Present, sizeof(ULONG), &BytesReturned);
      // store result
      *pfPresent = Present;
  
@@@ -198,13 -196,12 +196,12 @@@ CBDASignalStatistics::get_SignalLocked(
      ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaSignalStats;
-     Node.Property.Id = KSPROPERTY_BDA_SIGNAL_LOCKED;
-     Node.Property.Flags = KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_TOPOLOGY;
      Node.NodeId = (ULONG)-1;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), &Locked, sizeof(ULONG), &BytesReturned);
+     hr = m_pProperty->Get(KSPROPSETID_BdaSignalStats, KSPROPERTY_BDA_SIGNAL_LOCKED, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &Locked, sizeof(ULONG), &BytesReturned);
      *pfLocked = Locked;
  
  #ifdef BDAPLGIN_TRACE
@@@ -222,20 -219,17 +219,17 @@@ CBDASignalStatistics::put_SampleTime(LO
  {
      KSP_NODE Node;
      HRESULT hr;
-     ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaSignalStats;
-     Node.Property.Id = KSPROPERTY_BDA_SAMPLE_TIME;
-     Node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
      Node.NodeId = (ULONG)-1;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), &lmsSampleTime, sizeof(LONG), &BytesReturned);
+     hr = m_pProperty->Set(KSPROPSETID_BdaSignalStats, KSPROPERTY_BDA_SAMPLE_TIME, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), &lmsSampleTime, sizeof(LONG));
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
-     swprintf(Buffer, L"CBDASignalStatistics::put_SampleTime: m_NodeId %lu hr %lx, BytesReturned %lu\n", m_NodeId, hr, BytesReturned);
+     swprintf(Buffer, L"CBDASignalStatistics::put_SampleTime: m_NodeId %lu hr %lx\n", m_NodeId, hr);
      OutputDebugStringW(Buffer);
  #endif
  
@@@ -251,13 -245,11 +245,11 @@@ CBDASignalStatistics::get_SampleTime(LO
      ULONG BytesReturned;
  
      // setup request
-     Node.Property.Set = KSPROPSETID_BdaSignalStats;
-     Node.Property.Id = KSPROPERTY_BDA_SAMPLE_TIME;
-     Node.Property.Flags = KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_TOPOLOGY;
      Node.NodeId = (ULONG)-1;
+     Node.Reserved = 0;
  
      // perform request
-     hr = KsSynchronousDeviceControl(m_hFile, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), plmsSampleTime, sizeof(LONG), &BytesReturned);
+     hr = m_pProperty->Get(KSPROPSETID_BdaSignalStats, KSPROPERTY_BDA_SAMPLE_TIME, &Node.NodeId, sizeof(KSP_NODE)-sizeof(KSPROPERTY), plmsSampleTime, sizeof(LONG), &BytesReturned);
  
  #ifdef BDAPLGIN_TRACE
      WCHAR Buffer[100];
  HRESULT
  WINAPI
  CBDASignalStatistics_fnConstructor(
-     HANDLE hFile,
+     IKsPropertySet * pProperty,
      ULONG NodeId,
      REFIID riid,
      LPVOID * ppv)
  {
      // construct device control
-     CBDASignalStatistics * handler = new CBDASignalStatistics(hFile, NodeId);
+     CBDASignalStatistics * handler = new CBDASignalStatistics(pProperty, NodeId);
  
  #ifdef BDAPLGIN_TRACE
      OutputDebugStringW(L"CBDASignalStatistics_fnConstructor\n");
@@@ -15,6 -15,9 +15,9 @@@ class CKsAllocator : public IKsAllocato
                       public IMemAllocatorCallbackTemp
  {
  public:
+     typedef std::stack<IMediaSample *>MediaSampleStack;
+     typedef std::list<IMediaSample *>MediaSampleList;
      STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface);
  
      STDMETHODIMP_(ULONG) AddRef()
@@@ -58,9 -61,9 +61,9 @@@
      HRESULT STDMETHODCALLTYPE GetFreeCount(LONG *plBuffersFree);
  
  
-     CKsAllocator() : m_Ref(0), m_hAllocator(0), m_Mode(KsAllocatorMode_User), m_Notify(0), m_Allocated(0), m_FreeCount(0), m_cbBuffer(0), m_cBuffers(0), m_cbAlign(0), m_cbPrefix(0){}
+     CKsAllocator();
      virtual ~CKsAllocator(){}
+     VOID STDMETHODCALLTYPE FreeMediaSamples();
  protected:
      LONG m_Ref;
      HANDLE m_hAllocator;
      ALLOCATOR_PROPERTIES_EX m_Properties;
      IMemAllocatorNotifyCallbackTemp *m_Notify;
      ULONG m_Allocated;
-     ULONG m_FreeCount;
-     ULONG m_cbBuffer;
-     ULONG m_cBuffers;
-     ULONG m_cbAlign;
-     ULONG m_cbPrefix;
+     LONG m_cbBuffer;
+     LONG m_cBuffers;
+     LONG m_cbAlign;
+     LONG m_cbPrefix;
+     BOOL m_Commited;
+     CRITICAL_SECTION m_CriticalSection;
+     MediaSampleStack m_FreeList;
+     MediaSampleList m_UsedList;
+     LPVOID m_Buffer;
+     BOOL m_FreeSamples;
  };
  
  
@@@ -93,14 -101,33 +101,33 @@@ CKsAllocator::QueryInterface
      if (IsEqualGUID(refiid, IID_IMemAllocator) ||
          IsEqualGUID(refiid, IID_IMemAllocatorCallbackTemp))
      {
-         *Output = (IDistributorNotify*)(this);
-         reinterpret_cast<IDistributorNotify*>(*Output)->AddRef();
+         *Output = (IMemAllocatorCallbackTemp*)(this);
+         reinterpret_cast<IMemAllocatorCallbackTemp*>(*Output)->AddRef();
          return NOERROR;
      }
  
      return E_NOINTERFACE;
  }
  
+ CKsAllocator::CKsAllocator() : m_Ref(0), 
+                                m_hAllocator(0), 
+                                m_Mode(KsAllocatorMode_User),
+                                m_Notify(0),
+                                m_Allocated(0),
+                                m_cbBuffer(0),
+                                m_cBuffers(0),
+                                m_cbAlign(0),
+                                m_cbPrefix(0),
+                                m_Commited(FALSE),
+                                m_FreeList(),
+                                m_UsedList(),
+                                m_Buffer(0),
+                                m_FreeSamples(FALSE)
+ {
+    InitializeCriticalSection(&m_CriticalSection);
+ }
  //-------------------------------------------------------------------
  // IMemAllocator
  //
@@@ -112,7 -139,11 +139,11 @@@ CKsAllocator::SetProperties
  {
      SYSTEM_INFO SystemInfo;
  
-     OutputDebugStringW(L"CKsAllocator::SetProperties Stub\n");
+     EnterCriticalSection(&m_CriticalSection);
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"CKsAllocator::SetProperties\n");
+ #endif
  
      if (!pRequest || !pActual)
          return E_POINTER;
      if (!pRequest->cbAlign || (pRequest->cbAlign - 1) & SystemInfo.dwAllocationGranularity)
      {
          // bad alignment
+         LeaveCriticalSection(&m_CriticalSection);
          return VFW_E_BADALIGN;
      }
  
      if (m_Mode == KsAllocatorMode_Kernel)
      {
-         // u cannt change a kernel allocator
+         // u can't change a kernel allocator
+         LeaveCriticalSection(&m_CriticalSection);
          return VFW_E_ALREADY_COMMITTED;
      }
  
-     if (m_Allocated != m_FreeCount)
+     if (m_Commited)
+     {
+         // need to decommit first
+         LeaveCriticalSection(&m_CriticalSection);
+         return VFW_E_ALREADY_COMMITTED;
+     }
+     if (m_Allocated != m_FreeList.size())
      {
          // outstanding buffers
+         LeaveCriticalSection(&m_CriticalSection);
          return VFW_E_BUFFERS_OUTSTANDING;
      }
  
      pActual->cbPrefix = m_cbPrefix = pRequest->cbPrefix;
      pActual->cBuffers = m_cBuffers = pRequest->cBuffers;
  
+     LeaveCriticalSection(&m_CriticalSection);
      return NOERROR;
  }
  
@@@ -169,28 -211,130 +211,130 @@@ HRESUL
  STDMETHODCALLTYPE
  CKsAllocator::Commit()
  {
+     LONG Index;
+     PUCHAR CurrentBuffer;
+     IMediaSample * Sample;
+     HRESULT hr;
+     //TODO integer overflow checks
+     EnterCriticalSection(&m_CriticalSection);
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"CKsAllocator::Commit\n");
+ #endif
      if (m_Mode == KsAllocatorMode_Kernel)
      {
          /* no-op for kernel allocator */
+        LeaveCriticalSection(&m_CriticalSection);
         return NOERROR;
      }
  
-     OutputDebugStringW(L"CKsAllocator::Commit NotImplemented\n");
-     return E_NOTIMPL;
+     if (m_Commited)
+     {
+         // already commited
+         LeaveCriticalSection(&m_CriticalSection);
+         return NOERROR;
+     }
+     if (m_cbBuffer < 0 || m_cBuffers < 0 || m_cbPrefix < 0)
+     {
+         // invalid parameter
+         LeaveCriticalSection(&m_CriticalSection);
+         return E_OUTOFMEMORY;
+     }
+     LONG Size = m_cbBuffer + m_cbPrefix;
+     if (m_cbAlign > 1)
+     {
+         //check alignment
+         LONG Mod = Size % m_cbAlign;
+         if (Mod)
+         {
+             // calculate aligned size
+             Size += m_cbAlign - Mod;
+         }
+     }
+     LONG TotalSize = Size * m_cBuffers;
+     assert(TotalSize);
+     assert(m_cBuffers);
+     assert(Size);
+     // now allocate buffer
+     m_Buffer = VirtualAlloc(NULL, TotalSize, MEM_COMMIT, PAGE_READWRITE);
+     if (!m_Buffer)
+     {
+         LeaveCriticalSection(&m_CriticalSection);
+         return E_OUTOFMEMORY;
+     }
+     ZeroMemory(m_Buffer, TotalSize);
+     CurrentBuffer = (PUCHAR)m_Buffer;
+     for (Index = 0; Index < m_cBuffers; Index++)
+     {
+         // construct media sample
+         hr = CMediaSample_Constructor((IMemAllocator*)this, CurrentBuffer + m_cbPrefix, m_cbBuffer, IID_IMediaSample, (void**)&Sample);
+         if (FAILED(hr))
+         {
+             LeaveCriticalSection(&m_CriticalSection);
+             return E_OUTOFMEMORY;
+         }
+         // add to free list
+         m_FreeList.push(Sample);
+         m_Allocated++;
+         //next sample buffer
+         CurrentBuffer += Size;
+     }
+     // we are now commited
+     m_Commited = true;
+     LeaveCriticalSection(&m_CriticalSection);
+     return S_OK;
  }
  
  HRESULT
  STDMETHODCALLTYPE
  CKsAllocator::Decommit()
  {
+     EnterCriticalSection(&m_CriticalSection);
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"CKsAllocator::Decommit\n");
+ #endif
      if (m_Mode == KsAllocatorMode_Kernel)
      {
          /* no-op for kernel allocator */
-        return NOERROR;
+         LeaveCriticalSection(&m_CriticalSection);
+         return NOERROR;
      }
  
-     OutputDebugStringW(L"CKsAllocator::Decommit NotImplemented\n");
-     return E_NOTIMPL;
+     m_Commited = false;
+     if (m_Allocated != m_FreeList.size())
+     {
+         // outstanding buffers
+         m_FreeSamples = true;
+         LeaveCriticalSection(&m_CriticalSection);
+         return NOERROR;
+     }
+     else
+     {
+         // no outstanding buffers
+         // free to free them
+         FreeMediaSamples();
+     }
+     LeaveCriticalSection(&m_CriticalSection);
+     return NOERROR;
  }
  
  
@@@ -202,8 -346,50 +346,50 @@@ CKsAllocator::GetBuffer
      REFERENCE_TIME *pEndTime,
      DWORD dwFlags)
  {
-     OutputDebugStringW(L"CKsAllocator::GetBuffer NotImplemented\n");
-     return E_NOTIMPL;
+     IMediaSample * Sample = NULL;
+     if (!m_Commited)
+         return VFW_E_NOT_COMMITTED;
+     do
+     {
+         EnterCriticalSection(&m_CriticalSection);
+         if (!m_FreeList.empty())
+         {
+             Sample = m_FreeList.top();
+             m_FreeList.pop();
+         }
+         LeaveCriticalSection(&m_CriticalSection);
+         if (dwFlags & AM_GBF_NOWAIT)
+         {
+             // never wait untill a buffer becomes available
+             break;
+         }
+     }
+     while(Sample == NULL);
+     if (!Sample)
+     {
+         // no sample acquired
+         //HACKKKKKKK
+         Sample = m_UsedList.back();
+         m_UsedList.pop_back();
+         if (!Sample)
+             return VFW_E_TIMEOUT;
+     }
+     // store result
+     *ppBuffer = Sample;
+    // store sample in used list
+    m_UsedList.push_front(Sample);
+     // done
+     return NOERROR;
  }
  
  HRESULT
@@@ -211,8 -397,36 +397,36 @@@ STDMETHODCALLTYP
  CKsAllocator::ReleaseBuffer(
      IMediaSample *pBuffer)
  {
-     OutputDebugStringW(L"CKsAllocator::ReleaseBuffer NotImplemented\n");
-     return E_NOTIMPL;
+     EnterCriticalSection(&m_CriticalSection);
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"CKsAllocator::ReleaseBuffer\n");
+ #endif
+     // media sample always 1 ref count in free list
+     pBuffer->AddRef();
+     // add the sample to the free list
+     m_FreeList.push(pBuffer);
+     if (m_FreeSamples)
+     {
+         // pending de-commit
+         if (m_FreeList.size () == m_Allocated)
+         {
+             FreeMediaSamples();
+         }
+     }
+     if (m_Notify)
+     {
+         //notify caller of an available buffer
+         m_Notify->NotifyRelease();
+     }
+     LeaveCriticalSection(&m_CriticalSection);
+     return S_OK;
  }
  
  //-------------------------------------------------------------------
@@@ -223,7 -437,11 +437,11 @@@ STDMETHODCALLTYP
  CKsAllocator::SetNotify(
      IMemAllocatorNotifyCallbackTemp *pNotify)
  {
+     EnterCriticalSection(&m_CriticalSection);
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"CKsAllocator::SetNotify\n");
+ #endif
  
      if (pNotify)
          pNotify->AddRef();
          m_Notify->Release();
  
      m_Notify = pNotify;
+     LeaveCriticalSection(&m_CriticalSection);
      return NOERROR;
  }
  
@@@ -240,8 -460,8 +460,8 @@@ STDMETHODCALLTYP
  CKsAllocator::GetFreeCount(
      LONG *plBuffersFree)
  {
-     OutputDebugStringW(L"CKsAllocator::GetFreeCount NotImplemented\n");
-     return E_NOTIMPL;
+     *plBuffersFree = m_Allocated - m_FreeList.size();
+     return S_OK;
  }
  
  //-------------------------------------------------------------------
@@@ -313,7 -533,9 +533,9 @@@ CKsAllocator::KsCreateAllocatorAndGetHa
      KSALLOCATOR_FRAMING AllocatorFraming;
      HANDLE hPin;
  
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"CKsAllocator::KsCreateAllocatorAndGetHandle\n");
+ #endif
  
      if (m_hAllocator)
      {
      return m_hAllocator;
  }
  
+ //-------------------------------------------------------------------
+ VOID
+ STDMETHODCALLTYPE
+ CKsAllocator::FreeMediaSamples()
+ {
+     ULONG Index;
+     for(Index = 0; Index < m_FreeList.size(); Index++)
+     {
+         IMediaSample * Sample = m_FreeList.top();
+         m_FreeList.pop();
+         delete Sample;
+     }
+     m_FreeSamples = false;
+     m_Allocated = 0;
+     if (m_Buffer)
+     {
+         // release buffer
+         VirtualFree(m_Buffer, 0, MEM_RELEASE);
+         m_Buffer = NULL;
+     }
+ }
  HRESULT
  WINAPI
  CKsAllocator_Constructor(
      REFIID riid,
      LPVOID * ppv)
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"CKsAllocator_Constructor\n");
+ #endif
  
      CKsAllocator * handler = new CKsAllocator();
  
@@@ -97,7 -97,9 +97,9 @@@ HRESUL
  STDMETHODCALLTYPE
  CKsBasicAudio::Stop()
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -105,7 -107,10 +107,10 @@@ HRESUL
  STDMETHODCALLTYPE
  CKsBasicAudio::Pause()
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -114,7 -119,10 +119,10 @@@ STDMETHODCALLTYP
  CKsBasicAudio::Run(
      REFERENCE_TIME tStart)
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -123,7 -131,9 +131,9 @@@ STDMETHODCALLTYP
  CKsBasicAudio::SetSyncSource(
      IReferenceClock *pClock)
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -131,7 -141,10 +141,10 @@@ HRESUL
  STDMETHODCALLTYPE
  CKsBasicAudio::NotifyGraphChange()
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -144,7 -157,10 +157,10 @@@ STDMETHODCALLTYP
  CKsBasicAudio::GetTypeInfoCount(
      UINT *pctinfo)
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -155,7 -171,9 +171,9 @@@ CKsBasicAudio::GetTypeInfo
      LCID lcid,
      ITypeInfo **ppTInfo)
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -168,7 -186,10 +186,10 @@@ CKsBasicAudio::GetIDsOfNames
      LCID lcid,
      DISPID *rgDispId)
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -184,7 -205,10 +205,10 @@@ CKsBasicAudio::Invoke
      EXCEPINFO *pExcepInfo,
      UINT *puArgErr)
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -197,7 -221,10 +221,10 @@@ STDMETHODCALLTYP
  CKsBasicAudio::put_Volume(
      long lVolume)
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -207,7 -234,10 +234,10 @@@ STDMETHODCALLTYP
  CKsBasicAudio::get_Volume(
      long *plVolume)
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -217,7 -247,10 +247,10 @@@ STDMETHODCALLTYP
  CKsBasicAudio::put_Balance(
      long lBalance)
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -227,7 -260,10 +260,10 @@@ STDMETHODCALLTYP
  CKsBasicAudio::get_Balance(
      long *plBalance)
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -238,7 -274,9 +274,9 @@@ CKsBasicAudio_Constructor
      REFIID riid,
      LPVOID * ppv)
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"CKsBasicAudio_Constructor\n");
+ #endif
  
      CKsBasicAudio * handler = new CKsBasicAudio();
  
  const GUID KSCATEGORY_CLOCK       = {0x53172480, 0x4791, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
  #endif
  
+ const GUID IID_IKsClockForwarder              = {0x877e4352, 0x6fea, 0x11d0, {0xb8, 0x63, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1}};
+ DWORD WINAPI CKsClockForwarder_ThreadStartup(LPVOID lpParameter);
  class CKsClockForwarder : public IDistributorNotify,
                            public IKsObject
  {
@@@ -45,14 -49,38 +49,38 @@@ public
      // IKsObject interface
      HANDLE STDMETHODCALLTYPE KsGetObjectHandle();
  
-     CKsClockForwarder(HANDLE handle) : m_Ref(0), m_Handle(handle){}
-     virtual ~CKsClockForwarder(){ if (m_Handle) CloseHandle(m_Handle);}
+     CKsClockForwarder(HANDLE handle);
+     virtual ~CKsClockForwarder(){};
+     HRESULT STDMETHODCALLTYPE SetClockState(KSSTATE State);
  protected:
      LONG m_Ref;
      HANDLE m_Handle;
+     IReferenceClock * m_Clock;
+     HANDLE m_hEvent;
+     HANDLE m_hThread;
+     BOOL m_ThreadStarted;
+     BOOL m_PendingStop;
+     BOOL m_ForceStart;
+     KSSTATE m_State;
+     REFERENCE_TIME m_Time;
+     friend DWORD WINAPI CKsClockForwarder_ThreadStartup(LPVOID lpParameter);
  };
  
+ CKsClockForwarder::CKsClockForwarder(
+     HANDLE handle) : m_Ref(0),
+                      m_Handle(handle),
+                      m_Clock(0),
+                      m_hEvent(NULL),
+                      m_hThread(NULL),
+                      m_ThreadStarted(FALSE),
+                      m_PendingStop(FALSE),
+                      m_ForceStart(FALSE),
+                      m_State(KSSTATE_STOP),
+                      m_Time(0)
+ {
+ }
  HRESULT
  STDMETHODCALLTYPE
  CKsClockForwarder::QueryInterface(
@@@ -65,7 -93,8 +93,8 @@@
          reinterpret_cast<IUnknown*>(*Output)->AddRef();
          return NOERROR;
      }
-     if (IsEqualGUID(refiid, IID_IKsObject))
+     if (IsEqualGUID(refiid, IID_IKsObject) ||
+         IsEqualGUID(refiid, IID_IKsClockForwarder))
      {
          *Output = (IKsObject*)(this);
          reinterpret_cast<IKsObject*>(*Output)->AddRef();
          return NOERROR;
      }
  
- #if 0
-     if (IsEqualGUID(refiid, IID_IKsClockForwarder))
-     {
-         *Output = PVOID(this);
-         reinterpret_cast<IKsObject*>(*Output)->AddRef();
-         return NOERROR;
-     }
- #endif
      return E_NOINTERFACE;
  }
  
@@@ -100,16 -120,86 +120,86 @@@ HRESUL
  STDMETHODCALLTYPE
  CKsClockForwarder::Stop()
  {
-     OutputDebugString("UNIMPLEMENTED\n");
-     return E_NOTIMPL;
+ #ifdef KSPROXY_TRACE
+     WCHAR Buffer[200];
+     swprintf(Buffer, L"CKsClockForwarder::Stop m_ThreadStarted %u m_PendingStop %u m_hThread %p m_hEvent %p m_Handle %p\n", m_ThreadStarted, m_PendingStop, m_hThread, m_hEvent, m_Handle);
+     OutputDebugStringW(Buffer);
+ #endif
+     m_Time = 0;
+     if (m_ThreadStarted)
+     {
+         // signal pending stop
+         m_PendingStop = true;
+         assert(m_hThread);
+         assert(m_hEvent);
+         // set stop event
+         SetEvent(m_hEvent);
+         // wait untill the thread has finished
+         WaitForSingleObject(m_hThread, INFINITE);
+         // close thread handle
+         CloseHandle(m_hThread);
+         // zero handle
+         m_hThread = NULL;
+     }
+     if (m_hEvent)
+     {
+         // close stop event
+         CloseHandle(m_hEvent);
+         m_hEvent = NULL;
+     }
+     m_PendingStop = false;
+     SetClockState(KSSTATE_STOP);
+     return NOERROR;
  }
  
  HRESULT
  STDMETHODCALLTYPE
  CKsClockForwarder::Pause()
  {
-     OutputDebugString("UNIMPLEMENTED\n");
-     return E_NOTIMPL;
+ #ifdef KSPROXY_TRACE
+     OutputDebugString("CKsClockForwarder::Pause\n");
+ #endif
+     if (!m_hEvent)
+     {
+         m_hEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
+         if (!m_hEvent)
+             return MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, GetLastError());
+     }
+     if (m_State <= KSSTATE_PAUSE)
+     {
+         if (m_State == KSSTATE_STOP)
+             SetClockState(KSSTATE_ACQUIRE);
+         if (m_State == KSSTATE_ACQUIRE)
+             SetClockState(KSSTATE_PAUSE);
+     }
+     else
+     {
+         if (!m_ForceStart)
+         {
+             SetClockState(KSSTATE_PAUSE);
+         }
+     }
+     if (!m_hThread)
+     {
+         m_hThread = CreateThread(NULL, 0, CKsClockForwarder_ThreadStartup, (LPVOID)this, 0, NULL);
+         if (!m_hThread)
+             return MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, GetLastError());
+     }
+     return NOERROR;
  }
  
  HRESULT
@@@ -117,8 -207,28 +207,28 @@@ STDMETHODCALLTYP
  CKsClockForwarder::Run(
      REFERENCE_TIME tStart)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
-     return E_NOTIMPL;
+ #ifdef KSPROXY_TRACE
+     OutputDebugString("CKsClockForwarder::Run\n");
+ #endif
+     m_Time = tStart;
+     if (!m_hEvent || !m_hThread)
+     {
+         m_ForceStart = TRUE;
+         HRESULT hr = Pause();
+         m_ForceStart = FALSE;
+         if (FAILED(hr))
+             return hr;
+     }
+     assert(m_hThread);
+     SetClockState(KSSTATE_RUN);
+     SetEvent(m_hEvent);
+     return NOERROR;
  }
  
  HRESULT
@@@ -126,16 -236,30 +236,30 @@@ STDMETHODCALLTYP
  CKsClockForwarder::SetSyncSource(
      IReferenceClock *pClock)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
-     return E_NOTIMPL;
+ #ifdef KSPROXY_TRACE
+     OutputDebugString("CKsClockForwarder::SetSyncSource\n");
+ #endif
+     if (pClock)
+         pClock->AddRef();
+     if (m_Clock)
+         m_Clock->Release();
+     m_Clock = pClock;
+     return NOERROR;
  }
  
  HRESULT
  STDMETHODCALLTYPE
  CKsClockForwarder::NotifyGraphChange()
  {
-     OutputDebugString("UNIMPLEMENTED\n");
-     return E_NOTIMPL;
+ #ifdef KSPROXY_TRACE
+     OutputDebugString("CKsClockForwarder::NotifyGraphChange\n");
+ #endif
+     return NOERROR;
  }
  
  //-------------------------------------------------------------------
@@@ -149,6 -273,66 +273,66 @@@ CKsClockForwarder::KsGetObjectHandle(
      return m_Handle;
  }
  
+ //-------------------------------------------------------------------
+ HRESULT
+ STDMETHODCALLTYPE
+ CKsClockForwarder::SetClockState(KSSTATE State)
+ {
+     KSPROPERTY Property;
+     ULONG BytesReturned;
+     Property.Set = KSPROPSETID_Clock;
+     Property.Id = KSPROPERTY_CLOCK_STATE;
+     Property.Flags = KSPROPERTY_TYPE_SET;
+     HRESULT hr = KsSynchronousDeviceControl(m_Handle, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSPROPERTY), &State, sizeof(KSSTATE), &BytesReturned);
+     if (SUCCEEDED(hr))
+         m_State = State;
+ #ifdef KSPROXY_TRACE
+     WCHAR Buffer[100];
+     swprintf(Buffer, L"CKsClockForwarder::SetClockState m_State %u State %u hr %lx\n", m_State, State, hr);
+     OutputDebugStringW(Buffer);
+ #endif
+     return hr;
+ }
+ DWORD
+ WINAPI
+ CKsClockForwarder_ThreadStartup(LPVOID lpParameter)
+ {
+     REFERENCE_TIME Time;
+     ULONG BytesReturned;
+     CKsClockForwarder * Fwd = (CKsClockForwarder*)lpParameter;
+     Fwd->m_ThreadStarted = TRUE;
+     do
+     {
+         if (Fwd->m_PendingStop)
+             break;
+         if (Fwd->m_State != KSSTATE_RUN)
+             WaitForSingleObject(Fwd->m_hEvent, INFINITE);
+         KSPROPERTY Property;
+         Property.Set = KSPROPSETID_Clock;
+         Property.Id = KSPROPERTY_CLOCK_TIME;
+         Property.Flags = KSPROPERTY_TYPE_SET;
+         Fwd->m_Clock->GetTime(&Time);
+         Time -= Fwd->m_Time;
+         KsSynchronousDeviceControl(Fwd->m_Handle, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSPROPERTY), &Time, sizeof(REFERENCE_TIME), &BytesReturned);
+     }
+     while(TRUE);
+     Fwd->m_ThreadStarted = FALSE;
+     return NOERROR;
+ }
  HRESULT
  WINAPI
  CKsClockForwarder_Constructor(
      HRESULT hr;
      HANDLE handle;
  
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"CKsClockForwarder_Constructor\n");
+ #endif
  
      // open default clock
      hr = KsOpenDefaultDevice(KSCATEGORY_CLOCK, GENERIC_READ | GENERIC_WRITE, &handle);
  
      if (hr != NOERROR)
      {
+ #ifdef KSPROXY_TRACE
           OutputDebugString("CKsClockForwarder_Constructor failed to open device\n");
+ #endif
           return hr;
      }
  
@@@ -102,7 -102,9 +102,9 @@@ HRESUL
  STDMETHODCALLTYPE
  CVPConfig::Stop()
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -110,7 -112,9 +112,9 @@@ HRESUL
  STDMETHODCALLTYPE
  CVPConfig::Pause()
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -119,7 -123,9 +123,9 @@@ STDMETHODCALLTYP
  CVPConfig::Run(
      REFERENCE_TIME tStart)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -128,7 -134,9 +134,9 @@@ STDMETHODCALLTYP
  CVPConfig::SetSyncSource(
      IReferenceClock *pClock)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -136,7 -144,9 +144,9 @@@ HRESUL
  STDMETHODCALLTYPE
  CVPConfig::NotifyGraphChange()
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -149,7 -159,9 +159,9 @@@ CVPConfig::GetConnectInfo
      LPDWORD pdwNumConnectInfo, 
      IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -158,7 -170,9 +170,9 @@@ STDMETHODCALLTYP
  CVPConfig::SetConnectInfo(
      DWORD dwChosenEntry)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -167,7 -181,9 +181,9 @@@ STDMETHODCALLTYP
  CVPConfig::GetVPDataInfo(
      LPAMVPDATAINFO pamvpDataInfo)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -177,7 -193,9 +193,9 @@@ CVPConfig::GetMaxPixelRate
      LPAMVPSIZE pamvpSize,
      OUT LPDWORD pdwMaxPixelsPerSecond)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -187,7 -205,9 +205,9 @@@ CVPConfig::InformVPInputFormats
      DWORD dwNumFormats,
      IN LPDDPIXELFORMAT pDDPixelFormats)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -197,7 -217,9 +217,9 @@@ CVPConfig::GetVideoFormats
      LPDWORD pdwNumFormats, 
      IN OUT LPDDPIXELFORMAT pddPixelFormats)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -206,7 -228,9 +228,9 @@@ STDMETHODCALLTYP
  CVPConfig::SetVideoFormat(
      DWORD dwChosenEntry)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -214,7 -238,9 +238,9 @@@ HRESUL
  STDMETHODCALLTYPE
  CVPConfig::SetInvertPolarity()
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -223,7 -249,9 +249,9 @@@ STDMETHODCALLTYP
  CVPConfig::GetOverlaySurface(
      LPDIRECTDRAWSURFACE* ppddOverlaySurface)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -232,7 -260,9 +260,9 @@@ STDMETHODCALLTYP
  CVPConfig::SetDirectDrawKernelHandle(
      ULONG_PTR dwDDKernelHandle)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -241,7 -271,9 +271,9 @@@ STDMETHODCALLTYP
  CVPConfig::SetVideoPortID(
      IN DWORD dwVideoPortID)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -252,7 -284,9 +284,9 @@@ CVPConfig::SetDDSurfaceKernelHandles
      DWORD cHandles,
      IN ULONG_PTR *rgDDKernelHandles)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -264,7 -298,9 +298,9 @@@ CVPConfig::SetSurfaceParameters
      IN DWORD dwXOrigin,
      IN DWORD dwYOrigin)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -277,7 -313,9 +313,9 @@@ STDMETHODCALLTYP
  CVPConfig::IsVPDecimationAllowed(
      LPBOOL pbIsDecimationAllowed)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -286,13 -324,13 +324,13 @@@ STDMETHODCALLTYP
  CVPConfig::SetScalingFactors(
      LPAMVPSIZE pamvpSize)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
  
  HRESULT
  WINAPI
  CVPConfig_Constructor(
      REFIID riid,
      LPVOID * ppv)
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"CVPConfig_Constructor\n");
+ #endif
  
      CVPConfig * handler = new CVPConfig();
  
@@@ -98,7 -98,9 +98,9 @@@ HRESUL
  STDMETHODCALLTYPE
  CVPVBIConfig::Stop()
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -106,7 -108,9 +108,9 @@@ HRESUL
  STDMETHODCALLTYPE
  CVPVBIConfig::Pause()
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -115,7 -119,9 +119,9 @@@ STDMETHODCALLTYP
  CVPVBIConfig::Run(
      REFERENCE_TIME tStart)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -124,7 -130,9 +130,9 @@@ STDMETHODCALLTYP
  CVPVBIConfig::SetSyncSource(
      IReferenceClock *pClock)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -132,7 -140,9 +140,9 @@@ HRESUL
  STDMETHODCALLTYPE
  CVPVBIConfig::NotifyGraphChange()
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -145,7 -155,9 +155,9 @@@ CVPVBIConfig::GetConnectInfo
      LPDWORD pdwNumConnectInfo, 
      IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -154,7 -166,9 +166,9 @@@ STDMETHODCALLTYP
  CVPVBIConfig::SetConnectInfo(
      DWORD dwChosenEntry)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -163,7 -177,9 +177,9 @@@ STDMETHODCALLTYP
  CVPVBIConfig::GetVPDataInfo(
      LPAMVPDATAINFO pamvpDataInfo)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -173,7 -189,9 +189,9 @@@ CVPVBIConfig::GetMaxPixelRate
      LPAMVPSIZE pamvpSize,
      OUT LPDWORD pdwMaxPixelsPerSecond)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -183,7 -201,9 +201,9 @@@ CVPVBIConfig::InformVPInputFormats
      DWORD dwNumFormats,
      IN LPDDPIXELFORMAT pDDPixelFormats)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -193,7 -213,9 +213,9 @@@ CVPVBIConfig::GetVideoFormats
      LPDWORD pdwNumFormats, 
      IN OUT LPDDPIXELFORMAT pddPixelFormats)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -202,7 -224,9 +224,9 @@@ STDMETHODCALLTYP
  CVPVBIConfig::SetVideoFormat(
      DWORD dwChosenEntry)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -210,7 -234,9 +234,9 @@@ HRESUL
  STDMETHODCALLTYPE
  CVPVBIConfig::SetInvertPolarity()
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+  #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -219,7 -245,9 +245,9 @@@ STDMETHODCALLTYP
  CVPVBIConfig::GetOverlaySurface(
      LPDIRECTDRAWSURFACE* ppddOverlaySurface)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -228,7 -256,9 +256,9 @@@ STDMETHODCALLTYP
  CVPVBIConfig::SetDirectDrawKernelHandle(
      ULONG_PTR dwDDKernelHandle)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -237,7 -267,9 +267,9 @@@ STDMETHODCALLTYP
  CVPVBIConfig::SetVideoPortID(
      IN DWORD dwVideoPortID)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -248,7 -280,9 +280,9 @@@ CVPVBIConfig::SetDDSurfaceKernelHandles
      DWORD cHandles,
      IN ULONG_PTR *rgDDKernelHandles)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -260,7 -294,9 +294,9 @@@ CVPVBIConfig::SetSurfaceParameters
      IN DWORD dwXOrigin,
      IN DWORD dwYOrigin)
  {
-     OutputDebugString("UNIMPLEMENTED\n");
+ #ifdef KSPROXY_TRACE
+     OutputDebugStringW(L"UNIMPLEMENTED\n");
+ #endif
      return E_NOTIMPL;
  }
  
@@@ -272,7 -308,9 +308,9 @@@ CVPVBIConfig_Constructor
      REFIID riid,
      LPVOID * ppv)
  {
+ #ifdef KSPROXY_TRACE
      OutputDebugStringW(L"CVPVBIConfig_Constructor\n");
+ #endif
  
      CVPVBIConfig * handler = new CVPVBIConfig();