ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
October 2009
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
641 discussions
Start a n
N
ew thread
[cwittich] 43619: -sync msxml3 with wine 1.1.31
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Oct 19 20:58:31 2009 New Revision: 43619 URL:
http://svn.reactos.org/svn/reactos?rev=43619&view=rev
Log: -sync msxml3 with wine 1.1.31 Modified: trunk/reactos/dll/win32/msxml3/attribute.c trunk/reactos/dll/win32/msxml3/cdata.c trunk/reactos/dll/win32/msxml3/comment.c trunk/reactos/dll/win32/msxml3/docfrag.c trunk/reactos/dll/win32/msxml3/domdoc.c trunk/reactos/dll/win32/msxml3/element.c trunk/reactos/dll/win32/msxml3/entityref.c trunk/reactos/dll/win32/msxml3/msxml_private.h trunk/reactos/dll/win32/msxml3/node.c trunk/reactos/dll/win32/msxml3/pi.c trunk/reactos/dll/win32/msxml3/text.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/msxml3/attribute.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/attribute…
Modified: trunk/reactos/dll/win32/msxml3/cdata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/cdata.c?r…
Modified: trunk/reactos/dll/win32/msxml3/comment.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/comment.c…
Modified: trunk/reactos/dll/win32/msxml3/docfrag.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/docfrag.c…
Modified: trunk/reactos/dll/win32/msxml3/domdoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/domdoc.c?…
Modified: trunk/reactos/dll/win32/msxml3/element.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/element.c…
Modified: trunk/reactos/dll/win32/msxml3/entityref.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/entityref…
Modified: trunk/reactos/dll/win32/msxml3/msxml_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/msxml_pri…
Modified: trunk/reactos/dll/win32/msxml3/node.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/node.c?re…
Modified: trunk/reactos/dll/win32/msxml3/pi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/pi.c?rev=…
Modified: trunk/reactos/dll/win32/msxml3/text.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/text.c?re…
15 years, 2 months
1
0
0
0
[janderwald] 43618: [PORTCLS] - Silence most dprints of portcls - Remove dead code - Fix a bug in PcCreateSubdeviceDescriptor
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Oct 19 20:54:01 2009 New Revision: 43618 URL:
http://svn.reactos.org/svn/reactos?rev=43618&view=rev
Log: [PORTCLS] - Silence most dprints of portcls - Remove dead code - Fix a bug in PcCreateSubdeviceDescriptor Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/adapter.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/api.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/drm_port.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_dmus.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_topology.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavepci.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavert.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp trunk/reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_dmus.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavepci.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavert.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/port.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/port_dmus.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavert.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavertstream.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/power.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/unregister.cpp Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/adapter.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/adapter.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/adapter.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -28,11 +28,11 @@ IN PUNICODE_STRING RegistryPathName, IN PDRIVER_ADD_DEVICE AddDevice) { - DPRINT1("PcInitializeAdapterDriver\n"); + DPRINT("PcInitializeAdapterDriver\n"); PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL); // Our IRP handlers - DPRINT1("Setting IRP handlers\n"); + DPRINT("Setting IRP handlers\n"); DriverObject->MajorFunction[IRP_MJ_CREATE] = PcDispatchIrp; DriverObject->MajorFunction[IRP_MJ_PNP] = PcDispatchIrp; DriverObject->MajorFunction[IRP_MJ_POWER] = PcDispatchIrp; @@ -79,7 +79,7 @@ PDEVICE_OBJECT PrevDeviceObject; PPCLASS_DEVICE_EXTENSION portcls_ext = NULL; - DPRINT1("PcAddAdapterDevice called\n"); + DPRINT("PcAddAdapterDevice called\n"); PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL); if (!DriverObject || !PhysicalDeviceObject || !StartDevice) @@ -215,7 +215,7 @@ UNICODE_STRING RefName; PSYMBOLICLINK_ENTRY SymEntry; - DPRINT1("PcRegisterSubdevice DeviceObject %p Name %S Unknown %p\n", DeviceObject, Name, Unknown); + DPRINT("PcRegisterSubdevice DeviceObject %p Name %S Unknown %p\n", DeviceObject, Name, Unknown); PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL); @@ -240,7 +240,7 @@ Status = Unknown->QueryInterface(IID_ISubdevice, (LPVOID*)&SubDevice); if (!NT_SUCCESS(Status)) { - DPRINT1("No ISubdevice interface\n"); + DPRINT("No ISubdevice interface\n"); // the provided port driver doesnt support ISubdevice return STATUS_INVALID_PARAMETER; } @@ -249,7 +249,7 @@ Status = SubDevice->GetDescriptor(&SubDeviceDescriptor); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to get subdevice descriptor %x\n", Status); + DPRINT("Failed to get subdevice descriptor %x\n", Status); SubDevice->Release(); return STATUS_UNSUCCESSFUL; } @@ -260,7 +260,7 @@ { // failed to attach SubDevice->Release(); - DPRINT1("KsAddObjectCreateItemToDeviceHeader failed with %x\n", Status); + DPRINT("KsAddObjectCreateItemToDeviceHeader failed with %x\n", Status); return Status; } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/api.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/api.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/api.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -92,7 +92,7 @@ TimerContext = (PTIMER_CONTEXT)AllocateItem(NonPagedPool, sizeof(TIMER_CONTEXT), TAG_PORTCLASS); if (!TimerContext) { - DPRINT1("Failed to allocate memory\n"); + DPRINT("Failed to allocate memory\n"); return STATUS_INSUFFICIENT_RESOURCES; } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -82,7 +82,7 @@ PUNKNOWN(*Output)->AddRef(); return STATUS_SUCCESS; } - DPRINT1("No interface!!!\n"); + DPRINT("No interface!!!\n"); return STATUS_UNSUCCESSFUL; } @@ -101,20 +101,20 @@ // Did the caller already allocate a buffer ?*/ if (m_Buffer) { - DPRINT1("CDmaChannelInit_AllocateBuffer free common buffer first \n"); + DPRINT("CDmaChannelInit_AllocateBuffer free common buffer first \n"); return STATUS_UNSUCCESSFUL; } m_Buffer = m_pAdapter->DmaOperations->AllocateCommonBuffer(m_pAdapter, BufferSize, &m_Address, FALSE); if (!m_Buffer) { - DPRINT1("CDmaChannelInit_AllocateBuffer fAllocateCommonBuffer failed \n"); + DPRINT("CDmaChannelInit_AllocateBuffer fAllocateCommonBuffer failed \n"); return STATUS_UNSUCCESSFUL; } m_BufferSize = BufferSize; m_AllocatedBufferSize = BufferSize; - DPRINT1("CDmaChannelInit::AllocateBuffer Success Buffer %p BufferSize %u Address %x\n", m_Buffer, BufferSize, m_Address); + DPRINT("CDmaChannelInit::AllocateBuffer Success Buffer %p BufferSize %u Address %x\n", m_Buffer, BufferSize, m_Address); return STATUS_SUCCESS; } @@ -162,7 +162,7 @@ if (!m_Buffer) { - DPRINT1("CDmaChannelInit_FreeBuffer allocate common buffer first \n"); + DPRINT("CDmaChannelInit_FreeBuffer allocate common buffer first \n"); return; } @@ -222,6 +222,7 @@ NTAPI CDmaChannelInit::BufferSize() { + DPRINT("BufferSize %u\n", m_BufferSize); return m_BufferSize; } @@ -254,6 +255,8 @@ if (!m_DmaStarted || Counter >= m_LastTransferCount) Counter = 0; + + DPRINT("ReadCounter %u\n", Counter); return Counter; } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/drm_port.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/drm_port.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/drm_port.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -57,7 +57,7 @@ if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) { - DPRINT1("IDrmPort2_QueryInterface no interface!!! iface %S\n", GuidString.Buffer); + DPRINT("IDrmPort2_QueryInterface no interface!!! iface %S\n", GuidString.Buffer); RtlFreeUnicodeString(&GuidString); } return STATUS_UNSUCCESSFUL; Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_dmus.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_dmus.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_dmus.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -138,7 +138,7 @@ if (IoStack->Parameters.DeviceIoControl.IoControlCode != IOCTL_KS_PROPERTY) { - DPRINT1("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength); + DPRINT("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength); Irp->IoStatus.Status = STATUS_SUCCESS; Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_topology.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_topology.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_topology.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -95,7 +95,7 @@ if (IoStack->Parameters.DeviceIoControl.IoControlCode != IOCTL_KS_PROPERTY) { - DPRINT1("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength); + DPRINT("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength); Irp->IoStatus.Status = STATUS_SUCCESS; Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -141,9 +141,9 @@ if (IoStack->Parameters.DeviceIoControl.IoControlCode != IOCTL_KS_PROPERTY) { - DPRINT1("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength); + DPRINT("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength); - Irp->IoStatus.Status = STATUS_SUCCESS; + Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; IoCompleteRequest(Irp, IO_NO_INCREMENT); return STATUS_SUCCESS; @@ -336,7 +336,6 @@ if (m_Pins[Index] == Pin) { m_Descriptor->Factory.Instances[Index].CurrentPinInstanceCount--; - m_Pins[Index]->Release(); m_Pins[Index] = NULL; return STATUS_SUCCESS; } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavepci.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavepci.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavepci.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -143,7 +143,7 @@ if (IoStack->Parameters.DeviceIoControl.IoControlCode != IOCTL_KS_PROPERTY) { - DPRINT1("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength); + DPRINT("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength); Irp->IoStatus.Status = STATUS_SUCCESS; Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavert.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavert.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavert.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -147,7 +147,7 @@ if (IoStack->Parameters.DeviceIoControl.IoControlCode != IOCTL_KS_PROPERTY) { - DPRINT1("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength); + DPRINT("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength); Irp->IoStatus.Status = STATUS_SUCCESS; Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -797,6 +797,8 @@ STDMETHOD_(PMINIPORT, GetMiniport)(THIS) PURE; }; +typedef IPortPinWaveCyclic *PPORTPINWAVECYCLIC; + #define IMP_IPortPinWaveCyclic \ IMP_IIrpTarget; \ STDMETHODIMP_(NTSTATUS) Init(THIS_ \ Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -82,7 +82,7 @@ return STATUS_SUCCESS; } - DPRINT1("CInterruptSync::QueryInterface: this %p UNKNOWN interface requested\n", this); + DPRINT("CInterruptSync::QueryInterface: this %p UNKNOWN interface requested\n", this); return STATUS_UNSUCCESSFUL; } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -126,7 +126,7 @@ return PcCompleteIrp(DeviceObject, Irp, Status); } - DPRINT1("unhandled function %u\n", IoStack->MinorFunction); + DPRINT("unhandled function %u\n", IoStack->MinorFunction); Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; IoCompleteRequest(Irp, IO_NO_INCREMENT); @@ -182,7 +182,7 @@ if (DeviceExtension->AdapterPowerManagement) { // release adapter power management - DPRINT1("Power %u\n", DeviceExtension->AdapterPowerManagement->Release()); + DPRINT("Power %u\n", DeviceExtension->AdapterPowerManagement->Release()); } Irp->IoStatus.Status = STATUS_SUCCESS; @@ -229,7 +229,7 @@ return PortClsShutdown(DeviceObject, Irp); default: - DPRINT1("Unhandled function %x\n", IoStack->MajorFunction); + DPRINT("Unhandled function %x\n", IoStack->MajorFunction); break; }; Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -108,6 +108,8 @@ NTSTATUS Status = STATUS_SUCCESS; PIO_STACK_LOCATION IoStack; + PC_ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL); + // get current irp stack location IoStack = IoGetCurrentIrpStackLocation(Irp); @@ -126,7 +128,7 @@ // check for success if (!NT_SUCCESS(Status)) { - DPRINT1("KsProbeStreamIrp failed with %x\n", Status); + DPRINT("KsProbeStreamIrp failed with %x\n", Status); return Status; } } @@ -135,7 +137,7 @@ PC_ASSERT(Header); PC_ASSERT(Irp->MdlAddress); - DPRINT1("Size %u DataUsed %u FrameExtent %u SizeHeader %u NumDataAvailable %u OutputLength %u\n", Header->Size, Header->DataUsed, Header->FrameExtent, sizeof(KSSTREAM_HEADER), m_NumDataAvailable, IoStack->Parameters.DeviceIoControl.OutputBufferLength); + DPRINT("Size %u DataUsed %u FrameExtent %u SizeHeader %u NumDataAvailable %u OutputLength %u\n", Header->Size, Header->DataUsed, Header->FrameExtent, sizeof(KSSTREAM_HEADER), m_NumDataAvailable, IoStack->Parameters.DeviceIoControl.OutputBufferLength); Header->Data = MmGetSystemAddressForMdlSafe(Irp->MdlAddress, NormalPagePriority); PC_ASSERT(Header->Data); Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_dmus.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_dmus.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_dmus.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -238,7 +238,7 @@ { // reset start stream This->m_IrpQueue->CancelBuffers(); //FIX function name - DPRINT1("Stopping PreCompleted %u PostCompleted %u\n", This->m_PreCompleted, This->m_PostCompleted); + DPRINT("Stopping PreCompleted %u PostCompleted %u\n", This->m_PreCompleted, This->m_PostCompleted); } } } @@ -546,7 +546,7 @@ if (Stream) { - DPRINT1("Closing stream at Irql %u\n", KeGetCurrentIrql()); + DPRINT("Closing stream at Irql %u\n", KeGetCurrentIrql()); Stream->Release(); } } @@ -564,14 +564,14 @@ Ctx = (PCLOSESTREAM_CONTEXT)AllocateItem(NonPagedPool, sizeof(CLOSESTREAM_CONTEXT), TAG_PORTCLASS); if (!Ctx) { - DPRINT1("Failed to allocate stream context\n"); + DPRINT("Failed to allocate stream context\n"); goto cleanup; } Ctx->WorkItem = IoAllocateWorkItem(DeviceObject); if (!Ctx->WorkItem) { - DPRINT1("Failed to allocate work item\n"); + DPRINT("Failed to allocate work item\n"); goto cleanup; } @@ -714,14 +714,14 @@ } else { - DPRINT1("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow); + DPRINT("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow); KeBugCheck(0); } Status = NewIrpQueue(&m_IrpQueue); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to allocate IrpQueue with %x\n", Status); + DPRINT("Failed to allocate IrpQueue with %x\n", Status); return Status; } @@ -762,7 +762,7 @@ Status = m_ServiceGroup->AddMember(PSERVICESINK(this)); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to add pin to service group\n"); + DPRINT("Failed to add pin to service group\n"); return Status; } m_ServiceGroup->SupportDelayedService(); @@ -771,7 +771,7 @@ Status = m_IrpQueue->Init(ConnectDetails, m_Format, DeviceObject, 0, 0, NULL); if (!NT_SUCCESS(Status)) { - DPRINT1("IrpQueue_Init failed with %x\n", Status); + DPRINT("IrpQueue_Init failed with %x\n", Status); return Status; } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -41,13 +41,10 @@ VOID UpdateCommonBuffer(ULONG Position, ULONG MaxTransferCount); VOID UpdateCommonBufferOverlap(ULONG Position, ULONG MaxTransferCount); - VOID NTAPI SetStreamState(IN KSSTATE State); NTSTATUS NTAPI HandleKsStream(IN PIRP Irp); NTSTATUS NTAPI HandleKsProperty(IN PIRP Irp); - friend VOID NTAPI CloseStreamRoutineWaveCyclic(IN PDEVICE_OBJECT DeviceObject, IN PVOID Context); - friend VOID NTAPI SetStreamWorkerRoutineWaveCyclic(IN PDEVICE_OBJECT DeviceObject, IN PVOID Context); friend NTSTATUS NTAPI PinWaveCyclicState(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data); friend NTSTATUS NTAPI PinWaveCyclicDataFormat(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data); friend NTSTATUS NTAPI PinWaveCyclicAudioPosition(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data); @@ -211,7 +208,7 @@ // copy audio position RtlMoveMemory(Data, &Pin->m_Position, sizeof(KSAUDIO_POSITION)); - DPRINT1("Play %lu Record %lu\n", Pin->m_Position.PlayOffset, Pin->m_Position.WriteOffset); + DPRINT("Play %lu Record %lu\n", Pin->m_Position.PlayOffset, Pin->m_Position.WriteOffset); Irp->IoStatus.Information = sizeof(KSAUDIO_POSITION); return STATUS_SUCCESS; } @@ -355,7 +352,7 @@ PC_ASSERT(IsEqualGUIDAligned(((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->DataFormat.Specifier, KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)); - DPRINT1("NewDataFormat: Channels %u Bits %u Samples %u\n", ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nChannels, + DPRINT("NewDataFormat: Channels %u Bits %u Samples %u\n", ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nChannels, ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.wBitsPerSample, ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nSamplesPerSec); #endif @@ -492,111 +489,6 @@ VOID NTAPI -SetStreamWorkerRoutineWaveCyclic( - IN PDEVICE_OBJECT DeviceObject, - IN PVOID Context) -{ - CPortPinWaveCyclic * This; - PSETSTREAM_CONTEXT Ctx = (PSETSTREAM_CONTEXT)Context; - KSSTATE State; - ULONG MinimumDataThreshold; - ULONG MaximumDataThreshold; - - This = Ctx->Pin; - State = Ctx->State; - - IoFreeWorkItem(Ctx->WorkItem); - FreeItem(Ctx, TAG_PORTCLASS); - - // Has the audio stream resumed? - if (This->m_IrpQueue->NumMappings() && State == KSSTATE_STOP) - return; - - // Has the audio state already been set? - if (This->m_State == State) - return; - - // Set the state - if (NT_SUCCESS(This->m_Stream->SetState(State))) - { - // Set internal state - This->m_State = State; - - if (This->m_State == KSSTATE_STOP) - { - // reset start stream - This->m_IrpQueue->CancelBuffers(); //FIX function name - - // increase stop counter - This->m_StopCount++; - // get current data threshold - MinimumDataThreshold = This->m_IrpQueue->GetMinimumDataThreshold(); - // get maximum data threshold - MaximumDataThreshold = ((PKSDATAFORMAT_WAVEFORMATEX)This->m_Format)->WaveFormatEx.nAvgBytesPerSec; - // increase minimum data threshold by a third sec - MinimumDataThreshold += This->m_FrameSize * 10; - - // assure it has not exceeded - MinimumDataThreshold = min(MinimumDataThreshold, MaximumDataThreshold); - // store minimum data threshold - This->m_IrpQueue->SetMinimumDataThreshold(MinimumDataThreshold); - - DPRINT1("Stopping TotalPackets %u StopCount %u\n", This->m_TotalPackets, This->m_StopCount); - } - if (This->m_State == KSSTATE_RUN) - { - DPRINT1("State RUN %x MinAvailable %u CommonBufferSize %u Offset %u\n", State, This->m_IrpQueue->MinimumDataAvailable(), This->m_CommonBufferSize, This->m_CommonBufferOffset); - } - } -} - -VOID -NTAPI -CPortPinWaveCyclic::SetStreamState( - IN KSSTATE State) -{ - PDEVICE_OBJECT DeviceObject; - PIO_WORKITEM WorkItem; - PSETSTREAM_CONTEXT Context; - - PC_ASSERT(KeGetCurrentIrql() <= DISPATCH_LEVEL); - - // Has the audio stream resumed? - if (m_IrpQueue->NumMappings() && State == KSSTATE_STOP) - return; - - // Has the audio state already been set? - if (m_State == State) - return; - - // Get device object - DeviceObject = GetDeviceObject(m_Port); - - // allocate set state context - Context = (PSETSTREAM_CONTEXT)AllocateItem(NonPagedPool, sizeof(SETSTREAM_CONTEXT), TAG_PORTCLASS); - - if (!Context) - return; - - // allocate work item - WorkItem = IoAllocateWorkItem(DeviceObject); - - if (!WorkItem) - { - ExFreePool(Context); - return; - } - - Context->Pin = this; - Context->WorkItem = WorkItem; - Context->State = State; - - // queue the work item - IoQueueWorkItem(WorkItem, SetStreamWorkerRoutineWaveCyclic, DelayedWorkQueue, (PVOID)Context); -} - -VOID -NTAPI CPortPinWaveCyclic::RequestService() { ULONG Position; @@ -609,7 +501,6 @@ Status = m_IrpQueue->GetMapping(&Buffer, &BufferSize); if (!NT_SUCCESS(Status)) { - //SetStreamState(This, KSSTATE_STOP); return; } @@ -638,7 +529,6 @@ IN KSOBJECT_CREATE *CreateObject) { UNIMPLEMENTED - DbgBreakPoint(); return STATUS_UNSUCCESSFUL; } @@ -660,7 +550,7 @@ if (IoStack->Parameters.DeviceIoControl.IoControlCode != IOCTL_KS_PROPERTY) { - DPRINT1("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength); + DPRINT("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength); Irp->IoStatus.Status = STATUS_SUCCESS; @@ -675,7 +565,7 @@ Property = (PKSPROPERTY)IoStack->Parameters.DeviceIoControl.Type3InputBuffer; RtlStringFromGUID(Property->Set, &GuidString); - DPRINT1("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags); + DPRINT("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags); RtlFreeUnicodeString(&GuidString); } @@ -792,127 +682,82 @@ return KsDispatchInvalidDeviceRequest(DeviceObject, Irp); } -VOID -NTAPI -CloseStreamRoutineWaveCyclic( - IN PDEVICE_OBJECT DeviceObject, - IN PVOID Context) -{ - PMINIPORTWAVECYCLICSTREAM Stream; - CPortPinWaveCyclic * This; - NTSTATUS Status; - PCLOSESTREAM_CONTEXT Ctx = (PCLOSESTREAM_CONTEXT)Context; - - This = (CPortPinWaveCyclic*)Ctx->Pin; - - if (This->m_State != KSSTATE_STOP) - { - // stop stream in case it hasn't been - Status = This->m_Stream->SetState(KSSTATE_STOP); - if (!NT_SUCCESS(Status)) - DPRINT1("Warning: failed to stop stream with %x\n", Status); - - This->m_State = KSSTATE_STOP; - } - - if (This->m_Format) - { - // free format - ExFreePool(This->m_Format); - This->m_Format = NULL; - } - - if (This->m_IrpQueue) - { - This->m_IrpQueue->Release(); - } - - // complete the irp - Ctx->Irp->IoStatus.Information = 0; - Ctx->Irp->IoStatus.Status = STATUS_SUCCESS; - IoCompleteRequest(Ctx->Irp, IO_NO_INCREMENT); - - // free the work item - IoFreeWorkItem(Ctx->WorkItem); - - // free work item ctx - FreeItem(Ctx, TAG_PORTCLASS); - - // release reference to port driver - This->m_Port->Release(); - - // release reference to filter instance - This->m_Filter->Release(); - - if (This->m_Stream) - { - Stream = This->m_Stream; - This->m_Stream = NULL; - This->m_Filter->FreePin(This); - DPRINT1("Closing stream at Irql %u\n", KeGetCurrentIrql()); - Stream->Release(); - } -} - NTSTATUS NTAPI CPortPinWaveCyclic::Close( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - PCLOSESTREAM_CONTEXT Ctx; - - DPRINT1("CPortPinWaveCyclic::Close entered\n"); - - if (m_Stream) - { - // allocate a close context - Ctx = (PCLOSESTREAM_CONTEXT)AllocateItem(NonPagedPool, sizeof(CLOSESTREAM_CONTEXT), TAG_PORTCLASS); - if (!Ctx) - { - DPRINT1("Failed to allocate stream context\n"); - goto cleanup; - } - // allocate work context - Ctx->WorkItem = IoAllocateWorkItem(DeviceObject); - if (!Ctx->WorkItem) - { - DPRINT1("Failed to allocate work item\n"); - goto cleanup; - } - // setup the close context - Ctx->Irp = Irp; - Ctx->Pin = this; - - IoMarkIrpPending(Irp); - Irp->IoStatus.Information = 0; - Irp->IoStatus.Status = STATUS_PENDING; - + DPRINT("CPortPinWaveCyclic::Close entered\n"); + + PC_ASSERT_IRQL(PASSIVE_LEVEL); + + if (m_Format) + { + // free format + ExFreePool(m_Format); + m_Format = NULL; + } + + if (m_IrpQueue) + { + // fixme cancel irps + m_IrpQueue->Release(); + } + + + if (m_Port) + { + // release reference to port driver + m_Port->Release(); + m_Port = NULL; + } + + if (m_ServiceGroup) + { // remove member from service group m_ServiceGroup->RemoveMember(PSERVICESINK(this)); - - // defer work item - IoQueueWorkItem(Ctx->WorkItem, CloseStreamRoutineWaveCyclic, DelayedWorkQueue, (PVOID)Ctx); - // Return result - return STATUS_PENDING; + m_ServiceGroup = NULL; + } + + if (m_Stream) + { + if (m_State != KSSTATE_STOP) + { + // stop stream + NTSTATUS Status = m_Stream->SetState(KSSTATE_STOP); + if (!NT_SUCCESS(Status)) + { + DPRINT("Warning: failed to stop stream with %x\n", Status); + PC_ASSERT(0); + } + } + // set state to stop + m_State = KSSTATE_STOP; + + + DPRINT("Closing stream at Irql %u\n", KeGetCurrentIrql()); + // release stream + m_Stream->Release(); + + } + + + if (m_Filter) + { + // release reference to filter instance + m_Filter->FreePin((PPORTPINWAVECYCLIC)this); + m_Filter->Release(); + m_Filter = NULL; } Irp->IoStatus.Information = 0; Irp->IoStatus.Status = STATUS_SUCCESS; IoCompleteRequest(Irp, IO_NO_INCREMENT); + delete this; + return STATUS_SUCCESS; - -cleanup: - - if (Ctx) - FreeItem(Ctx, TAG_PORTCLASS); - - Irp->IoStatus.Information = 0; - Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return STATUS_UNSUCCESSFUL; - } NTSTATUS @@ -1022,7 +867,7 @@ } else { - DPRINT1("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow); + DPRINT("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow); KeBugCheck(0); } @@ -1040,7 +885,7 @@ if (NT_SUCCESS(Status)) { DRMRIGHTS DrmRights; - DPRINT1("Got IID_IDrmAudioStream interface %p\n", DrmAudio); + DPRINT("Got IID_IDrmAudioStream interface %p\n", DrmAudio); DrmRights.CopyProtect = FALSE; DrmRights.Reserved = 0; @@ -1087,7 +932,7 @@ Status = m_ServiceGroup->AddMember(PSERVICESINK(this)); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to add pin to service group\n"); + DPRINT("Failed to add pin to service group\n"); return Status; } @@ -1138,9 +983,10 @@ m_Port = Port; m_Filter = Filter; - DPRINT1("Setting state to acquire %x\n", m_Stream->SetState(KSSTATE_ACQUIRE)); - DPRINT1("Setting state to pause %x\n", m_Stream->SetState(KSSTATE_PAUSE)); - m_State = KSSTATE_PAUSE; + DPRINT("Setting state to acquire %x\n", m_Stream->SetState(KSSTATE_ACQUIRE)); + DPRINT("Setting state to pause %x\n", m_Stream->SetState(KSSTATE_PAUSE)); + DPRINT("Setting state to run %x\n", m_Stream->SetState(KSSTATE_RUN)); + m_State = KSSTATE_RUN; return STATUS_SUCCESS; Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavepci.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavepci.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavepci.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -181,7 +181,7 @@ // copy audio position RtlMoveMemory(Data, &Pin->m_Position, sizeof(KSAUDIO_POSITION)); - DPRINT1("Play %lu Record %lu\n", Pin->m_Position.PlayOffset, Pin->m_Position.WriteOffset); + DPRINT("Play %lu Record %lu\n", Pin->m_Position.PlayOffset, Pin->m_Position.WriteOffset); Irp->IoStatus.Information = sizeof(KSAUDIO_POSITION); return STATUS_SUCCESS; } @@ -325,7 +325,7 @@ PC_ASSERT(IsEqualGUIDAligned(((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->DataFormat.Specifier, KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)); - DPRINT1("NewDataFormat: Channels %u Bits %u Samples %u\n", ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nChannels, + DPRINT("NewDataFormat: Channels %u Bits %u Samples %u\n", ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nChannels, ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.wBitsPerSample, ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nSamplesPerSec); #endif @@ -470,7 +470,7 @@ // store minimum data threshold m_IrpQueue->SetMinimumDataThreshold(MinimumDataThreshold); - DPRINT1("Stopping TotalCompleted %u StopCount %u MinimumDataThreshold %u\n", m_TotalPackets, m_StopCount, MinimumDataThreshold); + DPRINT("Stopping TotalCompleted %u StopCount %u MinimumDataThreshold %u\n", m_TotalPackets, m_StopCount, MinimumDataThreshold); } if (m_State == KSSTATE_RUN) { @@ -608,7 +608,7 @@ if (IoStack->Parameters.DeviceIoControl.IoControlCode != IOCTL_KS_PROPERTY) { - DPRINT1("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength); + DPRINT("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength); Irp->IoStatus.Status = STATUS_SUCCESS; @@ -623,7 +623,7 @@ Property = (PKSPROPERTY)IoStack->Parameters.DeviceIoControl.Type3InputBuffer; RtlStringFromGUID(Property->Set, &GuidString); - DPRINT1("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags); + DPRINT("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags); RtlFreeUnicodeString(&GuidString); } @@ -787,7 +787,7 @@ { Stream = m_Stream; m_Stream = 0; - DPRINT1("Closing stream at Irql %u\n", KeGetCurrentIrql()); + DPRINT("Closing stream at Irql %u\n", KeGetCurrentIrql()); Stream->Release(); } } @@ -830,14 +830,14 @@ Ctx = (PCLOSESTREAM_CONTEXT)AllocateItem(NonPagedPool, sizeof(CLOSESTREAM_CONTEXT), TAG_PORTCLASS); if (!Ctx) { - DPRINT1("Failed to allocate stream context\n"); + DPRINT("Failed to allocate stream context\n"); goto cleanup; } Ctx->WorkItem = IoAllocateWorkItem(DeviceObject); if (!Ctx->WorkItem) { - DPRINT1("Failed to allocate work item\n"); + DPRINT("Failed to allocate work item\n"); goto cleanup; } @@ -980,7 +980,7 @@ } else { - DPRINT1("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow); + DPRINT("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow); KeBugCheck(0); } @@ -1004,7 +1004,7 @@ Status = m_ServiceGroup->AddMember(PSERVICESINK(this)); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to add pin to service group\n"); + DPRINT("Failed to add pin to service group\n"); return Status; } m_ServiceGroup->SupportDelayedService(); @@ -1016,7 +1016,7 @@ Status = m_Stream->GetAllocatorFraming(&m_AllocatorFraming); if (!NT_SUCCESS(Status)) { - DPRINT1("GetAllocatorFraming failed with %x\n", Status); + DPRINT("GetAllocatorFraming failed with %x\n", Status); return Status; } @@ -1058,7 +1058,7 @@ Status = m_IrpQueue->Init(ConnectDetails, m_Format, DeviceObject, m_AllocatorFraming.FrameSize, m_AllocatorFraming.FileAlignment, NULL); if (!NT_SUCCESS(Status)) { - DPRINT1("IrpQueue_Init failed with %x\n", Status); + DPRINT("IrpQueue_Init failed with %x\n", Status); return Status; } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavert.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavert.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavert.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -130,7 +130,7 @@ { // reset start stream This->m_IrpQueue->CancelBuffers(); //FIX function name - DPRINT1("Stopping PreCompleted %u PostCompleted %u\n", This->m_PreCompleted, This->m_PostCompleted); + DPRINT("Stopping PreCompleted %u PostCompleted %u\n", This->m_PreCompleted, This->m_PostCompleted); } if (This->m_State == KSSTATE_RUN) @@ -249,7 +249,7 @@ { Status = m_Stream->SetState(*State); - DPRINT1("Setting state %u %x\n", *State, Status); + DPRINT("Setting state %u %x\n", *State, Status); if (NT_SUCCESS(Status)) { m_State = *State; @@ -303,7 +303,7 @@ ASSERT(m_State == KSSTATE_STOP); #endif - DPRINT1("NewDataFormat: Channels %u Bits %u Samples %u\n", ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nChannels, + DPRINT("NewDataFormat: Channels %u Bits %u Samples %u\n", ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nChannels, ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.wBitsPerSample, ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nSamplesPerSec); @@ -321,7 +321,7 @@ return STATUS_SUCCESS; } } - DPRINT1("Failed to set format\n"); + DPRINT("Failed to set format\n"); Irp->IoStatus.Information = 0; Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; IoCompleteRequest(Irp, IO_NO_INCREMENT); @@ -331,7 +331,7 @@ { if (!m_Format) { - DPRINT1("No format\n"); + DPRINT("No format\n"); Irp->IoStatus.Information = 0; Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; IoCompleteRequest(Irp, IO_NO_INCREMENT); @@ -355,7 +355,7 @@ } RtlStringFromGUID(Property->Set, &GuidString); - DPRINT1("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags); + DPRINT("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags); RtlFreeUnicodeString(&GuidString); Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; @@ -414,7 +414,6 @@ } UNIMPLEMENTED - DbgBreakPoint(); Irp->IoStatus.Information = 0; Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; @@ -511,7 +510,7 @@ { Stream = This->m_Stream; This->m_Stream = NULL; - DPRINT1("Closing stream at Irql %u\n", KeGetCurrentIrql()); + DPRINT("Closing stream at Irql %u\n", KeGetCurrentIrql()); Stream->Release(); } } @@ -529,14 +528,14 @@ Ctx = (PCLOSESTREAM_CONTEXT)AllocateItem(NonPagedPool, sizeof(CLOSESTREAM_CONTEXT), TAG_PORTCLASS); if (!Ctx) { - DPRINT1("Failed to allocate stream context\n"); + DPRINT("Failed to allocate stream context\n"); goto cleanup; } Ctx->WorkItem = IoAllocateWorkItem(DeviceObject); if (!Ctx->WorkItem) { - DPRINT1("Failed to allocate work item\n"); + DPRINT("Failed to allocate work item\n"); goto cleanup; } @@ -696,7 +695,7 @@ } else { - DPRINT1("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow); + DPRINT("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow); KeBugCheck(0); } @@ -713,21 +712,21 @@ Status = m_Stream->AllocateAudioBuffer(16384 * 11, &m_Mdl, &m_CommonBufferSize, &m_CommonBufferOffset, &m_CacheType); if (!NT_SUCCESS(Status)) { - DPRINT1("AllocateAudioBuffer failed with %x\n", Status); + DPRINT("AllocateAudioBuffer failed with %x\n", Status); goto cleanup; } m_CommonBuffer = MmGetSystemAddressForMdlSafe(m_Mdl, NormalPagePriority); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to get system address %x\n", Status); + DPRINT("Failed to get system address %x\n", Status); IoFreeMdl(m_Mdl); m_Mdl = NULL; goto cleanup; } - DPRINT1("Setting state to acquire %x\n", m_Stream->SetState(KSSTATE_ACQUIRE)); - DPRINT1("Setting state to pause %x\n", m_Stream->SetState(KSSTATE_PAUSE)); + DPRINT("Setting state to acquire %x\n", m_Stream->SetState(KSSTATE_ACQUIRE)); + DPRINT("Setting state to pause %x\n", m_Stream->SetState(KSSTATE_PAUSE)); m_State = KSSTATE_PAUSE; return STATUS_SUCCESS; Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/port.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -47,7 +47,7 @@ if (RtlStringFromGUID(ClassId, &GuidString) == STATUS_SUCCESS) { - DPRINT1("unknown interface %S\n", GuidString.Buffer); + DPRINT("unknown interface %S\n", GuidString.Buffer); RtlFreeUnicodeString(&GuidString); } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_dmus.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_dmus.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_dmus.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -139,7 +139,7 @@ if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) { - DPRINT1("IPortMidi_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer); + DPRINT("IPortMidi_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer); RtlFreeUnicodeString(&GuidString); } return STATUS_UNSUCCESSFUL; @@ -225,7 +225,7 @@ Status = Miniport->GetDescription(&m_pDescriptor); if (!NT_SUCCESS(Status)) { - DPRINT1("failed to get description\n"); + DPRINT("failed to get description\n"); Miniport->Release(); m_bInitialized = FALSE; return Status; @@ -250,7 +250,7 @@ Status = MidiMiniport->GetDescription(&m_pDescriptor); if (!NT_SUCCESS(Status)) { - DPRINT1("failed to get description\n"); + DPRINT("failed to get description\n"); MidiMiniport->Release(); m_bInitialized = FALSE; return Status; @@ -278,7 +278,7 @@ if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to create descriptior\n"); + DPRINT("Failed to create descriptior\n"); if (Miniport) Miniport->Release(); Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -171,7 +171,7 @@ if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) { - DPRINT1("IPortTopology_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer); + DPRINT("IPortTopology_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer); RtlFreeUnicodeString(&GuidString); } return STATUS_UNSUCCESSFUL; @@ -219,14 +219,14 @@ if (m_bInitialized) { - DPRINT1("IPortTopology_Init called again\n"); + DPRINT("IPortTopology_Init called again\n"); return STATUS_SUCCESS; } Status = UnknownMiniport->QueryInterface(IID_IMiniportTopology, (PVOID*)&Miniport); if (!NT_SUCCESS(Status)) { - DPRINT1("IPortTopology_Init called with invalid IMiniport adapter\n"); + DPRINT("IPortTopology_Init called with invalid IMiniport adapter\n"); return STATUS_INVALID_PARAMETER; } @@ -239,7 +239,7 @@ Status = Miniport->Init(UnknownAdapter, ResourceList, this); if (!NT_SUCCESS(Status)) { - DPRINT1("IPortTopology_Init failed with %x\n", Status); + DPRINT("IPortTopology_Init failed with %x\n", Status); m_bInitialized = FALSE; Miniport->Release(); return Status; @@ -249,7 +249,7 @@ Status = Miniport->GetDescription(&m_pDescriptor); if (!NT_SUCCESS(Status)) { - DPRINT1("failed to get description\n"); + DPRINT("failed to get description\n"); Miniport->Release(); m_bInitialized = FALSE; return Status; @@ -371,7 +371,7 @@ NTAPI CPortTopology::ReleaseChildren() { - DPRINT1("ISubDevice_fnReleaseChildren\n"); + DPRINT("ISubDevice_fnReleaseChildren\n"); // release the filter m_Filter->Release(); @@ -468,7 +468,7 @@ WorkerContext->Irp, NULL); - DPRINT1("CreatePinWorkerRoutine Status %x\n", Status); + DPRINT("CreatePinWorkerRoutine Status %x\n", Status); if (NT_SUCCESS(Status)) { @@ -505,7 +505,7 @@ // sanity check PC_ASSERT(CreateItem); - DPRINT1("PcCreatePinDispatch called DeviceObject %p %S Name\n", DeviceObject, CreateItem->ObjectClass.Buffer); + DPRINT("PcCreatePinDispatch called DeviceObject %p %S Name\n", DeviceObject, CreateItem->ObjectClass.Buffer); Filter = (IIrpTarget*)CreateItem->Context; @@ -517,7 +517,7 @@ Status = KsReferenceSoftwareBusObject(DeviceExt->KsDeviceHeader); if (!NT_SUCCESS(Status) && Status != STATUS_NOT_IMPLEMENTED) { - DPRINT1("PcCreatePinDispatch failed to reference device header\n"); + DPRINT("PcCreatePinDispatch failed to reference device header\n"); FreeItem(Entry, TAG_PORTCLASS); goto cleanup; @@ -577,7 +577,7 @@ // access the create item CreateItem = KSCREATE_ITEM_IRP_STORAGE(Irp); - DPRINT1("PcCreateItemDispatch called DeviceObject %p %S Name\n", DeviceObject, CreateItem->ObjectClass.Buffer); + DPRINT("PcCreateItemDispatch called DeviceObject %p %S Name\n", DeviceObject, CreateItem->ObjectClass.Buffer); // get the subdevice SubDevice = (ISubdevice*)CreateItem->Context; @@ -589,7 +589,7 @@ Status = KsReferenceSoftwareBusObject(DeviceExt->KsDeviceHeader); if (!NT_SUCCESS(Status) && Status != STATUS_NOT_IMPLEMENTED) { - DPRINT1("PcCreateItemDispatch failed to reference device header\n"); + DPRINT("PcCreateItemDispatch failed to reference device header\n"); FreeItem(Entry, TAG_PORTCLASS); goto cleanup; @@ -606,7 +606,7 @@ NULL); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to get filter object\n"); + DPRINT("Failed to get filter object\n"); Irp->IoStatus.Status = Status; IoCompleteRequest(Irp, IO_NO_INCREMENT); return Status; Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -181,7 +181,7 @@ if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) { - DPRINT1("IPortWaveCyclic_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer); + DPRINT("IPortWaveCyclic_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer); RtlFreeUnicodeString(&GuidString); } @@ -268,7 +268,7 @@ Status = Miniport->GetDescription(&m_pDescriptor); if (!NT_SUCCESS(Status)) { - DPRINT1("failed to get description\n"); + DPRINT("failed to get description\n"); Miniport->Release(); m_bInitialized = FALSE; return Status; @@ -292,7 +292,7 @@ if (!NT_SUCCESS(Status)) { - DPRINT1("PcCreateSubdeviceDescriptor failed with %x\n", Status); + DPRINT("PcCreateSubdeviceDescriptor failed with %x\n", Status); Miniport->Release(); m_bInitialized = FALSE; return Status; Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -201,7 +201,7 @@ if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) { - DPRINT1("IPortWavePci_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer); + DPRINT("IPortWavePci_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer); RtlFreeUnicodeString(&GuidString); } @@ -269,7 +269,7 @@ Status = Miniport->GetDescription(&m_pDescriptor); if (!NT_SUCCESS(Status)) { - DPRINT1("failed to get description\n"); + DPRINT("failed to get description\n"); Miniport->Release(); m_bInitialized = FALSE; return Status; @@ -294,7 +294,7 @@ if (!NT_SUCCESS(Status)) { - DPRINT1("PcCreateSubdeviceDescriptor failed with %x\n", Status); + DPRINT("PcCreateSubdeviceDescriptor failed with %x\n", Status); Miniport->Release(); m_bInitialized = FALSE; return Status; @@ -489,7 +489,7 @@ CPortWavePci::GetDescriptor( IN SUBDEVICE_DESCRIPTOR ** Descriptor) { - DPRINT1("ISubDevice_GetDescriptor this %p\n", this); + DPRINT("ISubDevice_GetDescriptor this %p\n", this); *Descriptor = m_SubDeviceDescriptor; return STATUS_SUCCESS; } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavert.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavert.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavert.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -174,7 +174,7 @@ if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) { - DPRINT1("IPortWaveRT_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer); + DPRINT("IPortWaveRT_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer); RtlFreeUnicodeString(&GuidString); } @@ -256,7 +256,7 @@ Status = Miniport->GetDescription(&m_pDescriptor); if (!NT_SUCCESS(Status)) { - DPRINT1("failed to get description\n"); + DPRINT("failed to get description\n"); Miniport->Release(); m_bInitialized = FALSE; return Status; @@ -280,7 +280,7 @@ if (!NT_SUCCESS(Status)) { - DPRINT1("PcCreateSubdeviceDescriptor failed with %x\n", Status); + DPRINT("PcCreateSubdeviceDescriptor failed with %x\n", Status); Miniport->Release(); m_bInitialized = FALSE; return Status; Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavertstream.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavertstream.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavertstream.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -81,7 +81,7 @@ Buffer = MmAllocateContiguousMemorySpecifyCache(TotalBytes, LowAddress, HighAddress, RtlConvertUlongToLargeInteger(0), MmNonCached); if (!Buffer) { - DPRINT1("MmAllocateContiguousMemorySpecifyCache failed\n"); + DPRINT("MmAllocateContiguousMemorySpecifyCache failed\n"); return NULL; } @@ -92,13 +92,13 @@ Mdl = MmAllocatePagesForMdl(Address, HighAddress, RtlConvertUlongToLargeInteger(0), TotalBytes); if (!Mdl) { - DPRINT1("MmAllocatePagesForMdl failed\n"); + DPRINT("MmAllocatePagesForMdl failed\n"); return NULL; } if (MmGetMdlByteCount(Mdl) < TotalBytes) { - DPRINT1("ByteCount %u Required %u\n", MmGetMdlByteCount(Mdl), TotalBytes); + DPRINT("ByteCount %u Required %u\n", MmGetMdlByteCount(Mdl), TotalBytes); MmFreePagesFromMdl(Mdl); ExFreePool(Mdl); return NULL; @@ -157,7 +157,7 @@ Pages = ADDRESS_AND_SIZE_TO_SPAN_PAGES(0, MmGetMdlByteCount(MemoryDescriptorList)); if (Pages <= Index) { - DPRINT1("OutOfBounds: Pages %u Index %u\n", Pages, Index); + DPRINT("OutOfBounds: Pages %u Index %u\n", Pages, Index); return RtlConvertUlongToLargeInteger(0); } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/power.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/power.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/power.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -32,7 +32,7 @@ Status = pUnknown->QueryInterface(IID_IAdapterPowerManagement, (PVOID*)&pPower); if (!NT_SUCCESS(Status)) { - DPRINT1("PcRegisterAdapterPowerManagement no IAdapterPowerManagement interface %x\n", Status); + DPRINT("PcRegisterAdapterPowerManagement no IAdapterPowerManagement interface %x\n", Status); DeviceExt->AdapterPowerManagement = NULL; return STATUS_SUCCESS; } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -124,13 +124,13 @@ if (RequestLength < sizeof(KSP_PIN)) { // input buffer must be at least sizeof KSP_PIN - DPRINT1("input length too small\n"); + DPRINT("input length too small\n"); return STATUS_INVALID_PARAMETER; } if (IsListEmpty(&Descriptor->PhysicalConnectionList)) { - DPRINT1("no connection\n"); + DPRINT("no connection\n"); return STATUS_NOT_FOUND; } @@ -201,7 +201,7 @@ Status = IrpTarget->QueryInterface(IID_IPort, (PVOID*)&Port); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to obtain IPort interface from filter\n"); + DPRINT("Failed to obtain IPort interface from filter\n"); Irp->IoStatus.Information = 0; Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; return STATUS_UNSUCCESSFUL; @@ -211,7 +211,7 @@ Status = Port->QueryInterface(IID_ISubdevice, (PVOID*)&SubDevice); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to obtain ISubdevice interface from port driver\n"); + DPRINT("Failed to obtain ISubdevice interface from port driver\n"); KeBugCheck(0); } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -64,7 +64,6 @@ } DPRINT("IRegistryKey_QueryInterface: This %p\n", this); - DbgBreakPoint(); return STATUS_UNSUCCESSFUL; } @@ -154,7 +153,7 @@ Status = ZwCreateKey(&hKey, KEY_READ | KEY_WRITE, &Attributes, 0, NULL, 0, Disposition); if (!NT_SUCCESS(Status)) { - DPRINT1("CRegistryKey::NewSubKey failed with %x\n", Status); + DPRINT("CRegistryKey::NewSubKey failed with %x\n", Status); return Status; } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -69,7 +69,7 @@ if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) { - DPRINT1("IResourceList_QueryInterface no interface!!! iface %S\n", GuidString.Buffer); + DPRINT("IResourceList_QueryInterface no interface!!! iface %S\n", GuidString.Buffer); RtlFreeUnicodeString(&GuidString); } @@ -107,7 +107,7 @@ { PartialDescriptor = &m_TranslatedResourceList->List[0].PartialResourceList.PartialDescriptors[Index]; UnPartialDescriptor = &m_UntranslatedResourceList->List[0].PartialResourceList.PartialDescriptors[Index]; - DPRINT1("Descriptor Type %u\n", PartialDescriptor->Type); + DPRINT("Descriptor Type %u\n", PartialDescriptor->Type); if (PartialDescriptor->Type == Type) { // Yay! Finally found one that matches! @@ -116,15 +116,15 @@ if (PartialDescriptor->Type == CmResourceTypeInterrupt) { - DPRINT1("Index %u TRANS Interrupt Number Affinity %x Level %u Vector %u\n", Index, PartialDescriptor->u.Interrupt.Affinity, PartialDescriptor->u.Interrupt.Level, PartialDescriptor->u.Interrupt.Vector, PartialDescriptor->u.Port.Start.LowPart, PartialDescriptor->Flags); - DPRINT1("Index %u UNTRANS Interrupt Number Affinity %x Level %u Vector %u\n", Index, UnPartialDescriptor->u.Interrupt.Affinity, UnPartialDescriptor->u.Interrupt.Level, UnPartialDescriptor->u.Interrupt.Vector, PartialDescriptor->u.Port.Start.LowPart, PartialDescriptor->Flags); - - } - else if (PartialDescriptor->Type == CmResourceTypePort) - { - DPRINT1("Index %u TRANS Port Length %u Start %u %u Flags %x\n", Index, PartialDescriptor->u.Port.Length, PartialDescriptor->u.Port.Start.HighPart, PartialDescriptor->u.Port.Start.LowPart, PartialDescriptor->Flags); - DPRINT1("Index %u UNTRANS Port Length %u Start %u %u Flags %x\n", Index, UnPartialDescriptor->u.Port.Length, UnPartialDescriptor->u.Port.Start.HighPart, UnPartialDescriptor->u.Port.Start.LowPart, UnPartialDescriptor->Flags); - } + DPRINT("Index %u TRANS Interrupt Number Affinity %x Level %u Vector %u Flags %x Share %x\n", Index, PartialDescriptor->u.Interrupt.Affinity, PartialDescriptor->u.Interrupt.Level, PartialDescriptor->u.Interrupt.Vector, PartialDescriptor->Flags, PartialDescriptor->ShareDisposition); + DPRINT("Index %u UNTRANS Interrupt Number Affinity %x Level %u Vector %u Flags %x Share %x\\n", Index, UnPartialDescriptor->u.Interrupt.Affinity, UnPartialDescriptor->u.Interrupt.Level, UnPartialDescriptor->u.Interrupt.Vector, UnPartialDescriptor->Flags, UnPartialDescriptor->ShareDisposition); + + } + else if (PartialDescriptor->Type == CmResourceTypePort) + { + DPRINT("Index %u TRANS Port Length %u Start %u %u Flags %x Share %x\n", Index, PartialDescriptor->u.Port.Length, PartialDescriptor->u.Port.Start.HighPart, PartialDescriptor->u.Port.Start.LowPart, PartialDescriptor->Flags, PartialDescriptor->ShareDisposition); + DPRINT("Index %u UNTRANS Port Length %u Start %u %u Flags %x Share %x\n", Index, UnPartialDescriptor->u.Port.Length, UnPartialDescriptor->u.Port.Start.HighPart, UnPartialDescriptor->u.Port.Start.LowPart, UnPartialDescriptor->Flags, UnPartialDescriptor->ShareDisposition); + } } DPRINT("Found %d type %d\n", Count, Type); Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -93,7 +93,7 @@ if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) { - DPRINT1("CServiceGroup::QueryInterface no interface!!! iface %S\n", GuidString.Buffer); + DPRINT("CServiceGroup::QueryInterface no interface!!! iface %S\n", GuidString.Buffer); RtlFreeUnicodeString(&GuidString); } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -229,14 +229,14 @@ if (Status != STATUS_PENDING) { - //DPRINT1("Status %x ValueSize %u + //DPRINT("Status %x ValueSize %u Irp->IoStatus.Information = PropertyRequest->ValueSize; ExFreePool(PropertyRequest); } #if 0 RtlStringFromGUID(Property->Property.Set, &GuidString); - DPRINT1("Id %u Flags %x Set %S FlagsItem %x Status %x\n", Property->Property.Id, Property->Property.Flags, GuidString.Buffer, PropertyItem->Flags, Status); + DPRINT("Id %u Flags %x Set %S FlagsItem %x Status %x\n", Property->Property.Id, Property->Property.Flags, GuidString.Buffer, PropertyItem->Flags, Status); RtlFreeUnicodeString(&GuidString); #endif return Status; @@ -245,7 +245,7 @@ } #if 0 RtlStringFromGUID(Property->Property.Set, &GuidString); - DPRINT1("Id %u Flags %x Set %S Status %x\n", Property->Property.Id, Property->Property.Flags, GuidString.Buffer, Status); + DPRINT("Id %u Flags %x Set %S Status %x\n", Property->Property.Id, Property->Property.Flags, GuidString.Buffer, Status); RtlFreeUnicodeString(&GuidString); #endif } @@ -310,12 +310,12 @@ PPCPROPERTY_ITEM PropertyItem; UNICODE_STRING GuidString; - DPRINT1("======================\n"); - DPRINT1("Descriptor Automation Table%p\n",FilterDescription->AutomationTable); + DPRINT("======================\n"); + DPRINT("Descriptor Automation Table%p\n",FilterDescription->AutomationTable); if (FilterDescription->AutomationTable) { - DPRINT1("FilterPropertiesCount %u FilterPropertySize %u Expected %u\n", FilterDescription->AutomationTable->PropertyCount, FilterDescription->AutomationTable->PropertyItemSize, sizeof(PCPROPERTY_ITEM)); + DPRINT("FilterPropertiesCount %u FilterPropertySize %u Expected %u\n", FilterDescription->AutomationTable->PropertyCount, FilterDescription->AutomationTable->PropertyItemSize, sizeof(PCPROPERTY_ITEM)); if (FilterDescription->AutomationTable->PropertyCount) { PropertyItem = (PPCPROPERTY_ITEM)FilterDescription->AutomationTable->Properties; @@ -323,7 +323,7 @@ for(Index = 0; Index < FilterDescription->AutomationTable->PropertyCount; Index++) { RtlStringFromGUID(*PropertyItem->Set, &GuidString); - DPRINT1("Index %u GUID %S Id %u Flags %x\n", Index, GuidString.Buffer, PropertyItem->Id, PropertyItem->Flags); + DPRINT("Index %u GUID %S Id %u Flags %x\n", Index, GuidString.Buffer, PropertyItem->Id, PropertyItem->Flags); PropertyItem = (PPCPROPERTY_ITEM)((ULONG_PTR)PropertyItem + FilterDescription->AutomationTable->PropertyItemSize); } @@ -331,8 +331,7 @@ } - DPRINT1("======================\n"); - DbgBreakPoint(); + DPRINT("======================\n"); } NTSTATUS @@ -451,13 +450,16 @@ { RtlMoveMemory(&Descriptor->Factory.KsPinDescriptor[Index], &SrcDescriptor->KsPinDescriptor, sizeof(KSPIN_DESCRIPTOR)); + DPRINT("Index %u DataRangeCount %u\n", Index, SrcDescriptor->KsPinDescriptor.DataRangesCount); + Descriptor->Factory.Instances[Index].CurrentPinInstanceCount = 0; - Descriptor->Factory.Instances[Index].MaxFilterInstanceCount = FilterDescription->Pins[Index].MaxFilterInstanceCount; - Descriptor->Factory.Instances[Index].MaxGlobalInstanceCount = FilterDescription->Pins[Index].MaxGlobalInstanceCount; - Descriptor->Factory.Instances[Index].MinFilterInstanceCount = FilterDescription->Pins[Index].MinFilterInstanceCount; + Descriptor->Factory.Instances[Index].MaxFilterInstanceCount = SrcDescriptor->MaxFilterInstanceCount; + Descriptor->Factory.Instances[Index].MaxGlobalInstanceCount = SrcDescriptor->MaxGlobalInstanceCount; + Descriptor->Factory.Instances[Index].MinFilterInstanceCount = SrcDescriptor->MinFilterInstanceCount; SrcDescriptor = (PPCPIN_DESCRIPTOR)((ULONG_PTR)SrcDescriptor + FilterDescription->PinSize); } } + Descriptor->DeviceDescriptor = FilterDescription; *OutSubdeviceDescriptor = Descriptor; return STATUS_SUCCESS; Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/unregister.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/unregister.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/unregister.cpp [iso-8859-1] Mon Oct 19 20:54:01 2009 @@ -81,7 +81,7 @@ Status = Unknown->QueryInterface(IID_ISubdevice, (LPVOID*)&SubDevice); if (!NT_SUCCESS(Status)) { - DPRINT1("No ISubdevice interface\n"); + DPRINT("No ISubdevice interface\n"); // the provided port driver doesnt support ISubdevice return STATUS_INVALID_PARAMETER; } @@ -89,7 +89,7 @@ Status = SubDevice->GetDescriptor(&SubDeviceDescriptor); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to retrieve subdevice descriptor %x\n", Status); + DPRINT("Failed to retrieve subdevice descriptor %x\n", Status); // the provided port driver doesnt support ISubdevice return STATUS_INVALID_PARAMETER; }
15 years, 2 months
1
0
0
0
[cwittich] 43617: -sync msxml3_winetest with wine 1.1.31
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Oct 19 20:53:22 2009 New Revision: 43617 URL:
http://svn.reactos.org/svn/reactos?rev=43617&view=rev
Log: -sync msxml3_winetest with wine 1.1.31 Modified: trunk/rostests/winetests/msxml3/domdoc.c Modified: trunk/rostests/winetests/msxml3/domdoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/domdoc.c…
============================================================================== --- trunk/rostests/winetests/msxml3/domdoc.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msxml3/domdoc.c [iso-8859-1] Mon Oct 19 20:53:22 2009 @@ -323,6 +323,55 @@ } } +#define test_disp(u) _test_disp(__LINE__,u) +static void _test_disp(unsigned line, IUnknown *unk) +{ + DISPID dispid = DISPID_XMLDOM_NODELIST_RESET; + IDispatchEx *dispex; + DWORD dwProps = 0; + BSTR sName; + UINT ticnt; + IUnknown *pUnk; + HRESULT hres; + + hres = IUnknown_QueryInterface(unk, &IID_IDispatchEx, (void**)&dispex); + ok_(__FILE__,line) (hres == S_OK, "Could not get IDispatch: %08x\n", hres); + if(FAILED(hres)) + return; + + ticnt = 0xdeadbeef; + hres = IDispatchEx_GetTypeInfoCount(dispex, &ticnt); + ok_(__FILE__,line) (hres == S_OK, "GetTypeInfoCount failed: %08x\n", hres); + ok_(__FILE__,line) (ticnt == 1, "ticnt=%u\n", ticnt); + + sName = SysAllocString( szstar ); + hres = IDispatchEx_DeleteMemberByName(dispex, sName, fdexNameCaseSensitive); + ok(hres == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", hres); + SysFreeString( sName ); + + hres = IDispatchEx_DeleteMemberByDispID(dispex, dispid); + ok(hres == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", hres); + + hres = IDispatchEx_GetMemberProperties(dispex, dispid, grfdexPropCanAll, &dwProps); + ok(hres == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", hres); + ok(dwProps == 0, "expected 0 got %d\n", dwProps); + + hres = IDispatchEx_GetMemberName(dispex, dispid, &sName); + ok(hres == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", hres); + if(SUCCEEDED(hres)) + SysFreeString(sName); + + hres = IDispatchEx_GetNextDispID(dispex, fdexEnumDefault, DISPID_XMLDOM_NODELIST_RESET, &dispid); + ok(hres == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", hres); + + hres = IDispatchEx_GetNameSpaceParent(dispex, &pUnk); + ok(hres == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", hres); + if(hres == S_OK && pUnk) + IUnknown_Release(pUnk); + + IDispatchEx_Release(dispex); +} + static int get_node_position(IXMLDOMNode *node) { HRESULT r; @@ -457,6 +506,8 @@ if( r != S_OK ) return; + test_disp((IUnknown*)doc); + /* try some stupid things */ r = IXMLDOMDocument_loadXML( doc, NULL, NULL ); ok( r == S_FALSE, "loadXML failed\n"); @@ -547,6 +598,8 @@ { IObjectIdentity *ident; BSTR tag = NULL; + + test_disp((IUnknown*)element); r = IXMLDOMElement_QueryInterface( element, &IID_IObjectIdentity, (LPVOID*)&ident ); ok( r == E_NOINTERFACE, "ret %08x\n", r); @@ -1660,7 +1713,6 @@ VARIANT_BOOL b; IXMLDOMDocument *doc; IXMLDOMNodeList *node_list; - IDispatchEx *dispex; LONG len; r = CoCreateInstance( &CLSID_DOMDocument, NULL, @@ -1681,43 +1733,7 @@ ok( r == S_OK, "ret %08x\n", r ); ok( len == 6, "len %d\n", len ); - r = IXMLDOMNodeList_QueryInterface( node_list, &IID_IDispatchEx, (void**)&dispex ); - ok( r == S_OK, "rets %08x\n", r); - if( r == S_OK ) - { - DISPID dispid = DISPID_XMLDOM_NODELIST_RESET; - DWORD dwProps = 0; - BSTR sName; - IUnknown *pUnk; - - sName = SysAllocString( szstar ); - r = IDispatchEx_DeleteMemberByName(dispex, sName, fdexNameCaseSensitive); - ok(r == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", r); - SysFreeString( sName ); - - r = IDispatchEx_DeleteMemberByDispID(dispex, dispid); - ok(r == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", r); - - r = IDispatchEx_GetMemberProperties(dispex, dispid, grfdexPropCanAll, &dwProps); - ok(r == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", r); - ok(dwProps == 0, "expected 0 got %d\n", dwProps); - - r = IDispatchEx_GetMemberName(dispex, dispid, &sName); - ok(r == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", r); - if( SUCCEEDED(r) ) - SysFreeString(sName); - - r = IDispatchEx_GetNextDispID(dispex, fdexEnumDefault, DISPID_XMLDOM_NODELIST_RESET, &dispid); - ok(r == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", r); - - r = IDispatchEx_GetNameSpaceParent(dispex, &pUnk); - ok(r == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", r); - if(r == S_OK) - IUnknown_Release(pUnk); - - IDispatchEx_Release( dispex ); - } - + test_disp((IUnknown*)node_list); IXMLDOMNodeList_Release( node_list ); SysFreeString( str );
15 years, 2 months
1
0
0
0
[cwittich] 43616: -sync atl with wine 1.1.31
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Oct 19 20:50:02 2009 New Revision: 43616 URL:
http://svn.reactos.org/svn/reactos?rev=43616&view=rev
Log: -sync atl with wine 1.1.31 Modified: trunk/reactos/dll/win32/atl/atlbase.h Modified: trunk/reactos/dll/win32/atl/atlbase.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/atl/atlbase.h?re…
============================================================================== --- trunk/reactos/dll/win32/atl/atlbase.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/atl/atlbase.h [iso-8859-1] Mon Oct 19 20:50:02 2009 @@ -28,9 +28,9 @@ typedef HRESULT (WINAPI _ATL_CREATORFUNC)(void* pv, REFIID riid, LPVOID* ppv); typedef HRESULT (WINAPI _ATL_CREATORARGFUNC)(void* pv, REFIID riid, LPVOID* ppv, DWORD dw); typedef HRESULT (WINAPI _ATL_MODULEFUNC)(DWORD dw); -typedef LPCSTR (WINAPI _ATL_DESCRIPTIONFUNCA)(); -typedef LPCWSTR (WINAPI _ATL_DESCRIPTIONFUNCW)(); -typedef const struct _ATL_CATMAP_ENTRY* (_ATL_CATMAPFUNC)(); +typedef LPCSTR (WINAPI _ATL_DESCRIPTIONFUNCA)(void); +typedef LPCWSTR (WINAPI _ATL_DESCRIPTIONFUNCW)(void); +typedef const struct _ATL_CATMAP_ENTRY* (_ATL_CATMAPFUNC)(void); typedef void (WINAPI _ATL_TERMFUNC)(DWORD dw); typedef struct _ATL_OBJMAP_ENTRYA_TAG
15 years, 2 months
1
0
0
0
[bfreisen] 43615: [PAINT] rearranging variable declarations for better MSVC compatiblity
by bfreisen@svn.reactos.org
Author: bfreisen Date: Mon Oct 19 19:46:29 2009 New Revision: 43615 URL:
http://svn.reactos.org/svn/reactos?rev=43615&view=rev
Log: [PAINT] rearranging variable declarations for better MSVC compatiblity Modified: trunk/reactos/base/applications/paint/dialogs.c trunk/reactos/base/applications/paint/main.c trunk/reactos/base/applications/paint/winproc.c Modified: trunk/reactos/base/applications/paint/dialogs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/di…
============================================================================== --- trunk/reactos/base/applications/paint/dialogs.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/dialogs.c [iso-8859-1] Mon Oct 19 19:46:29 2009 @@ -73,30 +73,34 @@ switch (message) { case WM_INITDIALOG: - CheckDlgButton(hwnd, IDD_ATTRIBUTESRB3, BST_CHECKED); - CheckDlgButton(hwnd, IDD_ATTRIBUTESRB5, BST_CHECKED); - SetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT1, imgXRes, FALSE); - SetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT2, imgYRes, FALSE); - TCHAR strrc[100]; - if (isAFile) { - TCHAR date[100]; - TCHAR size[100]; - TCHAR temp[100]; - GetDateFormat(LOCALE_USER_DEFAULT, 0, &fileTime, NULL, date, sizeof(date)); - GetTimeFormat(LOCALE_USER_DEFAULT, 0, &fileTime, NULL, temp, sizeof(temp)); - _tcscat(date, _T(" ")); - _tcscat(date, temp); - LoadString(hProgInstance, IDS_FILESIZE, strrc, sizeof(strrc)); - _stprintf(size, strrc, fileSize); - SetDlgItemText(hwnd, IDD_ATTRIBUTESTEXT6, date); - SetDlgItemText(hwnd, IDD_ATTRIBUTESTEXT7, size); + TCHAR strrc[100]; + TCHAR res[100]; + + CheckDlgButton(hwnd, IDD_ATTRIBUTESRB3, BST_CHECKED); + CheckDlgButton(hwnd, IDD_ATTRIBUTESRB5, BST_CHECKED); + SetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT1, imgXRes, FALSE); + SetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT2, imgYRes, FALSE); + + if (isAFile) + { + TCHAR date[100]; + TCHAR size[100]; + TCHAR temp[100]; + GetDateFormat(LOCALE_USER_DEFAULT, 0, &fileTime, NULL, date, sizeof(date)); + GetTimeFormat(LOCALE_USER_DEFAULT, 0, &fileTime, NULL, temp, sizeof(temp)); + _tcscat(date, _T(" ")); + _tcscat(date, temp); + LoadString(hProgInstance, IDS_FILESIZE, strrc, sizeof(strrc)); + _stprintf(size, strrc, fileSize); + SetDlgItemText(hwnd, IDD_ATTRIBUTESTEXT6, date); + SetDlgItemText(hwnd, IDD_ATTRIBUTESTEXT7, size); + } + LoadString(hProgInstance, IDS_PRINTRES, strrc, sizeof(strrc)); + _stprintf(res, strrc, fileHPPM, fileVPPM); + SetDlgItemText(hwnd, IDD_ATTRIBUTESTEXT8, res); + return TRUE; } - TCHAR res[100]; - LoadString(hProgInstance, IDS_PRINTRES, strrc, sizeof(strrc)); - _stprintf(res, strrc, fileHPPM, fileVPPM); - SetDlgItemText(hwnd, IDD_ATTRIBUTESTEXT8, res); - return TRUE; case WM_CLOSE: EndDialog(hwnd, 0); break; Modified: trunk/reactos/base/applications/paint/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/ma…
============================================================================== --- trunk/reactos/base/applications/paint/main.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/main.c [iso-8859-1] Mon Oct 19 19:46:29 2009 @@ -351,8 +351,8 @@ { TCHAR tempstr[1000]; TCHAR resstr[100]; + TCHAR *temp; insertReversible(bmNew); - TCHAR *temp; GetFullPathName(lpszArgument, sizeof(filepathname), filepathname, &temp); _tcscpy(filename, temp); LoadString(hProgInstance, IDS_WINDOWTITLE, resstr, SIZEOF(resstr)); Modified: trunk/reactos/base/applications/paint/winproc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/wi…
============================================================================== --- trunk/reactos/base/applications/paint/winproc.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/winproc.c [iso-8859-1] Mon Oct 19 19:46:29 2009 @@ -50,11 +50,14 @@ void zoomTo(int newZoom, int mouseX, int mouseY) { + int tbPos = 0; + int tempZoom = newZoom; + long clientRectScrollbox[4]; long clientRectImageArea[4]; + int x, y, w, h; GetClientRect(hScrollbox, (LPRECT)&clientRectScrollbox); GetClientRect(hImageArea, (LPRECT)&clientRectImageArea); - int x, y, w, h; w = clientRectImageArea[2] * clientRectScrollbox[2] / (clientRectImageArea[2] * newZoom / zoom); h = clientRectImageArea[3] * clientRectScrollbox[3] / (clientRectImageArea[3] * newZoom / zoom); x = max(0, min(clientRectImageArea[2] - w, mouseX - w / 2)) * newZoom / zoom; @@ -70,8 +73,6 @@ SendMessage(hScrollbox, WM_HSCROLL, SB_THUMBPOSITION | (x << 16), 0); SendMessage(hScrollbox, WM_VSCROLL, SB_THUMBPOSITION | (y << 16), 0); - int tbPos = 0; - int tempZoom = newZoom; while (tempZoom>125) { tbPos++; @@ -82,24 +83,26 @@ void drawZoomFrame(int mouseX, int mouseY) { + HDC hdc; + HPEN oldPen; + HBRUSH oldBrush; + LOGBRUSH logbrush; + int rop; + long clientRectScrollbox[4]; long clientRectImageArea[4]; + int x, y, w, h; GetClientRect(hScrollbox, (LPRECT)&clientRectScrollbox); GetClientRect(hImageArea, (LPRECT)&clientRectImageArea); - int x, y, w, h; w = clientRectImageArea[2] * clientRectScrollbox[2] / (clientRectImageArea[2] * 2); h = clientRectImageArea[3] * clientRectScrollbox[3] / (clientRectImageArea[3] * 2); x = max(0, min(clientRectImageArea[2] - w, mouseX - w / 2)); y = max(0, min(clientRectImageArea[3] - h, mouseY - h / 2)); - HDC hdc; + hdc = GetDC(hImageArea); - HPEN oldPen; oldPen = SelectObject(hdc, CreatePen(PS_SOLID, 0, 0)); - HBRUSH oldBrush; - LOGBRUSH logbrush; logbrush.lbStyle = BS_HOLLOW; oldBrush = SelectObject(hdc, CreateBrushIndirect(&logbrush)); - int rop; rop = SetROP2(hdc, R2_NOT); Rectangle(hdc, x, y, x + w, y + h); SetROP2(hdc, rop); @@ -525,6 +528,8 @@ { if ((!drawing)||(activeTool<=9)) { + TRACKMOUSEEVENT tme; + TCHAR coordStr[100]; _stprintf(coordStr, _T("%d, %d"), (short)LOWORD(lParam)*1000/zoom, (short)HIWORD(lParam)*1000/zoom); SendMessage(hStatusBar, SB_SETTEXT, 1, (LPARAM)coordStr); @@ -535,7 +540,6 @@ drawZoomFrame((short)LOWORD(lParam), (short)HIWORD(lParam)); } - TRACKMOUSEEVENT tme; tme.cbSize = sizeof(TRACKMOUSEEVENT); tme.dwFlags = TME_LEAVE; tme.hwndTrack = hImageArea;
15 years, 2 months
1
0
0
0
[cwittich] 43614: -sync wintrust_winetest with wine 1.1.31
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Oct 19 19:31:03 2009 New Revision: 43614 URL:
http://svn.reactos.org/svn/reactos?rev=43614&view=rev
Log: -sync wintrust_winetest with wine 1.1.31 Modified: trunk/rostests/winetests/wintrust/asn.c Modified: trunk/rostests/winetests/wintrust/asn.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wintrust/asn.c?…
============================================================================== --- trunk/rostests/winetests/wintrust/asn.c [iso-8859-1] (original) +++ trunk/rostests/winetests/wintrust/asn.c [iso-8859-1] Mon Oct 19 19:31:03 2009 @@ -725,6 +725,7 @@ DWORD size; CAT_NAMEVALUE *value; + buf = NULL; ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT, emptyCatNameValue, sizeof(emptyCatNameValue), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); @@ -739,6 +740,7 @@ value->Value.cbData); LocalFree(buf); } + buf = NULL; ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT, catNameValueWithTag, sizeof(catNameValueWithTag), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); @@ -754,6 +756,7 @@ value->Value.cbData); LocalFree(buf); } + buf = NULL; ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT, catNameValueWithFlags, sizeof(catNameValueWithFlags), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); @@ -768,6 +771,7 @@ value->Value.cbData); LocalFree(buf); } + buf = NULL; ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT, catNameValueWithValue, sizeof(catNameValueWithValue), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); @@ -838,7 +842,7 @@ ok(!ret && GetLastError() == E_INVALIDARG, "expected E_INVALIDARG, got %08x\n", GetLastError()); moreInfo.dwLinkChoice = SPC_URL_LINK_CHOICE; - moreInfo.pwszUrl = winehq; + U(moreInfo).pwszUrl = winehq; ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); @@ -874,7 +878,6 @@ ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT, emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - todo_wine ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -886,7 +889,6 @@ ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT, spOpusInfoWithProgramName, sizeof(spOpusInfoWithProgramName), CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - todo_wine ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -899,7 +901,6 @@ ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT, spOpusInfoWithMoreInfo, sizeof(spOpusInfoWithMoreInfo), CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - todo_wine ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -909,7 +910,7 @@ { ok(info->pMoreInfo->dwLinkChoice == SPC_URL_LINK_CHOICE, "unexpected link choice %d\n", info->pMoreInfo->dwLinkChoice); - ok(!lstrcmpW(info->pMoreInfo->pwszUrl, winehq), + ok(!lstrcmpW(U(*info->pMoreInfo).pwszUrl, winehq), "unexpected link value\n"); } ok(!info->pPublisherInfo, "expected NULL\n"); @@ -918,7 +919,6 @@ ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT, spOpusInfoWithPublisherInfo, sizeof(spOpusInfoWithPublisherInfo), CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - todo_wine ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -931,7 +931,7 @@ ok(info->pPublisherInfo->dwLinkChoice == SPC_URL_LINK_CHOICE, "unexpected link choice %d\n", info->pPublisherInfo->dwLinkChoice); - ok(!lstrcmpW(info->pPublisherInfo->pwszUrl, winehq), + ok(!lstrcmpW(U(*info->pPublisherInfo).pwszUrl, winehq), "unexpected link value\n"); } LocalFree(info);
15 years, 2 months
1
0
0
0
[cwittich] 43613: -sync wintrust with wine 1.1.31
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Oct 19 19:29:28 2009 New Revision: 43613 URL:
http://svn.reactos.org/svn/reactos?rev=43613&view=rev
Log: -sync wintrust with wine 1.1.31 Modified: trunk/reactos/dll/win32/wintrust/asn.c trunk/reactos/dll/win32/wintrust/softpub.c trunk/reactos/dll/win32/wintrust/wintrust.spec Modified: trunk/reactos/dll/win32/wintrust/asn.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/asn.c?r…
============================================================================== --- trunk/reactos/dll/win32/wintrust/asn.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wintrust/asn.c [iso-8859-1] Mon Oct 19 19:29:28 2009 @@ -1465,6 +1465,10 @@ DWORD size; }; +/* Align up to a DWORD_PTR boundary + */ +#define ALIGN_DWORD_PTR(x) (((x) + sizeof(DWORD_PTR) - 1) & ~(sizeof(DWORD_PTR) - 1)) + /* Decodes the items in a sequence, where the items are described in items, * the encoded data are in pbEncoded with length cbEncoded. Decodes into * pvStructInfo. nextData is a pointer to the memory location at which the @@ -1517,9 +1521,7 @@ if (ret) { /* Account for alignment padding */ - if (items[i].size % sizeof(DWORD)) - items[i].size += sizeof(DWORD) - - items[i].size % sizeof(DWORD); + items[i].size = ALIGN_DWORD_PTR(items[i].size); TRACE("item %d size: %d\n", i, items[i].size); if (nextData && items[i].hasPointer && items[i].size > items[i].minSize) Modified: trunk/reactos/dll/win32/wintrust/softpub.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/softpub…
============================================================================== --- trunk/reactos/dll/win32/wintrust/softpub.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wintrust/softpub.c [iso-8859-1] Mon Oct 19 19:29:28 2009 @@ -52,6 +52,24 @@ ret = S_OK; TRACE("returning %08x\n", ret); return ret; +} + +HRESULT WINAPI DriverInitializePolicy(CRYPT_PROVIDER_DATA *data) +{ + FIXME("stub\n"); + return S_OK; +} + +HRESULT WINAPI DriverCleanupPolicy(CRYPT_PROVIDER_DATA *data) +{ + FIXME("stub\n"); + return S_OK; +} + +HRESULT WINAPI DriverFinalPolicy(CRYPT_PROVIDER_DATA *data) +{ + FIXME("stub\n"); + return S_OK; } /* Assumes data->pWintrustData->u.pFile exists. Makes sure a file handle is Modified: trunk/reactos/dll/win32/wintrust/wintrust.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/wintrus…
============================================================================== --- trunk/reactos/dll/win32/wintrust/wintrust.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wintrust/wintrust.spec [iso-8859-1] Mon Oct 19 19:29:28 2009 @@ -42,9 +42,9 @@ @ stdcall CryptSIPVerifyIndirectData(ptr ptr) @ stdcall -private DllRegisterServer() @ stdcall -private DllUnregisterServer() -@ stub DriverCleanupPolicy -@ stub DriverFinalPolicy -@ stub DriverInitializePolicy +@ stdcall DriverCleanupPolicy(ptr) +@ stdcall DriverFinalPolicy(ptr) +@ stdcall DriverInitializePolicy(ptr) @ stub FindCertsByIssuer @ stdcall GenericChainCertificateTrust(ptr) @ stdcall GenericChainFinalProv(ptr)
15 years, 2 months
1
0
0
0
[cwittich] 43612: -sync urlmon_winetest with wine 1.1.31
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Oct 19 19:22:45 2009 New Revision: 43612 URL:
http://svn.reactos.org/svn/reactos?rev=43612&view=rev
Log: -sync urlmon_winetest with wine 1.1.31 Added: trunk/rostests/winetests/urlmon/sec_mgr.c (with props) Modified: trunk/rostests/winetests/urlmon/misc.c trunk/rostests/winetests/urlmon/protocol.c trunk/rostests/winetests/urlmon/testlist.c trunk/rostests/winetests/urlmon/url.c trunk/rostests/winetests/urlmon/urlmon.rbuild [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/rostests/winetests/urlmon/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/misc.c?r…
Modified: trunk/rostests/winetests/urlmon/protocol.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/protocol…
Added: trunk/rostests/winetests/urlmon/sec_mgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/sec_mgr.…
Modified: trunk/rostests/winetests/urlmon/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/testlist…
Modified: trunk/rostests/winetests/urlmon/url.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/url.c?re…
Modified: trunk/rostests/winetests/urlmon/urlmon.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/urlmon.r…
15 years, 2 months
1
0
0
0
[cwittich] 43611: -sync urlmon with wine 1.1.31
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Oct 19 19:22:21 2009 New Revision: 43611 URL:
http://svn.reactos.org/svn/reactos?rev=43611&view=rev
Log: -sync urlmon with wine 1.1.31 Modified: trunk/reactos/dll/win32/urlmon/bindctx.c trunk/reactos/dll/win32/urlmon/binding.c trunk/reactos/dll/win32/urlmon/bindprot.c trunk/reactos/dll/win32/urlmon/ftp.c trunk/reactos/dll/win32/urlmon/gopher.c trunk/reactos/dll/win32/urlmon/http.c trunk/reactos/dll/win32/urlmon/protocol.c trunk/reactos/dll/win32/urlmon/rsrc.rc trunk/reactos/dll/win32/urlmon/sec_mgr.c trunk/reactos/dll/win32/urlmon/session.c trunk/reactos/dll/win32/urlmon/urlmon.inf trunk/reactos/dll/win32/urlmon/urlmon_main.c trunk/reactos/dll/win32/urlmon/urlmon_main.h Modified: trunk/reactos/dll/win32/urlmon/bindctx.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/bindctx.c…
============================================================================== --- trunk/reactos/dll/win32/urlmon/bindctx.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/bindctx.c [iso-8859-1] Mon Oct 19 19:22:21 2009 @@ -28,32 +28,38 @@ extern IID IID_IBindStatusCallbackHolder; typedef struct { - const IBindStatusCallbackVtbl *lpBindStatusCallbackVtbl; - const IServiceProviderVtbl *lpServiceProviderVtbl; - const IHttpNegotiate2Vtbl *lpHttpNegotiate2Vtbl; - const IAuthenticateVtbl *lpAuthenticateVtbl; + const IBindStatusCallbackExVtbl *lpBindStatusCallbackExVtbl; + const IServiceProviderVtbl *lpServiceProviderVtbl; + const IHttpNegotiate2Vtbl *lpHttpNegotiate2Vtbl; + const IAuthenticateVtbl *lpAuthenticateVtbl; LONG ref; IBindStatusCallback *callback; IServiceProvider *serv_prov; - - IHttpNegotiate *http_negotiate; - BOOL init_http_negotiate; - IHttpNegotiate2 *http_negotiate2; - BOOL init_http_negotiate2; - IAuthenticate *authenticate; - BOOL init_authenticate; } BindStatusCallback; -#define STATUSCLB(x) ((IBindStatusCallback*) &(x)->lpBindStatusCallbackVtbl) +#define STATUSCLB(x) ((IBindStatusCallback*) &(x)->lpBindStatusCallbackExVtbl) +#define STATUSCLBEX(x) ((IBindStatusCallbackEx*)&(x)->lpBindStatusCallbackExVtbl) #define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl) #define HTTPNEG2(x) ((IHttpNegotiate2*) &(x)->lpHttpNegotiate2Vtbl) #define AUTHENTICATE(x) ((IAuthenticate*) &(x)->lpAuthenticateVtbl) -#define STATUSCLB_THIS(iface) DEFINE_THIS(BindStatusCallback, BindStatusCallback, iface) - -static HRESULT WINAPI BindStatusCallback_QueryInterface(IBindStatusCallback *iface, +static void *get_callback_iface(BindStatusCallback *This, REFIID riid) +{ + void *ret; + HRESULT hres; + + hres = IBindStatusCallback_QueryInterface(This->callback, riid, (void**)&ret); + if(FAILED(hres) && This->serv_prov) + hres = IServiceProvider_QueryService(This->serv_prov, riid, riid, &ret); + + return SUCCEEDED(hres) ? ret : NULL; +} + +#define STATUSCLB_THIS(iface) DEFINE_THIS(BindStatusCallback, BindStatusCallbackEx, iface) + +static HRESULT WINAPI BindStatusCallback_QueryInterface(IBindStatusCallbackEx *iface, REFIID riid, void **ppv) { BindStatusCallback *This = STATUSCLB_THIS(iface); @@ -66,6 +72,9 @@ }else if(IsEqualGUID(&IID_IBindStatusCallback, riid)) { TRACE("(%p)->(IID_IBindStatusCallback, %p)\n", This, ppv); *ppv = STATUSCLB(This); + }else if(IsEqualGUID(&IID_IBindStatusCallbackEx, riid)) { + TRACE("(%p)->(IID_IBindStatusCallback, %p)\n", This, ppv); + *ppv = STATUSCLBEX(This); }else if(IsEqualGUID(&IID_IBindStatusCallbackHolder, riid)) { TRACE("(%p)->(IID_IBindStatusCallbackHolder, %p)\n", This, ppv); *ppv = This; @@ -92,7 +101,7 @@ return E_NOINTERFACE; } -static ULONG WINAPI BindStatusCallback_AddRef(IBindStatusCallback *iface) +static ULONG WINAPI BindStatusCallback_AddRef(IBindStatusCallbackEx *iface) { BindStatusCallback *This = STATUSCLB_THIS(iface); LONG ref = InterlockedIncrement(&This->ref); @@ -102,7 +111,7 @@ return ref; } -static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface) +static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallbackEx *iface) { BindStatusCallback *This = STATUSCLB_THIS(iface); LONG ref = InterlockedDecrement(&This->ref); @@ -112,12 +121,6 @@ if(!ref) { if(This->serv_prov) IServiceProvider_Release(This->serv_prov); - if(This->http_negotiate) - IHttpNegotiate_Release(This->http_negotiate); - if(This->http_negotiate2) - IHttpNegotiate2_Release(This->http_negotiate2); - if(This->authenticate) - IAuthenticate_Release(This->authenticate); IBindStatusCallback_Release(This->callback); heap_free(This); } @@ -125,7 +128,7 @@ return ref; } -static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallback *iface, +static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallbackEx *iface, DWORD dwReserved, IBinding *pbind) { BindStatusCallback *This = STATUSCLB_THIS(iface); @@ -135,7 +138,7 @@ return IBindStatusCallback_OnStartBinding(This->callback, 0xff, pbind); } -static HRESULT WINAPI BindStatusCallback_GetPriority(IBindStatusCallback *iface, LONG *pnPriority) +static HRESULT WINAPI BindStatusCallback_GetPriority(IBindStatusCallbackEx *iface, LONG *pnPriority) { BindStatusCallback *This = STATUSCLB_THIS(iface); @@ -144,7 +147,7 @@ return IBindStatusCallback_GetPriority(This->callback, pnPriority); } -static HRESULT WINAPI BindStatusCallback_OnLowResource(IBindStatusCallback *iface, DWORD reserved) +static HRESULT WINAPI BindStatusCallback_OnLowResource(IBindStatusCallbackEx *iface, DWORD reserved) { BindStatusCallback *This = STATUSCLB_THIS(iface); @@ -153,7 +156,7 @@ return IBindStatusCallback_OnLowResource(This->callback, reserved); } -static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallback *iface, ULONG ulProgress, +static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallbackEx *iface, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText) { BindStatusCallback *This = STATUSCLB_THIS(iface); @@ -165,7 +168,7 @@ ulProgressMax, ulStatusCode, szStatusText); } -static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *iface, +static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallbackEx *iface, HRESULT hresult, LPCWSTR szError) { BindStatusCallback *This = STATUSCLB_THIS(iface); @@ -175,17 +178,29 @@ return IBindStatusCallback_OnStopBinding(This->callback, hresult, szError); } -static HRESULT WINAPI BindStatusCallback_GetBindInfo(IBindStatusCallback *iface, +static HRESULT WINAPI BindStatusCallback_GetBindInfo(IBindStatusCallbackEx *iface, DWORD *grfBINDF, BINDINFO *pbindinfo) { BindStatusCallback *This = STATUSCLB_THIS(iface); + IBindStatusCallbackEx *bscex; + HRESULT hres; TRACE("(%p)->(%p %p)\n", This, grfBINDF, pbindinfo); - return IBindStatusCallback_GetBindInfo(This->callback, grfBINDF, pbindinfo); -} - -static HRESULT WINAPI BindStatusCallback_OnDataAvailable(IBindStatusCallback *iface, + hres = IBindStatusCallback_QueryInterface(This->callback, &IID_IBindStatusCallbackEx, (void**)&bscex); + if(SUCCEEDED(hres)) { + DWORD bindf2 = 0, reserv = 0; + + hres = IBindStatusCallbackEx_GetBindInfoEx(bscex, grfBINDF, pbindinfo, &bindf2, &reserv); + IBindStatusCallbackEx_Release(bscex); + }else { + hres = IBindStatusCallback_GetBindInfo(This->callback, grfBINDF, pbindinfo); + } + + return hres; +} + +static HRESULT WINAPI BindStatusCallback_OnDataAvailable(IBindStatusCallbackEx *iface, DWORD grfBSCF, DWORD dwSize, FORMATETC *pformatetc, STGMEDIUM *pstgmed) { BindStatusCallback *This = STATUSCLB_THIS(iface); @@ -195,7 +210,7 @@ return IBindStatusCallback_OnDataAvailable(This->callback, grfBSCF, dwSize, pformatetc, pstgmed); } -static HRESULT WINAPI BindStatusCallback_OnObjectAvailable(IBindStatusCallback *iface, +static HRESULT WINAPI BindStatusCallback_OnObjectAvailable(IBindStatusCallbackEx *iface, REFIID riid, IUnknown *punk) { BindStatusCallback *This = STATUSCLB_THIS(iface); @@ -205,9 +220,29 @@ return IBindStatusCallback_OnObjectAvailable(This->callback, riid, punk); } +static HRESULT WINAPI BindStatusCallback_GetBindInfoEx(IBindStatusCallbackEx *iface, DWORD *grfBINDF, + BINDINFO *pbindinfo, DWORD *grfBINDF2, DWORD *pdwReserved) +{ + BindStatusCallback *This = STATUSCLB_THIS(iface); + IBindStatusCallbackEx *bscex; + HRESULT hres; + + TRACE("(%p)->(%p %p %p %p)\n", This, grfBINDF, pbindinfo, grfBINDF2, pdwReserved); + + hres = IBindStatusCallback_QueryInterface(This->callback, &IID_IBindStatusCallbackEx, (void**)&bscex); + if(SUCCEEDED(hres)) { + hres = IBindStatusCallbackEx_GetBindInfoEx(bscex, grfBINDF, pbindinfo, grfBINDF2, pdwReserved); + IBindStatusCallbackEx_Release(bscex); + }else { + hres = IBindStatusCallback_GetBindInfo(This->callback, grfBINDF, pbindinfo); + } + + return hres; +} + #undef STATUSCLB_THIS -static const IBindStatusCallbackVtbl BindStatusCallbackVtbl = { +static const IBindStatusCallbackExVtbl BindStatusCallbackExVtbl = { BindStatusCallback_QueryInterface, BindStatusCallback_AddRef, BindStatusCallback_Release, @@ -218,7 +253,8 @@ BindStatusCallback_OnStopBinding, BindStatusCallback_GetBindInfo, BindStatusCallback_OnDataAvailable, - BindStatusCallback_OnObjectAvailable + BindStatusCallback_OnObjectAvailable, + BindStatusCallback_GetBindInfoEx }; #define SERVPROV_THIS(iface) DEFINE_THIS(BindStatusCallback, ServiceProvider, iface) @@ -250,46 +286,16 @@ if(IsEqualGUID(&IID_IHttpNegotiate, guidService)) { TRACE("(%p)->(IID_IHttpNegotiate %s %p)\n", This, debugstr_guid(riid), ppv); - - if(!This->init_http_negotiate) { - This->init_http_negotiate = TRUE; - hres = IBindStatusCallback_QueryInterface(This->callback, &IID_IHttpNegotiate, - (void**)&This->http_negotiate); - if(FAILED(hres) && This->serv_prov) - IServiceProvider_QueryService(This->serv_prov, &IID_IHttpNegotiate, - &IID_IHttpNegotiate, (void**)&This->http_negotiate); - } - return IBindStatusCallback_QueryInterface(STATUSCLB(This), riid, ppv); } if(IsEqualGUID(&IID_IHttpNegotiate2, guidService)) { TRACE("(%p)->(IID_IHttpNegotiate2 %s %p)\n", This, debugstr_guid(riid), ppv); - - if(!This->init_http_negotiate2) { - This->init_http_negotiate2 = TRUE; - hres = IBindStatusCallback_QueryInterface(This->callback, &IID_IHttpNegotiate2, - (void**)&This->http_negotiate2); - if(FAILED(hres) && This->serv_prov) - IServiceProvider_QueryService(This->serv_prov, &IID_IHttpNegotiate2, - &IID_IHttpNegotiate2, (void**)&This->http_negotiate2); - } - return IBindStatusCallback_QueryInterface(STATUSCLB(This), riid, ppv); } if(IsEqualGUID(&IID_IAuthenticate, guidService)) { TRACE("(%p)->(IID_IAuthenticate %s %p)\n", This, debugstr_guid(riid), ppv); - - if(!This->init_authenticate) { - This->init_authenticate = TRUE; - hres = IBindStatusCallback_QueryInterface(This->callback, &IID_IAuthenticate, - (void**)&This->authenticate); - if(FAILED(hres) && This->serv_prov) - IServiceProvider_QueryService(This->serv_prov, &IID_IAuthenticate, - &IID_IAuthenticate, (void**)&This->authenticate); - } - return IBindStatusCallback_QueryInterface(STATUSCLB(This), riid, ppv); } @@ -342,17 +348,22 @@ LPCWSTR szURL, LPCWSTR szHeaders, DWORD dwReserved, LPWSTR *pszAdditionalHeaders) { BindStatusCallback *This = HTTPNEG2_THIS(iface); + IHttpNegotiate *http_negotiate; + HRESULT hres = S_OK; TRACE("(%p)->(%s %s %d %p)\n", This, debugstr_w(szURL), debugstr_w(szHeaders), dwReserved, pszAdditionalHeaders); *pszAdditionalHeaders = NULL; - if(!This->http_negotiate) - return S_OK; - - return IHttpNegotiate_BeginningTransaction(This->http_negotiate, szURL, szHeaders, - dwReserved, pszAdditionalHeaders); + http_negotiate = get_callback_iface(This, &IID_IHttpNegotiate); + if(http_negotiate) { + hres = IHttpNegotiate_BeginningTransaction(http_negotiate, szURL, szHeaders, + dwReserved, pszAdditionalHeaders); + IHttpNegotiate_Release(http_negotiate); + } + + return hres; } static HRESULT WINAPI BSCHttpNegotiate_OnResponse(IHttpNegotiate2 *iface, DWORD dwResponseCode, @@ -361,14 +372,18 @@ { BindStatusCallback *This = HTTPNEG2_THIS(iface); LPWSTR additional_headers = NULL; + IHttpNegotiate *http_negotiate; HRESULT hres = S_OK; TRACE("(%p)->(%d %s %s %p)\n", This, dwResponseCode, debugstr_w(szResponseHeaders), debugstr_w(szRequestHeaders), pszAdditionalRequestHeaders); - if(This->http_negotiate) - hres = IHttpNegotiate_OnResponse(This->http_negotiate, dwResponseCode, szResponseHeaders, - szRequestHeaders, &additional_headers); + http_negotiate = get_callback_iface(This, &IID_IHttpNegotiate); + if(http_negotiate) { + hres = IHttpNegotiate_OnResponse(http_negotiate, dwResponseCode, szResponseHeaders, + szRequestHeaders, &additional_headers); + IHttpNegotiate_Release(http_negotiate); + } if(pszAdditionalRequestHeaders) *pszAdditionalRequestHeaders = additional_headers; @@ -382,14 +397,19 @@ BYTE *pbSecurityId, DWORD *pcbSecurityId, DWORD_PTR dwReserved) { BindStatusCallback *This = HTTPNEG2_THIS(iface); + IHttpNegotiate2 *http_negotiate2; + HRESULT hres = E_FAIL; TRACE("(%p)->(%p %p %ld)\n", This, pbSecurityId, pcbSecurityId, dwReserved); - if(!This->http_negotiate2) - return E_NOTIMPL; - - return IHttpNegotiate2_GetRootSecurityId(This->http_negotiate2, pbSecurityId, - pcbSecurityId, dwReserved); + http_negotiate2 = get_callback_iface(This, &IID_IHttpNegotiate2); + if(http_negotiate2) { + hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, pbSecurityId, + pcbSecurityId, dwReserved); + IHttpNegotiate2_Release(http_negotiate2); + } + + return hres; } #undef HTTPNEG2_THIS @@ -444,7 +464,7 @@ { BindStatusCallback *ret = heap_alloc_zero(sizeof(BindStatusCallback)); - ret->lpBindStatusCallbackVtbl = &BindStatusCallbackVtbl; + ret->lpBindStatusCallbackExVtbl = &BindStatusCallbackExVtbl; ret->lpServiceProviderVtbl = &BSCServiceProviderVtbl; ret->lpHttpNegotiate2Vtbl = &BSCHttpNegotiateVtbl; ret->lpAuthenticateVtbl = &BSCAuthenticateVtbl; Modified: trunk/reactos/dll/win32/urlmon/binding.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/binding.c…
============================================================================== --- trunk/reactos/dll/win32/urlmon/binding.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/binding.c [iso-8859-1] Mon Oct 19 19:22:21 2009 @@ -1082,8 +1082,8 @@ TRACE("(%p)->(%08x %d %s)\n", This, hrResult, dwError, debugstr_w(szResult)); + stop_binding(This, hrResult, szResult); IInternetProtocol_Terminate(This->protocol, 0); - stop_binding(This, hrResult, szResult); return S_OK; } Modified: trunk/reactos/dll/win32/urlmon/bindprot.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/bindprot.…
============================================================================== --- trunk/reactos/dll/win32/urlmon/bindprot.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/bindprot.c [iso-8859-1] Mon Oct 19 19:22:21 2009 @@ -38,6 +38,7 @@ const IInternetPriorityVtbl *lpInternetPriorityVtbl; const IServiceProviderVtbl *lpServiceProviderVtbl; const IInternetProtocolSinkVtbl *lpIInternetProtocolSinkVtbl; + const IWinInetHttpInfoVtbl *lpIWinInetHttpInfoVtbl; const IInternetProtocolVtbl *lpIInternetProtocolHandlerVtbl; @@ -73,6 +74,7 @@ #define BINDINFO(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl) #define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl) +#define HTTPINFO(x) ((IWinInetHttpInfo*) &(x)->lpIWinInetHttpInfoVtbl) #define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl) #define PROTOCOLHANDLER(x) ((IInternetProtocol*) &(x)->lpIInternetProtocolHandlerVtbl) @@ -316,15 +318,41 @@ }else if(IsEqualGUID(&IID_IInternetProtocolSink, riid)) { TRACE("(%p)->(IID_IInternetProtocolSink %p)\n", This, ppv); *ppv = PROTSINK(This); - } - - if(*ppv) { - IInternetProtocol_AddRef(iface); - return S_OK; - } - - WARN("not supported interface %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; + }else if(IsEqualGUID(&IID_IWinInetInfo, riid)) { + TRACE("(%p)->(IID_IWinInetInfo %p)\n", This, ppv); + + if(This->protocol) { + IWinInetInfo *inet_info; + HRESULT hres; + + hres = IInternetProtocol_QueryInterface(This->protocol, &IID_IWinInetInfo, (void**)&inet_info); + if(SUCCEEDED(hres)) { + *ppv = HTTPINFO(This); + IWinInetInfo_Release(inet_info); + } + } + }else if(IsEqualGUID(&IID_IWinInetHttpInfo, riid)) { + TRACE("(%p)->(IID_IWinInetHttpInfo %p)\n", This, ppv); + + if(This->protocol) { + IWinInetHttpInfo *http_info; + HRESULT hres; + + hres = IInternetProtocol_QueryInterface(This->protocol, &IID_IWinInetHttpInfo, (void**)&http_info); + if(SUCCEEDED(hres)) { + *ppv = HTTPINFO(This); + IWinInetHttpInfo_Release(http_info); + } + } + }else { + WARN("not supported interface %s\n", debugstr_guid(riid)); + } + + if(!*ppv) + return E_NOINTERFACE; + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; } static ULONG WINAPI BindProtocol_AddRef(IInternetProtocol *iface) @@ -675,7 +703,7 @@ TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead); - if(This->buf) { + if(This->buf_size) { read = min(cb, This->buf_size); memcpy(pv, This->buf, read); @@ -1000,36 +1028,55 @@ return S_OK; if((This->pi & PI_MIMEVERIFICATION) && !This->reported_mime) { + BYTE buf[BUFFER_SIZE]; DWORD read = 0; LPWSTR mime; HRESULT hres; - if(!This->buf) { - This->buf = heap_alloc(BUFFER_SIZE); - if(!This->buf) - return E_OUTOFMEMORY; - } - do { read = 0; - hres = IInternetProtocol_Read(This->protocol, This->buf+This->buf_size, - BUFFER_SIZE-This->buf_size, &read); + hres = IInternetProtocol_Read(This->protocol, buf, + sizeof(buf)-This->buf_size, &read); if(FAILED(hres) && hres != E_PENDING) return hres; + + if(!This->buf) { + This->buf = heap_alloc(BUFFER_SIZE); + if(!This->buf) + return E_OUTOFMEMORY; + }else if(read + This->buf_size > BUFFER_SIZE) { + BYTE *tmp; + + tmp = heap_realloc(This->buf, read+This->buf_size); + if(!tmp) + return E_OUTOFMEMORY; + This->buf = tmp; + } + + memcpy(This->buf+This->buf_size, buf, read); This->buf_size += read; }while(This->buf_size < MIME_TEST_SIZE && hres == S_OK); if(This->buf_size < MIME_TEST_SIZE && hres != S_FALSE) return S_OK; - hres = FindMimeFromData(NULL, This->url, This->buf, min(This->buf_size, MIME_TEST_SIZE), - This->mime, 0, &mime, 0); - if(FAILED(hres)) - return hres; - - mime_available(This, mime, TRUE); - CoTaskMemFree(mime); - } + bscf = BSCF_FIRSTDATANOTIFICATION; + if(hres == S_FALSE) + bscf |= BSCF_LASTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE; + + if(!This->reported_mime) { + hres = FindMimeFromData(NULL, This->url, This->buf, min(This->buf_size, MIME_TEST_SIZE), + This->mime, 0, &mime, 0); + if(FAILED(hres)) + return hres; + + mime_available(This, mime, TRUE); + CoTaskMemFree(mime); + } + } + + if(!This->protocol_sink) + return S_OK; return IInternetProtocolSink_ReportData(This->protocol_sink, bscf, progress, progress_max); } @@ -1138,6 +1185,52 @@ BPInternetProtocolSink_ReportResult }; +#define INETINFO_THIS(iface) DEFINE_THIS(BindProtocol, IWinInetHttpInfo, iface) + +static HRESULT WINAPI WinInetHttpInfo_QueryInterface(IWinInetHttpInfo *iface, REFIID riid, void **ppv) +{ + BindProtocol *This = INETINFO_THIS(iface); + return IInternetProtocol_QueryInterface(PROTOCOL(This), riid, ppv); +} + +static ULONG WINAPI WinInetHttpInfo_AddRef(IWinInetHttpInfo *iface) +{ + BindProtocol *This = INETINFO_THIS(iface); + return IInternetProtocol_AddRef(PROTOCOL(This)); +} + +static ULONG WINAPI WinInetHttpInfo_Release(IWinInetHttpInfo *iface) +{ + BindProtocol *This = INETINFO_THIS(iface); + return IInternetProtocol_Release(PROTOCOL(This)); +} + +static HRESULT WINAPI WinInetHttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD dwOption, + void *pBuffer, DWORD *pcbBuffer) +{ + BindProtocol *This = INETINFO_THIS(iface); + FIXME("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer); + return E_NOTIMPL; +} + +static HRESULT WINAPI WinInetHttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption, + void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved) +{ + BindProtocol *This = INETINFO_THIS(iface); + FIXME("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); + return E_NOTIMPL; +} + +#undef INETINFO_THIS + +static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl = { + WinInetHttpInfo_QueryInterface, + WinInetHttpInfo_AddRef, + WinInetHttpInfo_Release, + WinInetHttpInfo_QueryOption, + WinInetHttpInfo_QueryInfo +}; + #define SERVPROV_THIS(iface) DEFINE_THIS(BindProtocol, ServiceProvider, iface) static HRESULT WINAPI BPServiceProvider_QueryInterface(IServiceProvider *iface, @@ -1191,6 +1284,7 @@ ret->lpServiceProviderVtbl = &ServiceProviderVtbl; ret->lpIInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl; ret->lpIInternetProtocolHandlerVtbl = &InternetProtocolHandlerVtbl; + ret->lpIWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl; ret->ref = 1; ret->from_urlmon = from_urlmon; Modified: trunk/reactos/dll/win32/urlmon/ftp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/ftp.c?rev…
============================================================================== --- trunk/reactos/dll/win32/urlmon/ftp.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/ftp.c [iso-8859-1] Mon Oct 19 19:22:21 2009 @@ -37,11 +37,11 @@ #define ASYNCPROTOCOL_THIS(iface) DEFINE_THIS2(FtpProtocol, base, iface) static HRESULT FtpProtocol_open_request(Protocol *prot, LPCWSTR url, DWORD request_flags, - IInternetBindInfo *bind_info) + HINTERNET internet_session, IInternetBindInfo *bind_info) { FtpProtocol *This = ASYNCPROTOCOL_THIS(prot); - This->base.request = InternetOpenUrlW(This->base.internet, url, NULL, 0, + This->base.request = InternetOpenUrlW(internet_session, url, NULL, 0, request_flags|INTERNET_FLAG_EXISTING_CONNECT|INTERNET_FLAG_PASSIVE, (DWORD_PTR)&This->base); if (!This->base.request && GetLastError() != ERROR_IO_PENDING) { Modified: trunk/reactos/dll/win32/urlmon/gopher.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/gopher.c?…
============================================================================== --- trunk/reactos/dll/win32/urlmon/gopher.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/gopher.c [iso-8859-1] Mon Oct 19 19:22:21 2009 @@ -35,11 +35,11 @@ #define ASYNCPROTOCOL_THIS(iface) DEFINE_THIS2(GopherProtocol, base, iface) static HRESULT GopherProtocol_open_request(Protocol *prot, LPCWSTR url, DWORD request_flags, - IInternetBindInfo *bind_info) + HINTERNET internet_session, IInternetBindInfo *bind_info) { GopherProtocol *This = ASYNCPROTOCOL_THIS(prot); - This->base.request = InternetOpenUrlW(This->base.internet, url, NULL, 0, + This->base.request = InternetOpenUrlW(internet_session, url, NULL, 0, request_flags, (DWORD_PTR)&This->base); if (!This->base.request && GetLastError() != ERROR_IO_PENDING) { WARN("InternetOpenUrl failed: %d\n", GetLastError()); Modified: trunk/reactos/dll/win32/urlmon/http.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/http.c?re…
============================================================================== --- trunk/reactos/dll/win32/urlmon/http.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/http.c [iso-8859-1] Mon Oct 19 19:22:21 2009 @@ -73,7 +73,7 @@ #define ASYNCPROTOCOL_THIS(iface) DEFINE_THIS2(HttpProtocol, base, iface) static HRESULT HttpProtocol_open_request(Protocol *prot, LPCWSTR url, DWORD request_flags, - IInternetBindInfo *bind_info) + HINTERNET internet_session, IInternetBindInfo *bind_info) { HttpProtocol *This = ASYNCPROTOCOL_THIS(prot); LPWSTR addl_header = NULL, post_cookie = NULL, optional = NULL; @@ -106,7 +106,7 @@ host = heap_strndupW(url_comp.lpszHostName, url_comp.dwHostNameLength); user = heap_strndupW(url_comp.lpszUserName, url_comp.dwUserNameLength); pass = heap_strndupW(url_comp.lpszPassword, url_comp.dwPasswordLength); - This->base.connection = InternetConnectW(This->base.internet, host, url_comp.nPort, user, pass, + This->base.connection = InternetConnectW(internet_session, host, url_comp.nPort, user, pass, INTERNET_SERVICE_HTTP, This->https ? INTERNET_FLAG_SECURE : 0, (DWORD_PTR)&This->base); heap_free(pass); heap_free(user); Modified: trunk/reactos/dll/win32/urlmon/protocol.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/protocol.…
============================================================================== --- trunk/reactos/dll/win32/urlmon/protocol.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/protocol.c [iso-8859-1] Mon Oct 19 19:22:21 2009 @@ -186,12 +186,53 @@ } } +static HINTERNET create_internet_session(IInternetBindInfo *bind_info) +{ + LPWSTR global_user_agent = NULL; + LPOLESTR user_agent = NULL; + ULONG size = 0; + HINTERNET ret; + HRESULT hres; + + hres = IInternetBindInfo_GetBindString(bind_info, BINDSTRING_USER_AGENT, &user_agent, 1, &size); + if(hres != S_OK || !size) + global_user_agent = get_useragent(); + + ret = InternetOpenW(user_agent ? user_agent : global_user_agent, 0, NULL, NULL, INTERNET_FLAG_ASYNC); + heap_free(global_user_agent); + CoTaskMemFree(user_agent); + if(!ret) { + WARN("InternetOpen failed: %d\n", GetLastError()); + return NULL; + } + + InternetSetStatusCallbackW(ret, internet_status_callback); + return ret; +} + +static HINTERNET internet_session; + +HINTERNET get_internet_session(IInternetBindInfo *bind_info) +{ + HINTERNET new_session; + + if(internet_session) + return internet_session; + + if(!bind_info) + return NULL; + + new_session = create_internet_session(bind_info); + if(new_session && InterlockedCompareExchangePointer((void**)&internet_session, new_session, NULL)) + InternetCloseHandle(new_session); + + return internet_session; +} + HRESULT protocol_start(Protocol *protocol, IInternetProtocol *prot, LPCWSTR url, IInternetProtocolSink *protocol_sink, IInternetBindInfo *bind_info) { - LPOLESTR user_agent = NULL; DWORD request_flags; - ULONG size = 0; HRESULT hres; protocol->protocol = prot; @@ -210,37 +251,8 @@ if(!(protocol->bindf & BINDF_FROMURLMON)) report_progress(protocol, BINDSTATUS_DIRECTBIND, NULL); - hres = IInternetBindInfo_GetBindString(bind_info, BINDSTRING_USER_AGENT, &user_agent, 1, &size); - if (hres != S_OK || !size) { - DWORD len; - CHAR null_char = 0; - LPSTR user_agenta = NULL; - - len = 0; - if ((hres = ObtainUserAgentString(0, &null_char, &len)) != E_OUTOFMEMORY) { - WARN("ObtainUserAgentString failed: %08x\n", hres); - }else if (!(user_agenta = heap_alloc(len*sizeof(CHAR)))) { - WARN("Out of memory\n"); - }else if ((hres = ObtainUserAgentString(0, user_agenta, &len)) != S_OK) { - WARN("ObtainUserAgentString failed: %08x\n", hres); - }else { - if(!(user_agent = CoTaskMemAlloc((len)*sizeof(WCHAR)))) - WARN("Out of memory\n"); - else - MultiByteToWideChar(CP_ACP, 0, user_agenta, -1, user_agent, len); - } - heap_free(user_agenta); - } - - protocol->internet = InternetOpenW(user_agent, 0, NULL, NULL, INTERNET_FLAG_ASYNC); - CoTaskMemFree(user_agent); - if(!protocol->internet) { - WARN("InternetOpen failed: %d\n", GetLastError()); + if(!get_internet_session(bind_info)) return report_result(protocol, INET_E_NO_SESSION); - } - - /* Native does not check for success of next call, so we won't either */ - InternetSetStatusCallbackW(protocol->internet, internet_status_callback); request_flags = INTERNET_FLAG_KEEP_CONNECTION; if(protocol->bindf & BINDF_NOWRITECACHE) @@ -248,7 +260,7 @@ if(protocol->bindf & BINDF_NEEDFILE) request_flags |= INTERNET_FLAG_NEED_FILE; - hres = protocol->vtbl->open_request(protocol, url, request_flags, bind_info); + hres = protocol->vtbl->open_request(protocol, url, request_flags, internet_session, bind_info); if(FAILED(hres)) { protocol_close_connection(protocol); return report_result(protocol, hres); @@ -326,14 +338,14 @@ BOOL res; HRESULT hres = S_FALSE; + if(protocol->flags & FLAG_ALL_DATA_READ) { + *read_ret = 0; + return S_FALSE; + } + if(!(protocol->flags & FLAG_REQUEST_COMPLETE)) { *read_ret = 0; return E_PENDING; - } - - if(protocol->flags & FLAG_ALL_DATA_READ) { - *read_ret = 0; - return S_FALSE; } while(read < size) { @@ -421,10 +433,5 @@ if(protocol->connection) InternetCloseHandle(protocol->connection); - if(protocol->internet) { - InternetCloseHandle(protocol->internet); - protocol->internet = 0; - } - protocol->flags = 0; } Modified: trunk/reactos/dll/win32/urlmon/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/rsrc.rc?r…
============================================================================== --- trunk/reactos/dll/win32/urlmon/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/rsrc.rc [iso-8859-1] Mon Oct 19 19:22:21 2009 @@ -19,4 +19,10 @@ /* @makedep: urlmon.inf */ REGINST REGINST urlmon.inf -#include "version.rc" +#define WINE_FILENAME_STR "urlmon.dll" +#define WINE_FILEVERSION 6,0,2800,1485 +#define WINE_FILEVERSION_STR "6.0.2800.1485" +#define WINE_PRODUCTVERSION 6,0,2800,1485 +#define WINE_PRODUCTVERSION_STR "6.0.2800.1485" + +#include "wine/wine_common_ver.rc" Modified: trunk/reactos/dll/win32/urlmon/sec_mgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/sec_mgr.c…
============================================================================== --- trunk/reactos/dll/win32/urlmon/sec_mgr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/sec_mgr.c [iso-8859-1] Mon Oct 19 19:22:21 2009 @@ -3,6 +3,7 @@ * * Copyright (c) 2004 Huw D M Davies * Copyright 2004 Jacek Caban + * Copyright 2009 Detlef Riekenberg * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -29,7 +30,73 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); +static const WCHAR currentlevelW[] = {'C','u','r','r','e','n','t','L','e','v','e','l',0}; +static const WCHAR descriptionW[] = {'D','e','s','c','r','i','p','t','i','o','n',0}; +static const WCHAR displaynameW[] = {'D','i','s','p','l','a','y','N','a','m','e',0}; static const WCHAR fileW[] = {'f','i','l','e',0}; +static const WCHAR flagsW[] = {'F','l','a','g','s',0}; +static const WCHAR iconW[] = {'I','c','o','n',0}; +static const WCHAR minlevelW[] = {'M','i','n','L','e','v','e','l',0}; +static const WCHAR recommendedlevelW[] = {'R','e','c','o','m','m','e','n','d','e','d', + 'L','e','v','e','l',0}; +static const WCHAR wszZonesKey[] = {'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s','\\', + 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', + 'I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s','\\', + 'Z','o','n','e','s','\\',0}; + +/******************************************************************** + * get_string_from_reg [internal] + * + * helper to get a string from the reg. + * + */ +static void get_string_from_reg(HKEY hcu, HKEY hklm, LPCWSTR name, LPWSTR out, DWORD maxlen) +{ + DWORD type = REG_SZ; + DWORD len = maxlen * sizeof(WCHAR); + DWORD res; + + res = RegQueryValueExW(hcu, name, NULL, &type, (LPBYTE) out, &len); + + if (res && hklm) { + len = maxlen * sizeof(WCHAR); + type = REG_SZ; + res = RegQueryValueExW(hklm, name, NULL, &type, (LPBYTE) out, &len); + } + + if (res) { + TRACE("%s failed: %d\n", debugstr_w(name), res); + *out = '\0'; + } +} + +/******************************************************************** + * get_dword_from_reg [internal] + * + * helper to get a dword from the reg. + * + */ +static void get_dword_from_reg(HKEY hcu, HKEY hklm, LPCWSTR name, LPDWORD out) +{ + DWORD type = REG_DWORD; + DWORD len = sizeof(DWORD); + DWORD res; + + res = RegQueryValueExW(hcu, name, NULL, &type, (LPBYTE) out, &len); + + if (res && hklm) { + len = sizeof(DWORD); + type = REG_DWORD; + res = RegQueryValueExW(hklm, name, NULL, &type, (LPBYTE) out, &len); + } + + if (res) { + TRACE("%s failed: %d\n", debugstr_w(name), res); + *out = 0; + } +} static HRESULT get_zone_from_reg(LPCWSTR schema, DWORD *zone) { @@ -145,13 +212,6 @@ static HRESULT open_zone_key(HKEY parent_key, DWORD zone, HKEY *hkey) { - static const WCHAR wszZonesKey[] = - {'S','o','f','t','w','a','r','e','\\', - 'M','i','c','r','o','s','o','f','t','\\', - 'W','i','n','d','o','w','s','\\', - 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', - 'I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s','\\', - 'Z','o','n','e','s','\\',0}; static const WCHAR wszFormat[] = {'%','s','%','l','d',0}; WCHAR key_name[sizeof(wszZonesKey)/sizeof(WCHAR)+8]; @@ -178,6 +238,7 @@ switch(action) { case URLACTION_SCRIPT_OVERRIDE_SAFETY: + case URLACTION_ACTIVEX_OVERRIDE_SCRIPT_SAFETY: *(DWORD*)policy = URLPOLICY_DISALLOW; return S_OK; } @@ -476,7 +537,7 @@ return hres; } - if(pContext || cbContext || dwFlags || dwReserved) + if(dwFlags || dwReserved) FIXME("Unsupported arguments\n"); if(!pwszUrl) @@ -491,6 +552,8 @@ return hres; TRACE("policy %x\n", policy); + if(cbPolicy >= sizeof(DWORD)) + *(DWORD*)pPolicy = policy; switch(GetUrlPolicyPermissions(policy)) { case URLPOLICY_ALLOW: @@ -528,8 +591,8 @@ return hres; } - FIXME("Default action is not implemented\n"); - return E_NOTIMPL; + WARN("Unknown guidKey %s\n", debugstr_guid(guidKey)); + return HRESULT_FROM_WIN32(ERROR_NOT_FOUND); } static HRESULT WINAPI SecManagerImpl_SetZoneMapping(IInternetSecurityManager *iface, @@ -611,14 +674,75 @@ * */ typedef struct { - const IInternetZoneManagerVtbl* lpVtbl; + const IInternetZoneManagerEx2Vtbl* lpVtbl; LONG ref; + LPDWORD *zonemaps; + DWORD zonemap_count; } ZoneMgrImpl; + +/*********************************************************************** + * build_zonemap_from_reg [internal] + * + * Enumerate the Zones in the Registry and return the Zones in a DWORD-array + * The number of the Zones is returned in data[0] + */ +static LPDWORD build_zonemap_from_reg(void) +{ + WCHAR name[32]; + HKEY hkey; + LPDWORD data = NULL; + DWORD allocated = 6; /* space for the zonecount and Zone "0" up to Zone "4" */ + DWORD used = 0; + DWORD res; + DWORD len; + + + res = RegOpenKeyW(HKEY_CURRENT_USER, wszZonesKey, &hkey); + if (res) + return NULL; + + data = heap_alloc(allocated * sizeof(DWORD)); + if (!data) + goto cleanup; + + while (!res) { + name[0] = '\0'; + len = sizeof(name) / sizeof(name[0]); + res = RegEnumKeyExW(hkey, used, name, &len, NULL, NULL, NULL, NULL); + + if (!res) { + used++; + if (used == allocated) { + LPDWORD new_data; + + allocated *= 2; + new_data = heap_realloc_zero(data, allocated * sizeof(DWORD)); + if (!new_data) + goto cleanup; + + data = new_data; + } + data[used] = atoiW(name); + } + } + if (used) { + RegCloseKey(hkey); + data[0] = used; + return data; + } + +cleanup: + /* something failed */ + RegCloseKey(hkey); + heap_free(data); + return NULL; +} + /******************************************************************** * IInternetZoneManager_QueryInterface */ -static HRESULT WINAPI ZoneMgrImpl_QueryInterface(IInternetZoneManager* iface, REFIID riid, void** ppvObject) +static HRESULT WINAPI ZoneMgrImpl_QueryInterface(IInternetZoneManagerEx2* iface, REFIID riid, void** ppvObject) { ZoneMgrImpl* This = (ZoneMgrImpl*)iface; @@ -627,7 +751,17 @@ if(!This || !ppvObject) return E_INVALIDARG; - if(!IsEqualIID(&IID_IUnknown, riid) && !IsEqualIID(&IID_IInternetZoneManager, riid)) { + if(IsEqualIID(&IID_IUnknown, riid)) { + TRACE("(%p)->(IID_IUnknown %p)\n", This, ppvObject); + }else if(IsEqualIID(&IID_IInternetZoneManager, riid)) { + TRACE("(%p)->(IID_InternetZoneManager %p)\n", This, ppvObject); + }else if(IsEqualIID(&IID_IInternetZoneManagerEx, riid)) { + TRACE("(%p)->(IID_InternetZoneManagerEx %p)\n", This, ppvObject); + }else if(IsEqualIID(&IID_IInternetZoneManagerEx2, riid)) { + TRACE("(%p)->(IID_InternetZoneManagerEx2 %p)\n", This, ppvObject); + } + else + { FIXME("Unknown interface: %s\n", debugstr_guid(riid)); *ppvObject = NULL; return E_NOINTERFACE; @@ -635,14 +769,13 @@ *ppvObject = iface; IInternetZoneManager_AddRef(iface); - return S_OK; } /******************************************************************** * IInternetZoneManager_AddRef */ -static ULONG WINAPI ZoneMgrImpl_AddRef(IInternetZoneManager* iface) +static ULONG WINAPI ZoneMgrImpl_AddRef(IInternetZoneManagerEx2* iface) { ZoneMgrImpl* This = (ZoneMgrImpl*)iface; ULONG refCount = InterlockedIncrement(&This->ref); @@ -655,7 +788,7 @@ /******************************************************************** * IInternetZoneManager_Release */ -static ULONG WINAPI ZoneMgrImpl_Release(IInternetZoneManager* iface) +static ULONG WINAPI ZoneMgrImpl_Release(IInternetZoneManagerEx2* iface) { ZoneMgrImpl* This = (ZoneMgrImpl*)iface; ULONG refCount = InterlockedDecrement(&This->ref); @@ -663,6 +796,8 @@ TRACE("(%p)->(ref before=%u)\n",This, refCount + 1); if(!refCount) { + while (This->zonemap_count) heap_free(This->zonemaps[--This->zonemap_count]); + heap_free(This->zonemaps); heap_free(This); URLMON_UnlockModule(); } @@ -673,18 +808,45 @@ /******************************************************************** * IInternetZoneManager_GetZoneAttributes */ -static HRESULT WINAPI ZoneMgrImpl_GetZoneAttributes(IInternetZoneManager* iface, +static HRESULT WINAPI ZoneMgrImpl_GetZoneAttributes(IInternetZoneManagerEx2* iface, DWORD dwZone, ZONEATTRIBUTES* pZoneAttributes) { - FIXME("(%p)->(%d %p) stub\n", iface, dwZone, pZoneAttributes); - return E_NOTIMPL; + ZoneMgrImpl* This = (ZoneMgrImpl*)iface; + HRESULT hr; + HKEY hcu; + HKEY hklm = NULL; + + TRACE("(%p)->(%d %p)\n", This, dwZone, pZoneAttributes); + + if (!pZoneAttributes) + return E_INVALIDARG; + + hr = open_zone_key(HKEY_CURRENT_USER, dwZone, &hcu); + if (FAILED(hr)) + return S_OK; /* IE6 and older returned E_FAIL here */ + + hr = open_zone_key(HKEY_LOCAL_MACHINE, dwZone, &hklm); + if (FAILED(hr)) + TRACE("Zone %d not in HKLM\n", dwZone); + + get_string_from_reg(hcu, hklm, displaynameW, pZoneAttributes->szDisplayName, MAX_ZONE_PATH); + get_string_from_reg(hcu, hklm, descriptionW, pZoneAttributes->szDescription, MAX_ZONE_DESCRIPTION); + get_string_from_reg(hcu, hklm, iconW, pZoneAttributes->szIconPath, MAX_ZONE_PATH); + get_dword_from_reg(hcu, hklm, minlevelW, &pZoneAttributes->dwTemplateMinLevel); + get_dword_from_reg(hcu, hklm, currentlevelW, &pZoneAttributes->dwTemplateCurrentLevel); + get_dword_from_reg(hcu, hklm, recommendedlevelW, &pZoneAttributes->dwTemplateRecommended); + get_dword_from_reg(hcu, hklm, flagsW, &pZoneAttributes->dwFlags); + + RegCloseKey(hklm); + RegCloseKey(hcu); + return S_OK; } /******************************************************************** * IInternetZoneManager_SetZoneAttributes */ -static HRESULT WINAPI ZoneMgrImpl_SetZoneAttributes(IInternetZoneManager* iface, +static HRESULT WINAPI ZoneMgrImpl_SetZoneAttributes(IInternetZoneManagerEx2* iface, DWORD dwZone, ZONEATTRIBUTES* pZoneAttributes) { @@ -695,7 +857,7 @@ /******************************************************************** * IInternetZoneManager_GetZoneCustomPolicy */ -static HRESULT WINAPI ZoneMgrImpl_GetZoneCustomPolicy(IInternetZoneManager* iface, +static HRESULT WINAPI ZoneMgrImpl_GetZoneCustomPolicy(IInternetZoneManagerEx2* iface, DWORD dwZone, REFGUID guidKey, BYTE** ppPolicy, @@ -710,7 +872,7 @@ /******************************************************************** * IInternetZoneManager_SetZoneCustomPolicy */ -static HRESULT WINAPI ZoneMgrImpl_SetZoneCustomPolicy(IInternetZoneManager* iface, +static HRESULT WINAPI ZoneMgrImpl_SetZoneCustomPolicy(IInternetZoneManagerEx2* iface, DWORD dwZone, REFGUID guidKey, BYTE* ppPolicy, @@ -725,7 +887,7 @@ /******************************************************************** * IInternetZoneManager_GetZoneActionPolicy */ -static HRESULT WINAPI ZoneMgrImpl_GetZoneActionPolicy(IInternetZoneManager* iface, +static HRESULT WINAPI ZoneMgrImpl_GetZoneActionPolicy(IInternetZoneManagerEx2* iface, DWORD dwZone, DWORD dwAction, BYTE* pPolicy, DWORD cbPolicy, URLZONEREG urlZoneReg) { TRACE("(%p)->(%d %08x %p %d %d)\n", iface, dwZone, dwAction, pPolicy, @@ -740,7 +902,7 @@ /******************************************************************** * IInternetZoneManager_SetZoneActionPolicy */ -static HRESULT WINAPI ZoneMgrImpl_SetZoneActionPolicy(IInternetZoneManager* iface, +static HRESULT WINAPI ZoneMgrImpl_SetZoneActionPolicy(IInternetZoneManagerEx2* iface, DWORD dwZone, DWORD dwAction, BYTE* pPolicy, @@ -755,7 +917,7 @@ /******************************************************************** * IInternetZoneManager_PromptAction */ -static HRESULT WINAPI ZoneMgrImpl_PromptAction(IInternetZoneManager* iface, +static HRESULT WINAPI ZoneMgrImpl_PromptAction(IInternetZoneManagerEx2* iface, DWORD dwAction, HWND hwndParent, LPCWSTR pwszUrl, @@ -770,7 +932,7 @@ /******************************************************************** * IInternetZoneManager_LogAction */ -static HRESULT WINAPI ZoneMgrImpl_LogAction(IInternetZoneManager* iface, +static HRESULT WINAPI ZoneMgrImpl_LogAction(IInternetZoneManagerEx2* iface, DWORD dwAction, LPCWSTR pwszUrl, LPCWSTR pwszText, @@ -784,41 +946,108 @@ /******************************************************************** * IInternetZoneManager_CreateZoneEnumerator */ -static HRESULT WINAPI ZoneMgrImpl_CreateZoneEnumerator(IInternetZoneManager* iface, +static HRESULT WINAPI ZoneMgrImpl_CreateZoneEnumerator(IInternetZoneManagerEx2* iface, DWORD* pdwEnum, DWORD* pdwCount, DWORD dwFlags) { - FIXME("(%p)->(%p %p %08x) stub\n", iface, pdwEnum, pdwCount, dwFlags); - return E_NOTIMPL; + ZoneMgrImpl* This = (ZoneMgrImpl*)iface; + LPDWORD * new_maps; + LPDWORD data; + DWORD i; + + TRACE("(%p)->(%p, %p, 0x%08x)\n", This, pdwEnum, pdwCount, dwFlags); + if (!pdwEnum || !pdwCount || (dwFlags != 0)) + return E_INVALIDARG; + + data = build_zonemap_from_reg(); + TRACE("found %d zones\n", data ? data[0] : -1); + + if (!data) + return E_FAIL; + + for (i = 0; i < This->zonemap_count; i++) { + if (This->zonemaps && !This->zonemaps[i]) { + This->zonemaps[i] = data; + *pdwEnum = i; + *pdwCount = data[0]; + return S_OK; + } + } + + if (This->zonemaps) { + /* try to double the nr. of pointers in the array */ + new_maps = heap_realloc_zero(This->zonemaps, This->zonemap_count * 2 * sizeof(LPDWORD)); + if (new_maps) + This->zonemap_count *= 2; + } + else + { + This->zonemap_count = 2; + new_maps = heap_alloc_zero(This->zonemap_count * sizeof(LPDWORD)); + } + + if (!new_maps) { + heap_free(data); + return E_FAIL; + } + This->zonemaps = new_maps; + This->zonemaps[i] = data; + *pdwEnum = i; + *pdwCount = data[0]; + return S_OK; } /******************************************************************** * IInternetZoneManager_GetZoneAt */ -static HRESULT WINAPI ZoneMgrImpl_GetZoneAt(IInternetZoneManager* iface, +static HRESULT WINAPI ZoneMgrImpl_GetZoneAt(IInternetZoneManagerEx2* iface, DWORD dwEnum, DWORD dwIndex, DWORD* pdwZone) { - FIXME("(%p)->(%08x %08x %p) stub\n", iface, dwEnum, dwIndex, pdwZone); - return E_NOTIMPL; + ZoneMgrImpl* This = (ZoneMgrImpl*)iface; + LPDWORD data; + + TRACE("(%p)->(0x%08x, %d, %p)\n", This, dwEnum, dwIndex, pdwZone); + + /* make sure, that dwEnum and dwIndex are in the valid range */ + if (dwEnum < This->zonemap_count) { + if ((data = This->zonemaps[dwEnum])) { + if (dwIndex < data[0]) { + *pdwZone = data[dwIndex + 1]; + return S_OK; + } + } + } + return E_INVALIDARG; } /******************************************************************** * IInternetZoneManager_DestroyZoneEnumerator */ -static HRESULT WINAPI ZoneMgrImpl_DestroyZoneEnumerator(IInternetZoneManager* iface, +static HRESULT WINAPI ZoneMgrImpl_DestroyZoneEnumerator(IInternetZoneManagerEx2* iface, DWORD dwEnum) { - FIXME("(%p)->(%08x) stub\n", iface, dwEnum); - return E_NOTIMPL; + ZoneMgrImpl* This = (ZoneMgrImpl*)iface; + LPDWORD data; + + TRACE("(%p)->(0x%08x)\n", This, dwEnum); + /* make sure, that dwEnum is valid */ + if (dwEnum < This->zonemap_count) { + if ((data = This->zonemaps[dwEnum])) { + This->zonemaps[dwEnum] = NULL; + heap_free(data); + return S_OK; + } + } + return E_INVALIDARG; } /******************************************************************** * IInternetZoneManager_CopyTemplatePoliciesToZone */ -static HRESULT WINAPI ZoneMgrImpl_CopyTemplatePoliciesToZone(IInternetZoneManager* iface, +static HRESULT WINAPI ZoneMgrImpl_CopyTemplatePoliciesToZone(IInternetZoneManagerEx2* iface, DWORD dwTemplate, DWORD dwZone, DWORD dwReserved) @@ -828,12 +1057,118 @@ } /******************************************************************** + * IInternetZoneManagerEx_GetZoneActionPolicyEx + */ +static HRESULT WINAPI ZoneMgrImpl_GetZoneActionPolicyEx(IInternetZoneManagerEx2* iface, + DWORD dwZone, + DWORD dwAction, + BYTE* pPolicy, + DWORD cbPolicy, + URLZONEREG urlZoneReg, + DWORD dwFlags) +{ + TRACE("(%p)->(%d, 0x%x, %p, %d, %d, 0x%x)\n", iface, dwZone, + dwAction, pPolicy, cbPolicy, urlZoneReg, dwFlags); + + if(!pPolicy) + return E_INVALIDARG; + + if (dwFlags) + FIXME("dwFlags 0x%x ignored\n", dwFlags); + + return get_action_policy(dwZone, dwAction, pPolicy, cbPolicy, urlZoneReg); +} + +/******************************************************************** + * IInternetZoneManagerEx_SetZoneActionPolicyEx + */ +static HRESULT WINAPI ZoneMgrImpl_SetZoneActionPolicyEx(IInternetZoneManagerEx2* iface, + DWORD dwZone, + DWORD dwAction, + BYTE* pPolicy, + DWORD cbPolicy, + URLZONEREG urlZoneReg, + DWORD dwFlags) +{ + FIXME("(%p)->(%d, 0x%x, %p, %d, %d, 0x%x) stub\n", iface, dwZone, dwAction, pPolicy, + cbPolicy, urlZoneReg, dwFlags); + return E_NOTIMPL; +} + +/******************************************************************** + * IInternetZoneManagerEx2_GetZoneAttributesEx + */ +static HRESULT WINAPI ZoneMgrImpl_GetZoneAttributesEx(IInternetZoneManagerEx2* iface, + DWORD dwZone, + ZONEATTRIBUTES* pZoneAttributes, + DWORD dwFlags) +{ + TRACE("(%p)->(%d, %p, 0x%x)\n", iface, dwZone, pZoneAttributes, dwFlags); + + if (dwFlags) + FIXME("dwFlags 0x%x ignored\n", dwFlags); + + return IInternetZoneManager_GetZoneAttributes(iface, dwZone, pZoneAttributes); +} + + +/******************************************************************** + * IInternetZoneManagerEx2_GetZoneSecurityState + */ +static HRESULT WINAPI ZoneMgrImpl_GetZoneSecurityState(IInternetZoneManagerEx2* iface, + DWORD dwZoneIndex, + BOOL fRespectPolicy, + LPDWORD pdwState, + BOOL *pfPolicyEncountered) +{ + FIXME("(%p)->(%d, %d, %p, %p) stub\n", iface, dwZoneIndex, fRespectPolicy, + pdwState, pfPolicyEncountered); + + *pdwState = SECURITY_IE_STATE_GREEN; + + if (pfPolicyEncountered) + *pfPolicyEncountered = FALSE; + + return S_OK; +} + +/******************************************************************** + * IInternetZoneManagerEx2_GetIESecurityState + */ +static HRESULT WINAPI ZoneMgrImpl_GetIESecurityState(IInternetZoneManagerEx2* iface, + BOOL fRespectPolicy, + LPDWORD pdwState, + BOOL *pfPolicyEncountered, + BOOL fNoCache) +{ + FIXME("(%p)->(%d, %p, %p, %d) stub\n", iface, fRespectPolicy, pdwState, + pfPolicyEncountered, fNoCache); + + *pdwState = SECURITY_IE_STATE_GREEN; + + if (pfPolicyEncountered) + *pfPolicyEncountered = FALSE; + + return S_OK; +} + +/******************************************************************** + * IInternetZoneManagerEx2_FixInsecureSettings + */ +static HRESULT WINAPI ZoneMgrImpl_FixInsecureSettings(IInternetZoneManagerEx2* iface) +{ + FIXME("(%p) stub\n", iface); + return S_OK; +} + +/******************************************************************** * IInternetZoneManager_Construct */ -static const IInternetZoneManagerVtbl ZoneMgrImplVtbl = { +static const IInternetZoneManagerEx2Vtbl ZoneMgrImplVtbl = { ZoneMgrImpl_QueryInterface, ZoneMgrImpl_AddRef, ZoneMgrImpl_Release, + /* IInternetZoneManager */ ZoneMgrImpl_GetZoneAttributes, ZoneMgrImpl_SetZoneAttributes, ZoneMgrImpl_GetZoneCustomPolicy, @@ -846,16 +1181,24 @@ ZoneMgrImpl_GetZoneAt, ZoneMgrImpl_DestroyZoneEnumerator, ZoneMgrImpl_CopyTemplatePoliciesToZone, + /* IInternetZoneManagerEx */ + ZoneMgrImpl_GetZoneActionPolicyEx, + ZoneMgrImpl_SetZoneActionPolicyEx, + /* IInternetZoneManagerEx2 */ + ZoneMgrImpl_GetZoneAttributesEx, + ZoneMgrImpl_GetZoneSecurityState, + ZoneMgrImpl_GetIESecurityState, + ZoneMgrImpl_FixInsecureSettings, }; HRESULT ZoneMgrImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) { - ZoneMgrImpl* ret = heap_alloc(sizeof(ZoneMgrImpl)); + ZoneMgrImpl* ret = heap_alloc_zero(sizeof(ZoneMgrImpl)); TRACE("(%p %p)\n", pUnkOuter, ppobj); ret->lpVtbl = &ZoneMgrImplVtbl; ret->ref = 1; - *ppobj = (IInternetZoneManager*)ret; + *ppobj = (IInternetZoneManagerEx*)ret; URLMON_LockModule(); Modified: trunk/reactos/dll/win32/urlmon/session.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/session.c…
============================================================================== --- trunk/reactos/dll/win32/urlmon/session.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/session.c [iso-8859-1] Mon Oct 19 19:22:21 2009 @@ -51,6 +51,13 @@ 0, 0, { (DWORD_PTR)(__FILE__ ": session") } }; static CRITICAL_SECTION session_cs = { &session_cs_dbg, -1, 0, 0, 0, 0 }; + +static const WCHAR internet_settings_keyW[] = + {'S','O','F','T','W','A','R','E', + '\\','M','i','c','r','o','s','o','f','t', + '\\','W','i','n','d','o','w','s', + '\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n', + '\\','I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s',0}; static name_space *find_name_space(LPCWSTR protocol) { @@ -482,15 +489,9 @@ DWORD size = sizeof(DWORD), res, type; HKEY hkey; - static const WCHAR wszKeyName[] = - {'S','O','F','T','W','A','R','E', - '\\','M','i','c','r','o','s','o','f','t', - '\\','W','i','n','d','o','w','s', - '\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n', - '\\','I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s',0}; static const WCHAR wszUrlEncoding[] = {'U','r','l','E','n','c','o','d','i','n','g',0}; - res = RegOpenKeyW(root, wszKeyName, &hkey); + res = RegOpenKeyW(root, internet_settings_keyW, &hkey); if(res != ERROR_SUCCESS) return FALSE; @@ -500,6 +501,50 @@ return res == ERROR_SUCCESS; } +static LPWSTR user_agent; + +static void ensure_useragent(void) +{ + DWORD size = sizeof(DWORD), res, type; + HKEY hkey; + + static const WCHAR user_agentW[] = {'U','s','e','r',' ','A','g','e','n','t',0}; + + if(user_agent) + return; + + res = RegOpenKeyW(HKEY_CURRENT_USER, internet_settings_keyW, &hkey); + if(res != ERROR_SUCCESS) + return; + + res = RegQueryValueExW(hkey, user_agentW, NULL, &type, NULL, &size); + if(res == ERROR_SUCCESS && type == REG_SZ) { + user_agent = heap_alloc(size); + res = RegQueryValueExW(hkey, user_agentW, NULL, &type, (LPBYTE)user_agent, &size); + if(res != ERROR_SUCCESS) { + heap_free(user_agent); + user_agent = NULL; + } + }else { + WARN("Could not find User Agent value: %u\n", res); + } + + RegCloseKey(hkey); +} + +LPWSTR get_useragent(void) +{ + LPWSTR ret; + + ensure_useragent(); + + EnterCriticalSection(&session_cs); + ret = heap_strdupW(user_agent); + LeaveCriticalSection(&session_cs); + + return ret; +} + HRESULT WINAPI UrlMkGetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBufferLength, DWORD* pdwBufferLength, DWORD dwReserved) { @@ -509,6 +554,32 @@ WARN("dwReserved = %d\n", dwReserved); switch(dwOption) { + case URLMON_OPTION_USERAGENT: { + HRESULT hres = E_OUTOFMEMORY; + DWORD size; + + if(!pdwBufferLength) + return E_INVALIDARG; + + EnterCriticalSection(&session_cs); + + ensure_useragent(); + if(user_agent) { + size = WideCharToMultiByte(CP_ACP, 0, user_agent, -1, NULL, 0, NULL, NULL); + *pdwBufferLength = size; + if(size <= dwBufferLength) { + if(pBuffer) + WideCharToMultiByte(CP_ACP, 0, user_agent, -1, pBuffer, size, NULL, NULL); + else + hres = E_INVALIDARG; + } + } + + LeaveCriticalSection(&session_cs); + + /* Tests prove that we have to return E_OUTOFMEMORY on success. */ + return hres; + } case URLMON_OPTION_URL_ENCODING: { DWORD encoding = 0; @@ -528,3 +599,85 @@ return E_INVALIDARG; } + +/************************************************************************** + * UrlMkSetSessionOption (URLMON.@) + */ +HRESULT WINAPI UrlMkSetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBufferLength, + DWORD Reserved) +{ + TRACE("(%x %p %x)\n", dwOption, pBuffer, dwBufferLength); + + switch(dwOption) { + case URLMON_OPTION_USERAGENT: { + LPWSTR new_user_agent; + char *buf = pBuffer; + DWORD len, size; + + if(!pBuffer || !dwBufferLength) + return E_INVALIDARG; + + for(len=0; len<dwBufferLength && buf[len]; len++); + + TRACE("Setting user agent %s\n", debugstr_an(buf, len)); + + size = MultiByteToWideChar(CP_ACP, 0, buf, len, NULL, 0); + new_user_agent = heap_alloc((size+1)*sizeof(WCHAR)); + if(!new_user_agent) + return E_OUTOFMEMORY; + MultiByteToWideChar(CP_ACP, 0, buf, len, new_user_agent, size); + new_user_agent[size] = 0; + + EnterCriticalSection(&session_cs); + + heap_free(user_agent); + user_agent = new_user_agent; + + LeaveCriticalSection(&session_cs); + break; + } + default: + FIXME("Unknown option %x\n", dwOption); + return E_INVALIDARG; + } + + return S_OK; +} + +/************************************************************************** + * ObtainUserAgentString (URLMON.@) + */ +HRESULT WINAPI ObtainUserAgentString(DWORD dwOption, LPSTR pcszUAOut, DWORD *cbSize) +{ + DWORD size; + HRESULT hres = E_FAIL; + + TRACE("(%d %p %p)\n", dwOption, pcszUAOut, cbSize); + + if(!pcszUAOut || !cbSize) + return E_INVALIDARG; + + EnterCriticalSection(&session_cs); + + ensure_useragent(); + if(user_agent) { + size = WideCharToMultiByte(CP_ACP, 0, user_agent, -1, NULL, 0, NULL, NULL); + + if(size <= *cbSize) { + WideCharToMultiByte(CP_ACP, 0, user_agent, -1, pcszUAOut, *cbSize, NULL, NULL); + hres = S_OK; + }else { + hres = E_OUTOFMEMORY; + } + + *cbSize = size; + } + + LeaveCriticalSection(&session_cs); + return hres; +} + +void free_session(void) +{ + heap_free(user_agent); +} Modified: trunk/reactos/dll/win32/urlmon/urlmon.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/urlmon.in…
============================================================================== --- trunk/reactos/dll/win32/urlmon/urlmon.inf [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/urlmon.inf [iso-8859-1] Mon Oct 19 19:22:21 2009 @@ -3,11 +3,11 @@ [RegisterDll] -AddReg=Classes.Reg, Protocols.Reg, ZoneMap.Reg, Zones.Reg +AddReg=Classes.Reg, Protocols.Reg, ZoneMap.Reg, Zones.Reg, Misc.Reg [UnregisterDll] -DelReg=Classes.Reg, Protocols.Reg, ZoneMap.Reg, Zones.Reg +DelReg=Classes.Reg, Protocols.Reg, ZoneMap.Reg, Zones.Reg, Misc.Reg [Classes.Reg] @@ -460,8 +460,15 @@ HKLM,"%ZONES_UNTRUSTED%","1E05",0x10003,0x10000 +[Misc.Reg] +HKCU,"%INTERNET_SETTINGS%","User Agent",,"%USER_AGENT%" + + [Strings] MODULE="urlmon.dll" + +USER_AGENT="Mozilla/4.0 (compatible; MSIE 8.0; Win32)" +INTERNET_SETTINGS="Software\Microsoft\Windows\CurrentVersion\Internet Settings" PATH_ZONEMAP="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap" PATH_ZONEMAP_PROTOCOLS="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\ProtocolDefaults" Modified: trunk/reactos/dll/win32/urlmon/urlmon_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/urlmon_ma…
============================================================================== --- trunk/reactos/dll/win32/urlmon/urlmon_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/urlmon_main.c [iso-8859-1] Mon Oct 19 19:22:21 2009 @@ -121,6 +121,22 @@ heap_free(data); } +static void process_detach(void) +{ + HINTERNET internet_session; + + internet_session = get_internet_session(NULL); + if(internet_session) + InternetCloseHandle(internet_session); + + if (hCabinet) + FreeLibrary(hCabinet); + + init_session(FALSE); + free_session(); + free_tls_list(); +} + /*********************************************************************** * DllMain (URLMON.init) */ @@ -132,16 +148,11 @@ case DLL_PROCESS_ATTACH: URLMON_hInstance = hinstDLL; init_session(TRUE); - break; + break; case DLL_PROCESS_DETACH: - if (hCabinet) - FreeLibrary(hCabinet); - hCabinet = NULL; - init_session(FALSE); - free_tls_list(); - URLMON_hInstance = 0; - break; + process_detach(); + break; case DLL_THREAD_DETACH: detach_thread(); @@ -362,42 +373,6 @@ } /************************************************************************** - * UrlMkSetSessionOption (URLMON.@) - */ -HRESULT WINAPI UrlMkSetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBufferLength, - DWORD Reserved) -{ - FIXME("(%#x, %p, %#x): stub\n", dwOption, pBuffer, dwBufferLength); - - return S_OK; -} - -static const CHAR Agent[] = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"; - -/************************************************************************** - * ObtainUserAgentString (URLMON.@) - */ -HRESULT WINAPI ObtainUserAgentString(DWORD dwOption, LPSTR pcszUAOut, DWORD *cbSize) -{ - FIXME("(%d, %p, %p): stub\n", dwOption, pcszUAOut, cbSize); - - if (pcszUAOut == NULL || cbSize == NULL) - return E_INVALIDARG; - - if (*cbSize < sizeof(Agent)) - { - *cbSize = sizeof(Agent); - return E_OUTOFMEMORY; - } - - if (sizeof(Agent) < *cbSize) - *cbSize = sizeof(Agent); - lstrcpynA(pcszUAOut, Agent, *cbSize); - - return S_OK; -} - -/************************************************************************** * IsValidURL (URLMON.@) * * Determines if a specified string is a valid URL. @@ -418,10 +393,10 @@ HRESULT WINAPI IsValidURL(LPBC pBC, LPCWSTR szURL, DWORD dwReserved) { FIXME("(%p, %s, %d): stub\n", pBC, debugstr_w(szURL), dwReserved); - - if (pBC != NULL || dwReserved != 0) + + if (pBC || dwReserved || !szURL) return E_INVALIDARG; - + return S_OK; } Modified: trunk/reactos/dll/win32/urlmon/urlmon_main.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/urlmon_ma…
============================================================================== --- trunk/reactos/dll/win32/urlmon/urlmon_main.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/urlmon_main.h [iso-8859-1] Mon Oct 19 19:22:21 2009 @@ -63,6 +63,9 @@ IInternetProtocol *get_mime_filter(LPCWSTR); BOOL is_registered_protocol(LPCWSTR); void register_urlmon_namespace(IClassFactory*,REFIID,LPCWSTR,BOOL); +HINTERNET get_internet_session(IInternetBindInfo*); +LPWSTR get_useragent(void); +void free_session(void); HRESULT bind_to_storage(LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv); HRESULT bind_to_object(IMoniker *mon, LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv); @@ -82,7 +85,6 @@ DWORD bindf; BINDINFO bind_info; - HINTERNET internet; HINTERNET request; HINTERNET connection; DWORD flags; @@ -96,7 +98,7 @@ } Protocol; struct ProtocolVtbl { - HRESULT (*open_request)(Protocol*,LPCWSTR,DWORD,IInternetBindInfo*); + HRESULT (*open_request)(Protocol*,LPCWSTR,DWORD,HINTERNET,IInternetBindInfo*); HRESULT (*start_downloading)(Protocol*); void (*close_connection)(Protocol*); }; @@ -148,6 +150,11 @@ static inline void *heap_realloc(void *mem, size_t len) { return HeapReAlloc(GetProcessHeap(), 0, mem, len); +} + +static inline void *heap_realloc_zero(void *mem, size_t len) +{ + return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, len); } static inline BOOL heap_free(void *mem)
15 years, 2 months
1
0
0
0
[tkreuzer] 43610: Comment out uniata.sys
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Oct 19 19:11:44 2009 New Revision: 43610 URL:
http://svn.reactos.org/svn/reactos?rev=43610&view=rev
Log: Comment out uniata.sys Modified: branches/ros-amd64-bringup/reactos/boot/bootdata/txtsetup.sif Modified: branches/ros-amd64-bringup/reactos/boot/bootdata/txtsetup.sif URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] Mon Oct 19 19:11:44 2009 @@ -13,7 +13,7 @@ [SourceDisksFiles] acpi.sys=,,,,,,,,,,,,4 -uniata.sys=,,,,,,x,,,,,,4 +;uniata.sys=,,,,,,x,,,,,,4 buslogic.sys=,,,,,,x,,,,,,4 blue.sys=,,,,,,x,,,,,,4 bootvid.dll=,,,,,,,,,,,,2
15 years, 2 months
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
65
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Results per page:
10
25
50
100
200