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
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
January 2012
----- 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
19 participants
559 discussions
Start a n
N
ew thread
[janderwald] 55147: [USBHUB] - Fix bugs introduced in 55134, 55135 - USB Mass Storage devices should now automatically install again
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Jan 24 17:00:30 2012 New Revision: 55147 URL:
http://svn.reactos.org/svn/reactos?rev=55147&view=rev
Log: [USBHUB] - Fix bugs introduced in 55134, 55135 - USB Mass Storage devices should now automatically install again Modified: branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c Modified: branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c [iso-8859-1] Tue Jan 24 17:00:30 2012 @@ -830,6 +830,8 @@ // // composite device // + ASSERT(DeviceDescriptor->bDeviceSubClass == 0); + ASSERT(DeviceDescriptor->bDeviceProtocol == 0); return TRUE; } @@ -859,6 +861,8 @@ WCHAR Buffer[100]; PHUB_CHILDDEVICE_EXTENSION UsbChildExtension; PUSB_DEVICE_DESCRIPTOR DeviceDescriptor; + PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor; + PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor; // // get child device extension @@ -892,10 +896,26 @@ DeviceDescriptor = &UsbChildExtension->DeviceDesc; // + // get configuration descriptor + // + ConfigurationDescriptor = UsbChildExtension->FullConfigDesc; + + // + // get interface descriptor + // + InterfaceDescriptor = (PUSB_INTERFACE_DESCRIPTOR)(ConfigurationDescriptor + 1); + + // // Construct the CompatibleIds // - if (IsCompositeDevice(DeviceDescriptor, UsbChildExtension->FullConfigDesc)) - { + if (IsCompositeDevice(DeviceDescriptor, ConfigurationDescriptor)) + { + // + // sanity checks + // + ASSERT(DeviceDescriptor->bNumConfigurations == 1); + ASSERT(ConfigurationDescriptor->bNumInterfaces > 1); + Index += swprintf(&BufferPtr[Index], L"USB\\DevClass_%02x&SubClass_%02x&Prot_%02x", DeviceDescriptor->bDeviceClass, DeviceDescriptor->bDeviceSubClass, DeviceDescriptor->bDeviceProtocol) + 1; @@ -910,15 +930,42 @@ } else { - Index += swprintf(&BufferPtr[Index], + // + // sanity checks for simple usb device + // + ASSERT(ConfigurationDescriptor->bNumInterfaces == 1); + + // + // FIXME: support multiple configurations + // + ASSERT(DeviceDescriptor->bNumConfigurations == 1); + + if (DeviceDescriptor->bDeviceClass == 0) + { + Index += swprintf(&BufferPtr[Index], + L"USB\\Class_%02x&SubClass_%02x&Prot_%02x", + InterfaceDescriptor->bInterfaceClass, InterfaceDescriptor->bInterfaceSubClass, InterfaceDescriptor->bInterfaceProtocol) + 1; + Index += swprintf(&BufferPtr[Index], + L"USB\\Class_%02x&SubClass_%02x", + InterfaceDescriptor->bInterfaceClass, InterfaceDescriptor->bInterfaceSubClass) + 1; + Index += swprintf(&BufferPtr[Index], + L"USB\\Class_%02x", + InterfaceDescriptor->bInterfaceClass) + 1; + } + else + { + Index += swprintf(&BufferPtr[Index], L"USB\\Class_%02x&SubClass_%02x&Prot_%02x", DeviceDescriptor->bDeviceClass, DeviceDescriptor->bDeviceSubClass, DeviceDescriptor->bDeviceProtocol) + 1; - Index += swprintf(&BufferPtr[Index], + Index += swprintf(&BufferPtr[Index], L"USB\\Class_%02x&SubClass_%02x", DeviceDescriptor->bDeviceClass, DeviceDescriptor->bDeviceSubClass) + 1; - Index += swprintf(&BufferPtr[Index], + Index += swprintf(&BufferPtr[Index], L"USB\\Class_%02x", DeviceDescriptor->bDeviceClass) + 1; + + + } } BufferPtr[Index] = UNICODE_NULL;
12 years, 11 months
1
0
0
0
[akhaldi] 55146: [DDK] * Update classpnp.h annotations.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jan 24 14:10:25 2012 New Revision: 55146 URL:
http://svn.reactos.org/svn/reactos?rev=55146&view=rev
Log: [DDK] * Update classpnp.h annotations. Modified: trunk/reactos/include/ddk/classpnp.h Modified: trunk/reactos/include/ddk/classpnp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/classpnp.h?rev…
============================================================================== --- trunk/reactos/include/ddk/classpnp.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/classpnp.h [iso-8859-1] Tue Jan 24 14:10:25 2012 @@ -129,8 +129,6 @@ #define MEDIA_CHANGE_DEFAULT_TIME 1 #define MEDIA_CHANGE_TIMEOUT_TIME 300 -#define MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS 0x3b9aca00 - #ifdef ALLOCATE_SRB_FROM_POOL #define ClasspAllocateSrb(ext) \ @@ -186,6 +184,8 @@ #define GUID_CLASSPNP_WORKING_SET {0x105701b0, 0x9e9b, 0x47cb, {0x97, 0x80, 0x81, 0x19, 0x8a, 0xf7, 0xb5, 0x24}} #define DEFAULT_FAILURE_PREDICTION_PERIOD 60 * 60 * 1 + +#define MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS (0x3b9aca00) static inline ULONG CountOfSetBitsUChar(UCHAR _X) { ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; } @@ -286,139 +286,161 @@ ULONG_PTR Data; } CLASSPNP_SCAN_FOR_SPECIAL_INFO, *PCLASSPNP_SCAN_FOR_SPECIAL_INFO; +_IRQL_requires_max_(DISPATCH_LEVEL) typedef VOID (NTAPI *PCLASS_ERROR)( - PDEVICE_OBJECT DeviceObject, - PSCSI_REQUEST_BLOCK Srb, - NTSTATUS *Status, - BOOLEAN *Retry); - + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PSCSI_REQUEST_BLOCK Srb, + _Out_ NTSTATUS *Status, + _Inout_ BOOLEAN *Retry); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_ADD_DEVICE)( - PDRIVER_OBJECT DriverObject, - PDEVICE_OBJECT Pdo); + _In_ PDRIVER_OBJECT DriverObject, + _In_ PDEVICE_OBJECT Pdo); typedef NTSTATUS (NTAPI *PCLASS_POWER_DEVICE)( - PDEVICE_OBJECT DeviceObject, - PIRP Irp); - + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PIRP Irp); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_START_DEVICE)( - PDEVICE_OBJECT DeviceObject); - + _In_ PDEVICE_OBJECT DeviceObject); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_STOP_DEVICE)( - PDEVICE_OBJECT DeviceObject, - UCHAR Type); - + _In_ PDEVICE_OBJECT DeviceObject, + _In_ UCHAR Type); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_INIT_DEVICE)( - PDEVICE_OBJECT DeviceObject); - + _In_ PDEVICE_OBJECT DeviceObject); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_ENUM_DEVICE)( - PDEVICE_OBJECT DeviceObject); - + _In_ PDEVICE_OBJECT DeviceObject); + +_IRQL_requires_max_(DISPATCH_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_READ_WRITE)( - PDEVICE_OBJECT DeviceObject, - PIRP Irp); - + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PIRP Irp); + +_IRQL_requires_max_(DISPATCH_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_DEVICE_CONTROL)( - PDEVICE_OBJECT DeviceObject, - PIRP Irp); - + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PIRP Irp); + +_IRQL_requires_max_(DISPATCH_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_SHUTDOWN_FLUSH)( - PDEVICE_OBJECT DeviceObject, - PIRP Irp); - + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PIRP Irp); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_CREATE_CLOSE)( - PDEVICE_OBJECT DeviceObject, - PIRP Irp); - + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PIRP Irp); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_QUERY_ID)( - PDEVICE_OBJECT DeviceObject, - BUS_QUERY_ID_TYPE IdType, - PUNICODE_STRING IdString); - + _In_ PDEVICE_OBJECT DeviceObject, + _In_ BUS_QUERY_ID_TYPE IdType, + _In_ PUNICODE_STRING IdString); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_REMOVE_DEVICE)( - PDEVICE_OBJECT DeviceObject, - UCHAR Type); - + _In_ PDEVICE_OBJECT DeviceObject, + _In_ UCHAR Type); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef VOID (NTAPI *PCLASS_UNLOAD)( - PDRIVER_OBJECT DriverObject); - + _In_ PDRIVER_OBJECT DriverObject); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_QUERY_PNP_CAPABILITIES)( - PDEVICE_OBJECT PhysicalDeviceObject, - PDEVICE_CAPABILITIES Capabilities); - + _In_ PDEVICE_OBJECT PhysicalDeviceObject, + _In_ PDEVICE_CAPABILITIES Capabilities); + +_IRQL_requires_(DISPATCH_LEVEL) typedef VOID (NTAPI *PCLASS_TICK)( - PDEVICE_OBJECT DeviceObject); - + _In_ PDEVICE_OBJECT DeviceObject); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_QUERY_WMI_REGINFO_EX)( - PDEVICE_OBJECT DeviceObject, - ULONG *RegFlags, - PUNICODE_STRING Name, - PUNICODE_STRING MofResourceName); - + _In_ PDEVICE_OBJECT DeviceObject, + _Out_ ULONG *RegFlags, + _Out_ PUNICODE_STRING Name, + _Out_ PUNICODE_STRING MofResourceName); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_QUERY_WMI_REGINFO)( - PDEVICE_OBJECT DeviceObject, - ULONG *RegFlags, - PUNICODE_STRING Name); - + _In_ PDEVICE_OBJECT DeviceObject, + _Out_ ULONG *RegFlags, + _Out_ PUNICODE_STRING Name); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_QUERY_WMI_DATABLOCK)( - PDEVICE_OBJECT DeviceObject, - PIRP Irp, - ULONG GuidIndex, - ULONG BufferAvail, - PUCHAR Buffer); - + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PIRP Irp, + _In_ ULONG GuidIndex, + _In_ ULONG BufferAvail, + _Out_writes_bytes_(BufferAvail) PUCHAR Buffer); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_SET_WMI_DATABLOCK)( - PDEVICE_OBJECT DeviceObject, - PIRP Irp, - ULONG GuidIndex, - ULONG BufferSize, - PUCHAR Buffer); - + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PIRP Irp, + _In_ ULONG GuidIndex, + _In_ ULONG BufferSize, + _In_reads_bytes_(BufferSize) PUCHAR Buffer); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_SET_WMI_DATAITEM)( - PDEVICE_OBJECT DeviceObject, - PIRP Irp, - ULONG GuidIndex, - ULONG DataItemId, - ULONG BufferSize, - PUCHAR Buffer); - + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PIRP Irp, + _In_ ULONG GuidIndex, + _In_ ULONG DataItemId, + _In_ ULONG BufferSize, + _In_reads_bytes_(BufferSize) PUCHAR Buffer); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_EXECUTE_WMI_METHOD)( - PDEVICE_OBJECT DeviceObject, - PIRP Irp, - ULONG GuidIndex, - ULONG MethodId, - ULONG InBufferSize, - ULONG OutBufferSize, - PUCHAR Buffer); - + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PIRP Irp, + _In_ ULONG GuidIndex, + _In_ ULONG MethodId, + _In_ ULONG InBufferSize, + _In_ ULONG OutBufferSize, + _In_reads_(_Inexpressible_(max(InBufferSize, OutBufferSize))) PUCHAR Buffer); + +_IRQL_requires_max_(PASSIVE_LEVEL) typedef NTSTATUS (NTAPI *PCLASS_WMI_FUNCTION_CONTROL)( - PDEVICE_OBJECT DeviceObject, - PIRP Irp, - ULONG GuidIndex, - CLASSENABLEDISABLEFUNCTION Function, - BOOLEAN Enable); + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PIRP Irp, + _In_ ULONG GuidIndex, + _In_ CLASSENABLEDISABLEFUNCTION Function, + _In_ BOOLEAN Enable); typedef struct _SRB_HISTORY_ITEM { LARGE_INTEGER TickCountSent; @@ -431,27 +453,32 @@ typedef struct _SRB_HISTORY { ULONG_PTR ClassDriverUse[4]; - ULONG TotalHistoryCount; - ULONG UsedHistoryCount; - SRB_HISTORY_ITEM History[1]; + _Field_range_(1,30000) ULONG TotalHistoryCount; + _Field_range_(0,TotalHistoryCount) ULONG UsedHistoryCount; + _Field_size_part_(TotalHistoryCount, UsedHistoryCount) SRB_HISTORY_ITEM History[1]; } SRB_HISTORY, *PSRB_HISTORY; +_IRQL_requires_max_(DISPATCH_LEVEL) typedef BOOLEAN (NTAPI *PCLASS_INTERPRET_SENSE_INFO)( - PDEVICE_OBJECT Fdo, - PIRP OriginalRequest, - PSCSI_REQUEST_BLOCK Srb, - UCHAR MajorFunctionCode, - ULONG IoDeviceCode, - ULONG PreviousRetryCount, - SRB_HISTORY *RequestHistory, - NTSTATUS *Status, - LONGLONG *RetryIn100nsUnits); - + _In_ PDEVICE_OBJECT Fdo, + _In_opt_ PIRP OriginalRequest, + _In_ PSCSI_REQUEST_BLOCK Srb, + _In_ UCHAR MajorFunctionCode, + _In_ ULONG IoDeviceCode, + _In_ ULONG PreviousRetryCount, + _In_opt_ SRB_HISTORY *RequestHistory, + _Out_ NTSTATUS *Status, + _Out_ _Deref_out_range_(0,MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS) + LONGLONG *RetryIn100nsUnits); + +_IRQL_requires_max_(DISPATCH_LEVEL) +_At_(RequestHistory->UsedHistoryCount, _Pre_equal_to_(RequestHistory->TotalHistoryCount) + _Out_range_(0, RequestHistory->TotalHistoryCount - 1)) typedef VOID (NTAPI *PCLASS_COMPRESS_RETRY_HISTORY_DATA)( - PDEVICE_OBJECT DeviceObject, - PSRB_HISTORY RequestHistory); + _In_ PDEVICE_OBJECT DeviceObject, + _Inout_ PSRB_HISTORY RequestHistory); typedef struct { GUID Guid; @@ -509,16 +536,17 @@ } FILE_OBJECT_EXTENSION, *PFILE_OBJECT_EXTENSION; typedef struct _CLASS_WORKING_SET { - ULONG Size; - ULONG XferPacketsWorkingSetMaximum; - ULONG XferPacketsWorkingSetMinimum; + _Field_range_(sizeof(CLASS_WORKING_SET),sizeof(CLASS_WORKING_SET)) ULONG Size; + _Field_range_(0,2048) ULONG XferPacketsWorkingSetMaximum; + _Field_range_(0,2048) ULONG XferPacketsWorkingSetMinimum; } CLASS_WORKING_SET, *PCLASS_WORKING_SET; typedef struct _CLASS_INTERPRET_SENSE_INFO2 { - ULONG Size; - ULONG HistoryCount; - PCLASS_COMPRESS_RETRY_HISTORY_DATA Compress; - PCLASS_INTERPRET_SENSE_INFO Interpret; + _Field_range_(sizeof(CLASS_INTERPRET_SENSE_INFO),sizeof(CLASS_INTERPRET_SENSE_INFO)) + ULONG Size; + _Field_range_(1,30000) ULONG HistoryCount; + __callback PCLASS_COMPRESS_RETRY_HISTORY_DATA Compress; + __callback PCLASS_INTERPRET_SENSE_INFO Interpret; } CLASS_INTERPRET_SENSE_INFO2, *PCLASS_INTERPRET_SENSE_INFO2; C_ASSERT((MAXULONG - sizeof(SRB_HISTORY)) / 30000 >= sizeof(SRB_HISTORY_ITEM)); @@ -642,18 +670,20 @@ SCSI_REQUEST_BLOCK Srb; } COMPLETION_CONTEXT, *PCOMPLETION_CONTEXT; +_IRQL_requires_max_(PASSIVE_LEVEL) +_Must_inspect_result_ SCSIPORTAPI ULONG NTAPI ClassInitialize( - PVOID Argument1, - PVOID Argument2, - PCLASS_INIT_DATA InitializationData); + _In_ PVOID Argument1, + _In_ PVOID Argument2, + _In_ PCLASS_INIT_DATA InitializationData); typedef struct _CLASS_QUERY_WMI_REGINFO_EX_LIST { ULONG Size; - PCLASS_QUERY_WMI_REGINFO_EX ClassFdoQueryWmiRegInfoEx; - PCLASS_QUERY_WMI_REGINFO_EX ClassPdoQueryWmiRegInfoEx; + __callback PCLASS_QUERY_WMI_REGINFO_EX ClassFdoQueryWmiRegInfoEx; + __callback PCLASS_QUERY_WMI_REGINFO_EX ClassPdoQueryWmiRegInfoEx; } CLASS_QUERY_WMI_REGINFO_EX_LIST, *PCLASS_QUERY_WMI_REGINFO_EX_LIST; typedef struct _FUNCTIONAL_DEVICE_EXTENSION { @@ -738,50 +768,57 @@ } FUNCTIONAL_DEVICE_EXTENSION, *PFUNCTIONAL_DEVICE_EXTENSION; +_IRQL_requires_max_(PASSIVE_LEVEL) +_Must_inspect_result_ SCSIPORTAPI ULONG NTAPI ClassInitializeEx( - PDRIVER_OBJECT DriverObject, - LPGUID Guid, - PVOID Data); - + _In_ PDRIVER_OBJECT DriverObject, + _In_ LPGUID Guid, + _In_ PVOID Data); + +_IRQL_requires_max_(PASSIVE_LEVEL) +_Must_inspect_result_ +_Post_satisfies_(return <= 0) SCSIPORTAPI NTSTATUS NTAPI ClassCreateDeviceObject( - PDRIVER_OBJECT DriverObject, - PCCHAR ObjectNameBuffer, - PDEVICE_OBJECT LowerDeviceObject, - BOOLEAN IsFdo, - PDEVICE_OBJECT *DeviceObject); - + _In_ PDRIVER_OBJECT DriverObject, + _In_z_ PCCHAR ObjectNameBuffer, + _In_ PDEVICE_OBJECT LowerDeviceObject, + _In_ BOOLEAN IsFdo, + _Outptr_result_nullonfailure_ _At_(*DeviceObject, __drv_allocatesMem(Mem) __drv_aliasesMem) + PDEVICE_OBJECT *DeviceObject); + +_Must_inspect_result_ SCSIPORTAPI NTSTATUS NTAPI ClassReadDriveCapacity( - PDEVICE_OBJECT DeviceObject); + _In_ PDEVICE_OBJECT DeviceObject); SCSIPORTAPI VOID NTAPI ClassReleaseQueue( - PDEVICE_OBJECT DeviceObject); + _In_ PDEVICE_OBJECT DeviceObject); SCSIPORTAPI VOID NTAPI ClassSplitRequest( - PDEVICE_OBJECT DeviceObject, - PIRP Irp, - ULONG MaximumBytes); + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PIRP Irp, + _In_ ULONG MaximumBytes); SCSIPORTAPI NTSTATUS NTAPI ClassDeviceControl( - PDEVICE_OBJECT DeviceObject, - PIRP Irp); + _In_ PDEVICE_OBJECT DeviceObject, + _Inout_ PIRP Irp); SCSIPORTAPI NTSTATUS @@ -803,281 +840,299 @@ BOOLEAN NTAPI ClassInterpretSenseInfo( - PDEVICE_OBJECT DeviceObject, - PSCSI_REQUEST_BLOCK Srb, - UCHAR MajorFunctionCode, - ULONG IoDeviceCode, - ULONG RetryCount, - NTSTATUS *Status, - ULONG *RetryInterval); + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PSCSI_REQUEST_BLOCK Srb, + _In_ UCHAR MajorFunctionCode, + _In_ ULONG IoDeviceCode, + _In_ ULONG RetryCount, + _Out_ NTSTATUS *Status, + _Out_opt_ _Deref_out_range_(0,100) ULONG *RetryInterval); VOID NTAPI ClassSendDeviceIoControlSynchronous( - ULONG IoControlCode, - PDEVICE_OBJECT TargetDeviceObject, - PVOID Buffer, - ULONG InputBufferLength, - ULONG OutputBufferLength, - BOOLEAN InternalDeviceIoControl, - PIO_STATUS_BLOCK IoStatus); + _In_ ULONG IoControlCode, + _In_ PDEVICE_OBJECT TargetDeviceObject, + _Inout_updates_opt_(_Inexpressible_(max(InputBufferLength, OutputBufferLength))) + PVOID Buffer, + _In_ ULONG InputBufferLength, + _In_ ULONG OutputBufferLength, + _In_ BOOLEAN InternalDeviceIoControl, + _Out_ PIO_STATUS_BLOCK IoStatus); SCSIPORTAPI NTSTATUS NTAPI ClassSendIrpSynchronous( - PDEVICE_OBJECT TargetDeviceObject, - PIRP Irp); + _In_ PDEVICE_OBJECT TargetDeviceObject, + _In_ PIRP Irp); SCSIPORTAPI NTSTATUS NTAPI ClassForwardIrpSynchronous( - PCOMMON_DEVICE_EXTENSION CommonExtension, - PIRP Irp); + _In_ PCOMMON_DEVICE_EXTENSION CommonExtension, + _In_ PIRP Irp); SCSIPORTAPI NTSTATUS NTAPI ClassSendSrbSynchronous( - PDEVICE_OBJECT DeviceObject, - PSCSI_REQUEST_BLOCK Srb, - PVOID BufferAddress, - ULONG BufferLength, - BOOLEAN WriteToDevice); + _In_ PDEVICE_OBJECT DeviceObject, + _Inout_ PSCSI_REQUEST_BLOCK Srb, + _In_reads_bytes_opt_(BufferLength) PVOID BufferAddress, + _In_ ULONG BufferLength, + _In_ BOOLEAN WriteToDevice); SCSIPORTAPI NTSTATUS NTAPI ClassSendSrbAsynchronous( - PDEVICE_OBJECT DeviceObject, - PSCSI_REQUEST_BLOCK Srb, - PIRP Irp, - PVOID BufferAddress, - ULONG BufferLength, - BOOLEAN WriteToDevice); + _In_ PDEVICE_OBJECT DeviceObject, + _Inout_ PSCSI_REQUEST_BLOCK Srb, + _In_ PIRP Irp, + _In_reads_bytes_opt_(BufferLength) __drv_aliasesMem PVOID BufferAddress, + _In_ ULONG BufferLength, + _In_ BOOLEAN WriteToDevice); SCSIPORTAPI NTSTATUS NTAPI ClassBuildRequest( + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PIRP Irp); + +SCSIPORTAPI +ULONG +NTAPI +ClassModeSense( + _In_ PDEVICE_OBJECT DeviceObject, + _In_reads_bytes_(Length) PCHAR ModeSenseBuffer, + _In_ ULONG Length, + _In_ UCHAR PageMode); + +SCSIPORTAPI +PVOID +NTAPI +ClassFindModePage( + _In_reads_bytes_(Length) PCHAR ModeSenseBuffer, + _In_ ULONG Length, + _In_ UCHAR PageMode, + _In_ BOOLEAN Use6Byte); + +_IRQL_requires_max_(PASSIVE_LEVEL) +SCSIPORTAPI +NTSTATUS +NTAPI +ClassClaimDevice( + _In_ PDEVICE_OBJECT LowerDeviceObject, + _In_ BOOLEAN Release); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassInternalIoControl( PDEVICE_OBJECT DeviceObject, PIRP Irp); +_IRQL_requires_max_(PASSIVE_LEVEL) +SCSIPORTAPI +VOID +NTAPI +ClassInitializeSrbLookasideList( + _Inout_ PCOMMON_DEVICE_EXTENSION CommonExtension, + _In_ ULONG NumberElements); + +_IRQL_requires_max_(PASSIVE_LEVEL) +SCSIPORTAPI +VOID +NTAPI +ClassDeleteSrbLookasideList( + _Inout_ PCOMMON_DEVICE_EXTENSION CommonExtension); + +_IRQL_requires_max_(PASSIVE_LEVEL) SCSIPORTAPI ULONG NTAPI -ClassModeSense( - PDEVICE_OBJECT DeviceObject, - PCHAR ModeSenseBuffer, - ULONG Length, - UCHAR PageMode); - -SCSIPORTAPI -PVOID -NTAPI -ClassFindModePage( - PCHAR ModeSenseBuffer, - ULONG Length, - UCHAR PageMode, - BOOLEAN Use6Byte); - -SCSIPORTAPI -NTSTATUS -NTAPI -ClassClaimDevice( - PDEVICE_OBJECT LowerDeviceObject, - BOOLEAN Release); - -SCSIPORTAPI -NTSTATUS -NTAPI -ClassInternalIoControl ( - PDEVICE_OBJECT DeviceObject, - PIRP Irp); - -SCSIPORTAPI -VOID -NTAPI -ClassInitializeSrbLookasideList( - PCOMMON_DEVICE_EXTENSION CommonExtension, - ULONG NumberElements); - -SCSIPORTAPI -VOID -NTAPI -ClassDeleteSrbLookasideList( - PCOMMON_DEVICE_EXTENSION CommonExtension); +ClassQueryTimeOutRegistryValue( + _In_ PDEVICE_OBJECT DeviceObject); + +_IRQL_requires_max_(PASSIVE_LEVEL) +SCSIPORTAPI +NTSTATUS +NTAPI +ClassGetDescriptor( + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PSTORAGE_PROPERTY_ID PropertyId, + _Outptr_ PSTORAGE_DESCRIPTOR_HEADER *Descriptor); + +_IRQL_requires_max_(PASSIVE_LEVEL) +SCSIPORTAPI +VOID +NTAPI +ClassInvalidateBusRelations( + _In_ PDEVICE_OBJECT Fdo); + +_IRQL_requires_max_(PASSIVE_LEVEL) +SCSIPORTAPI +VOID +NTAPI +ClassMarkChildrenMissing( + _In_ PFUNCTIONAL_DEVICE_EXTENSION Fdo); + +_IRQL_requires_max_(PASSIVE_LEVEL) +SCSIPORTAPI +BOOLEAN +NTAPI +ClassMarkChildMissing( + _In_ PPHYSICAL_DEVICE_EXTENSION PdoExtension, + _In_ BOOLEAN AcquireChildLock); + +SCSIPORTAPI +VOID +ClassDebugPrint( + _In_ CLASS_DEBUG_LEVEL DebugPrintLevel, + _In_z_ PCCHAR DebugMessage, + ...); + +__drv_aliasesMem +_IRQL_requires_max_(DISPATCH_LEVEL) +SCSIPORTAPI +PCLASS_DRIVER_EXTENSION +NTAPI +ClassGetDriverExtension( + _In_ PDRIVER_OBJECT DriverObject); + +SCSIPORTAPI +VOID +NTAPI +ClassCompleteRequest( + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PIRP Irp, + _In_ CCHAR PriorityBoost); + +SCSIPORTAPI +VOID +NTAPI +ClassReleaseRemoveLock( + _In_ PDEVICE_OBJECT DeviceObject, + PIRP Tag); SCSIPORTAPI ULONG NTAPI -ClassQueryTimeOutRegistryValue( - PDEVICE_OBJECT DeviceObject); - -SCSIPORTAPI -NTSTATUS -NTAPI -ClassGetDescriptor( - PDEVICE_OBJECT DeviceObject, - PSTORAGE_PROPERTY_ID PropertyId, - PSTORAGE_DESCRIPTOR_HEADER *Descriptor); - -SCSIPORTAPI -VOID -NTAPI -ClassInvalidateBusRelations( - PDEVICE_OBJECT Fdo); - -SCSIPORTAPI -VOID -NTAPI -ClassMarkChildrenMissing( - PFUNCTIONAL_DEVICE_EXTENSION Fdo); - -SCSIPORTAPI -BOOLEAN -NTAPI -ClassMarkChildMissing( - PPHYSICAL_DEVICE_EXTENSION PdoExtension, - BOOLEAN AcquireChildLock); - -SCSIPORTAPI -VOID -ClassDebugPrint( - CLASS_DEBUG_LEVEL DebugPrintLevel, - PCCHAR DebugMessage, - ...); - -SCSIPORTAPI -PCLASS_DRIVER_EXTENSION -NTAPI -ClassGetDriverExtension( - PDRIVER_OBJECT DriverObject); - -SCSIPORTAPI -VOID -NTAPI -ClassCompleteRequest( - PDEVICE_OBJECT DeviceObject, - PIRP Irp, - CCHAR PriorityBoost); - -SCSIPORTAPI -VOID -NTAPI -ClassReleaseRemoveLock( - PDEVICE_OBJECT DeviceObject, - PIRP Tag); - -SCSIPORTAPI -ULONG -NTAPI ClassAcquireRemoveLockEx( - PDEVICE_OBJECT DeviceObject, + _In_ PDEVICE_OBJECT DeviceObject, PVOID Tag, - PCSTR File, - ULONG Line); - + _In_ PCSTR File, + _In_ ULONG Line); + +_IRQL_requires_max_(PASSIVE_LEVEL) SCSIPORTAPI VOID NTAPI ClassUpdateInformationInRegistry( - PDEVICE_OBJECT Fdo, - PCHAR DeviceName, - ULONG DeviceNumber, - PINQUIRYDATA InquiryData, - ULONG InquiryDataLength); + _In_ PDEVICE_OBJECT Fdo, + _In_ PCHAR DeviceName, + _In_ ULONG DeviceNumber, + _In_reads_bytes_opt_(InquiryDataLength) PINQUIRYDATA InquiryData, + _In_ ULONG InquiryDataLength); SCSIPORTAPI NTSTATUS NTAPI ClassWmiCompleteRequest( - PDEVICE_OBJECT DeviceObject, - PIRP Irp, - NTSTATUS Status, - ULONG BufferUsed, - CCHAR PriorityBoost); - + _In_ PDEVICE_OBJECT DeviceObject, + _Inout_ PIRP Irp, + _In_ NTSTATUS Status, + _In_ ULONG BufferUsed, + _In_ CCHAR PriorityBoost); + +_IRQL_requires_max_(DISPATCH_LEVEL) SCSIPORTAPI NTSTATUS NTAPI ClassWmiFireEvent( - PDEVICE_OBJECT DeviceObject, - LPGUID Guid, - ULONG InstanceIndex, - ULONG EventDataSize, - PVOID EventData); + _In_ PDEVICE_OBJECT DeviceObject, + _In_ LPGUID Guid, + _In_ ULONG InstanceIndex, + _In_ ULONG EventDataSize, + _In_reads_bytes_(EventDataSize) PVOID EventData); SCSIPORTAPI VOID NTAPI ClassResetMediaChangeTimer( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); - + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); + +_IRQL_requires_max_(PASSIVE_LEVEL) SCSIPORTAPI VOID NTAPI ClassInitializeMediaChangeDetection( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, - PUCHAR EventPrefix); - + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + _In_ PUCHAR EventPrefix); + +_IRQL_requires_max_(PASSIVE_LEVEL) SCSIPORTAPI NTSTATUS NTAPI ClassInitializeTestUnitPolling( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, - BOOLEAN AllowDriveToSleep); + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + _In_ BOOLEAN AllowDriveToSleep); SCSIPORTAPI PVPB NTAPI ClassGetVpb( - PDEVICE_OBJECT DeviceObject); + _In_ PDEVICE_OBJECT DeviceObject); SCSIPORTAPI NTSTATUS NTAPI ClassSpinDownPowerHandler( - PDEVICE_OBJECT DeviceObject, - PIRP Irp); + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PIRP Irp); NTSTATUS NTAPI ClassStopUnitPowerHandler( - PDEVICE_OBJECT DeviceObject, - PIRP Irp); - + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PIRP Irp); + +_IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS NTAPI ClassSetFailurePredictionPoll( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, - FAILURE_PREDICTION_METHOD FailurePredictionMethod, - ULONG PollingPeriod); - + _Inout_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + _In_ FAILURE_PREDICTION_METHOD FailurePredictionMethod, + _In_ ULONG PollingPeriod); + +_IRQL_requires_max_(DISPATCH_LEVEL) VOID NTAPI ClassNotifyFailurePredicted( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, - PUCHAR Buffer, - ULONG BufferSize, - BOOLEAN LogError, - ULONG UniqueErrorValue, - UCHAR PathId, - UCHAR TargetId, - UCHAR Lun); - + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + _In_reads_bytes_(BufferSize) PUCHAR Buffer, + _In_ ULONG BufferSize, + _In_ BOOLEAN LogError, + _In_ ULONG UniqueErrorValue, + _In_ UCHAR PathId, + _In_ UCHAR TargetId, + _In_ UCHAR Lun); + +_IRQL_requires_max_(PASSIVE_LEVEL) SCSIPORTAPI VOID NTAPI ClassAcquireChildLock( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); SCSIPORTAPI VOID NTAPI ClassReleaseChildLock( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); NTSTATUS NTAPI @@ -1089,14 +1144,15 @@ VOID NTAPI ClassSendStartUnit( - PDEVICE_OBJECT DeviceObject); - + _In_ PDEVICE_OBJECT DeviceObject); + +_IRQL_requires_max_(PASSIVE_LEVEL) SCSIPORTAPI NTSTATUS NTAPI ClassRemoveDevice( - PDEVICE_OBJECT DeviceObject, - UCHAR RemoveType); + _In_ PDEVICE_OBJECT DeviceObject, + _In_ UCHAR RemoveType); SCSIPORTAPI NTSTATUS @@ -1110,7 +1166,7 @@ VOID NTAPI ClassCheckMediaState( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); SCSIPORTAPI NTSTATUS @@ -1120,71 +1176,79 @@ PIRP Irp, PVOID Context); +_IRQL_requires_max_(PASSIVE_LEVEL) SCSIPORTAPI VOID NTAPI ClassSetMediaChangeState( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, - MEDIA_CHANGE_DETECTION_STATE State, - BOOLEAN Wait); - + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + _In_ MEDIA_CHANGE_DETECTION_STATE State, + _In_ BOOLEAN Wait); + +_IRQL_requires_max_(PASSIVE_LEVEL) SCSIPORTAPI VOID NTAPI ClassEnableMediaChangeDetection( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); - + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); + +_IRQL_requires_max_(PASSIVE_LEVEL) SCSIPORTAPI VOID NTAPI ClassDisableMediaChangeDetection( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); - + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); + +_IRQL_requires_max_(PASSIVE_LEVEL) SCSIPORTAPI VOID NTAPI ClassCleanupMediaChangeDetection( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); - + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); + +_IRQL_requires_max_(PASSIVE_LEVEL) VOID NTAPI ClassGetDeviceParameter( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, - PWSTR SubkeyName, - PWSTR ParameterName, - PULONG ParameterValue); - + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + _In_opt_ PWSTR SubkeyName, + _In_ PWSTR ParameterName, + _Inout_ PULONG ParameterValue); + +_IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS NTAPI ClassSetDeviceParameter( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, - PWSTR SubkeyName, - PWSTR ParameterName, - ULONG ParameterValue); + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + _In_opt_ PWSTR SubkeyName, + _In_ PWSTR ParameterName, + _In_ ULONG ParameterValue); #if (NTDDI_VERSION >= NTDDI_VISTA) +_IRQL_requires_max_(PASSIVE_LEVEL) PFILE_OBJECT_EXTENSION NTAPI ClassGetFsContext( - PCOMMON_DEVICE_EXTENSION CommonExtension, - PFILE_OBJECT FileObject); - + _In_ PCOMMON_DEVICE_EXTENSION CommonExtension, + _In_ PFILE_OBJECT FileObject); + +_IRQL_requires_max_(DISPATCH_LEVEL) VOID NTAPI ClassSendNotification( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, - const GUID *Guid, - ULONG ExtraDataSize, - PVOID ExtraData); + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + _In_ const GUID *Guid, + _In_ ULONG ExtraDataSize, + _In_reads_bytes_opt_(ExtraDataSize) PVOID ExtraData); #endif /* (NTDDI_VERSION >= NTDDI_VISTA) */ static __inline BOOLEAN PORT_ALLOCATED_SENSE( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, - PSCSI_REQUEST_BLOCK Srb) + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + _In_ PSCSI_REQUEST_BLOCK Srb) { return ((BOOLEAN)((TEST_FLAG(Srb->SrbFlags, SRB_FLAGS_PORT_DRIVER_ALLOCSENSE) && TEST_FLAG(Srb->SrbFlags, SRB_FLAGS_FREE_SENSE_BUFFER)) && @@ -1194,8 +1258,8 @@ static __inline VOID FREE_PORT_ALLOCATED_SENSE_BUFFER( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, - PSCSI_REQUEST_BLOCK Srb) + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + _In_ PSCSI_REQUEST_BLOCK Srb) { ASSERT(TEST_FLAG(Srb->SrbFlags, SRB_FLAGS_PORT_DRIVER_ALLOCSENSE)); ASSERT(TEST_FLAG(Srb->SrbFlags, SRB_FLAGS_FREE_SENSE_BUFFER)); @@ -1208,14 +1272,16 @@ return; } +_IRQL_requires_max_(PASSIVE_LEVEL) typedef VOID (NTAPI *PCLASS_SCAN_FOR_SPECIAL_HANDLER)( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, - ULONG_PTR Data); - + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + _In_ ULONG_PTR Data); + +_IRQL_requires_max_(PASSIVE_LEVEL) VOID NTAPI ClassScanForSpecial( - PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, - CLASSPNP_SCAN_FOR_SPECIAL_INFO DeviceList[], - PCLASS_SCAN_FOR_SPECIAL_HANDLER Function); + _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + _In_ CLASSPNP_SCAN_FOR_SPECIAL_INFO DeviceList[], + _In_ PCLASS_SCAN_FOR_SPECIAL_HANDLER Function);
12 years, 11 months
1
0
0
0
[akhaldi] 55145: [MCIAVI32] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jan 24 14:07:33 2012 New Revision: 55145 URL:
http://svn.reactos.org/svn/reactos?rev=55145&view=rev
Log: [MCIAVI32] * Sync to Wine 1.3.37. Modified: trunk/reactos/dll/win32/mciavi32/info.c trunk/reactos/dll/win32/mciavi32/mciavi.c trunk/reactos/dll/win32/mciavi32/mciavi_res.rc trunk/reactos/dll/win32/mciavi32/private_mciavi.h trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/mciavi32/info.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciavi32/info.c?…
============================================================================== --- trunk/reactos/dll/win32/mciavi32/info.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mciavi32/info.c [iso-8859-1] Tue Jan 24 14:07:33 2012 @@ -211,16 +211,11 @@ WARN("Don't know this info command (%u)\n", dwFlags); ret = MCIERR_UNRECOGNIZED_COMMAND; } - if (str) { - if (strlenW(str) + 1 > lpParms->dwRetSize) { - ret = MCIERR_PARAM_OVERFLOW; - } else { - lstrcpynW(lpParms->lpstrReturn, str, lpParms->dwRetSize); - } - } else { - lpParms->lpstrReturn[0] = 0; - } - + if (!ret) { + WCHAR zero = 0; + /* Only mciwave, mciseq and mcicda set dwRetSize (since NT). */ + lstrcpynW(lpParms->lpstrReturn, str ? str : &zero, lpParms->dwRetSize); + } LeaveCriticalSection(&wma->cs); return ret; } Modified: trunk/reactos/dll/win32/mciavi32/mciavi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciavi32/mciavi.…
============================================================================== --- trunk/reactos/dll/win32/mciavi32/mciavi.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mciavi32/mciavi.c [iso-8859-1] Tue Jan 24 14:07:33 2012 @@ -26,11 +26,13 @@ * - synchronization between audio and video (especially for interleaved * files) * - robustness when reading file can be enhanced - * - better move the AVI handling part to avifile DLL and make use of it + * - reimplement the AVI handling part with avifile DLL because + * "open @1122334 type avivideo alias a" expects an AVIFile/Stream + * and MCI_DGV_SET|STATUS_SPEED maps to Rate/Scale * - some files appear to have more than one audio stream (we only play the * first one) * - some files contain an index of audio/video frame. Better use it, - * instead of rebuilding it + * instead of rebuilding it (AVIFile does that already) * - stopping while playing a file with sound blocks until all buffered * audio is played... still should be stopped ASAP */ @@ -256,6 +258,12 @@ wma->lpFileName = HeapAlloc(GetProcessHeap(), 0, (strlenW(lpOpenParms->lpstrElementName) + 1) * sizeof(WCHAR)); strcpyW(wma->lpFileName, lpOpenParms->lpstrElementName); + if (lpOpenParms->lpstrElementName[0] == '@') { + /* The file name @11223344 encodes an AVIFile handle in decimal notation + * in Win3.1 and w2k/NT, but this feature is absent in win95 (KB140750). + * wma->hFile = LongToHandle(strtolW(lpOpenParms->lpstrElementName+1, NULL, 10)); */ + FIXME("Using AVIFile/Stream %s NIY\n", debugstr_w(lpOpenParms->lpstrElementName)); + } wma->hFile = mmioOpenW(lpOpenParms->lpstrElementName, NULL, MMIO_ALLOCBUF | MMIO_DENYWRITE | MMIO_READ); Modified: trunk/reactos/dll/win32/mciavi32/mciavi_res.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciavi32/mciavi_…
============================================================================== --- trunk/reactos/dll/win32/mciavi32/mciavi_res.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mciavi32/mciavi_res.rc [iso-8859-1] Tue Jan 24 14:07:33 2012 @@ -22,9 +22,15 @@ #include "mmddk.h" #include "digitalv.h" +#ifdef MCI_INTEGER64 +#define MCI_DWORD_PTR MCI_INTEGER64 +#else +#define MCI_DWORD_PTR MCI_INTEGER +#endif + MCIAVI RCDATA BEGIN -L"play\0", 0x00000806L, MCI_COMMAND_HEAD, +L"play\0", MCI_PLAY, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -36,8 +42,8 @@ L"fullscreen by 2\0", 0x04000000L, MCI_FLAG, L"fullscreen\0", 0x02000000L, MCI_FLAG, L"\0", 0x00000000L, MCI_END_COMMAND, -L"capability\0", 0x0000080bL, MCI_COMMAND_HEAD, -L"\0", 0x00000002L, MCI_RETURN, +L"capability\0", MCI_GETDEVCAPS, 0, MCI_COMMAND_HEAD, +L"\0", MCI_INTEGER, 0, MCI_RETURN, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -65,23 +71,23 @@ L"can colorkey\0", 0x00004100L, MCI_INTEGER, L"\0", 0x00000000L, MCI_END_CONSTANT, L"\0", 0x00000000L, MCI_END_COMMAND, -L"capture\0", 0x00000870L, MCI_COMMAND_HEAD, +L"capture\0", MCI_CAPTURE, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, L"as\0", 0x00010000L, MCI_STRING, L"at\0", 0x00020000L, MCI_RECT, L"\0", 0x00000000L, MCI_END_COMMAND, -L"close\0", 0x00000804L, MCI_COMMAND_HEAD, -L"notify\0", 0x00000001L, MCI_FLAG, -L"wait\0", 0x00000002L, MCI_FLAG, -L"\0", 0x00000000L, MCI_END_COMMAND, -L"configure\0", 0x0000087aL, MCI_COMMAND_HEAD, -L"notify\0", 0x00000001L, MCI_FLAG, -L"wait\0", 0x00000002L, MCI_FLAG, -L"test\0", 0x00000020L, MCI_FLAG, -L"\0", 0x00000000L, MCI_END_COMMAND, -L"copy\0", 0x00000852L, MCI_COMMAND_HEAD, +L"close\0", MCI_CLOSE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"configure\0", MCI_CONFIGURE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"copy\0", MCI_COPY, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -91,7 +97,7 @@ L"audio stream\0", 0x00020000L, MCI_INTEGER, L"video stream\0", 0x00040000L, MCI_INTEGER, L"\0", 0x00000000L, MCI_END_COMMAND, -L"cue\0", 0x00000830L, MCI_COMMAND_HEAD, +L"cue\0", MCI_CUE, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -100,7 +106,7 @@ L"to\0", 0x00000008L, MCI_INTEGER, L"noshow\0", 0x00040000L, MCI_FLAG, L"\0", 0x00000000L, MCI_END_COMMAND, -L"cut\0", 0x00000851L, MCI_COMMAND_HEAD, +L"cut\0", MCI_CUT, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -110,7 +116,7 @@ L"audio stream\0", 0x00020000L, MCI_INTEGER, L"video stream\0", 0x00040000L, MCI_INTEGER, L"\0", 0x00000000L, MCI_END_COMMAND, -L"delete\0", 0x00000856L, MCI_COMMAND_HEAD, +L"delete\0", MCI_DELETE, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -120,15 +126,15 @@ L"audio stream\0", 0x00020000L, MCI_INTEGER, L"video stream\0", 0x00040000L, MCI_INTEGER, L"\0", 0x00000000L, MCI_END_COMMAND, -L"freeze\0", 0x00000844L, MCI_COMMAND_HEAD, +L"freeze\0", MCI_FREEZE, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, L"at\0", 0x00010000L, MCI_RECT, L"outside\0", 0x00020000L, MCI_FLAG, L"\0", 0x00000000L, MCI_END_COMMAND, -L"info\0", 0x0000080aL, MCI_COMMAND_HEAD, -L"\0", 0x00000001L, MCI_RETURN, +L"info\0", MCI_INFO, 0, MCI_COMMAND_HEAD, +L"\0", MCI_STRING, 0, MCI_RETURN, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -146,8 +152,8 @@ L"video quality\0", 0x00004003L, MCI_INTEGER, L"\0", 0x00000000L, MCI_END_CONSTANT, L"\0", 0x00000000L, MCI_END_COMMAND, -L"list\0", 0x00000878L, MCI_COMMAND_HEAD, -L"\0", 0x00000001L, MCI_RETURN, +L"list\0", MCI_LIST, 0, MCI_COMMAND_HEAD, +L"\0", MCI_STRING, 0, MCI_RETURN, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -166,13 +172,13 @@ L"\0", 0x00000000L, MCI_END_CONSTANT, L"algorithm\0", 0x00080000L, MCI_STRING, L"\0", 0x00000000L, MCI_END_COMMAND, -L"load\0", 0x00000850L, MCI_COMMAND_HEAD, +L"load\0", MCI_LOAD, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, L"\0", 0x00000100L, MCI_STRING, L"\0", 0x00000000L, MCI_END_COMMAND, -L"monitor\0", 0x00000871L, MCI_COMMAND_HEAD, +L"monitor\0", MCI_MONITOR, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -186,8 +192,8 @@ L"direct\0", 0x0000a002L, MCI_INTEGER, L"\0", 0x00000000L, MCI_END_CONSTANT, L"\0", 0x00000000L, MCI_END_COMMAND, -L"open\0", 0x00000803L, MCI_COMMAND_HEAD, -L"\0", 0x00000002L, MCI_RETURN, +L"open\0", MCI_OPEN, 0, MCI_COMMAND_HEAD, +L"\0", MCI_INTEGER, 0, MCI_RETURN, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"type\0", 0x00002000L, MCI_STRING, @@ -199,10 +205,10 @@ L"popup\0", 0x80880000L, MCI_INTEGER, L"child\0", 0x40000000L, MCI_INTEGER, L"\0", 0x00000000L, MCI_END_CONSTANT, -L"parent\0", 0x00020000L, MCI_INTEGER, +L"parent\0", 0x00020000L, MCI_HWND, L"nostatic\0", 0x00040000L, MCI_FLAG, L"\0", 0x00000000L, MCI_END_COMMAND, -L"paste\0", 0x00000853L, MCI_COMMAND_HEAD, +L"paste\0", MCI_PASTE, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -213,12 +219,12 @@ L"audio stream\0", 0x00020000L, MCI_INTEGER, L"video stream\0", 0x00040000L, MCI_INTEGER, L"\0", 0x00000000L, MCI_END_COMMAND, -L"pause\0", 0x00000809L, MCI_COMMAND_HEAD, -L"notify\0", 0x00000001L, MCI_FLAG, -L"wait\0", 0x00000002L, MCI_FLAG, -L"test\0", 0x00000020L, MCI_FLAG, -L"\0", 0x00000000L, MCI_END_COMMAND, -L"put\0", 0x00000842L, MCI_COMMAND_HEAD, +L"pause\0", MCI_PAUSE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"put\0", MCI_PUT, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -230,7 +236,7 @@ L"window\0", 0x00200000L, MCI_FLAG, L"client\0", 0x00400000L, MCI_FLAG, L"\0", 0x00000000L, MCI_END_COMMAND, -L"quality\0", 0x00000877L, MCI_COMMAND_HEAD, +L"quality\0", MCI_QUALITY, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -244,14 +250,14 @@ L"dialog\0", 0x00080000L, MCI_FLAG, L"handle\0", 0x00100000L, MCI_INTEGER, L"\0", 0x00000000L, MCI_END_COMMAND, -L"realize\0", 0x00000840L, MCI_COMMAND_HEAD, +L"realize\0", MCI_REALIZE, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, L"normal\0", 0x00010000L, MCI_FLAG, L"background\0", 0x00020000L, MCI_FLAG, L"\0", 0x00000000L, MCI_END_COMMAND, -L"record\0", 0x0000080fL, MCI_COMMAND_HEAD, +L"record\0", MCI_RECORD, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -264,26 +270,26 @@ L"audio stream\0", 0x00040000L, MCI_INTEGER, L"video stream\0", 0x00080000L, MCI_INTEGER, L"\0", 0x00000000L, MCI_END_COMMAND, -L"reserve\0", 0x00000872L, MCI_COMMAND_HEAD, +L"reserve\0", MCI_RESERVE, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, L"in\0", 0x00010000L, MCI_STRING, L"size\0", 0x00020000L, MCI_INTEGER, L"\0", 0x00000000L, MCI_END_COMMAND, -L"restore\0", 0x0000087bL, MCI_COMMAND_HEAD, +L"restore\0", MCI_RESTORE, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, L"from\0", 0x00010000L, MCI_STRING, L"at\0", 0x00020000L, MCI_RECT, L"\0", 0x00000000L, MCI_END_COMMAND, -L"resume\0", 0x00000855L, MCI_COMMAND_HEAD, -L"notify\0", 0x00000001L, MCI_FLAG, -L"wait\0", 0x00000002L, MCI_FLAG, -L"test\0", 0x00000020L, MCI_FLAG, -L"\0", 0x00000000L, MCI_END_COMMAND, -L"save\0", 0x00000813L, MCI_COMMAND_HEAD, +L"resume\0", MCI_RESUME, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"save\0", MCI_SAVE, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -292,7 +298,7 @@ L"abort\0", 0x00020000L, MCI_FLAG, L"keepreserve\0", 0x00040000L, MCI_FLAG, L"\0", 0x00000000L, MCI_END_COMMAND, -L"seek\0", 0x00000807L, MCI_COMMAND_HEAD, +L"seek\0", MCI_SEEK, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -300,7 +306,7 @@ L"to end\0", 0x00000200L, MCI_FLAG, L"to\0", 0x00000008L, MCI_INTEGER, L"\0", 0x00000000L, MCI_END_COMMAND, -L"set\0", 0x0000080dL, MCI_COMMAND_HEAD, +L"set\0", MCI_SET, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -334,7 +340,7 @@ L"off\0", 0x00004000L, MCI_FLAG, L"speed\0", 0x00020000L, MCI_INTEGER, L"\0", 0x00000000L, MCI_END_COMMAND, -L"setaudio\0", 0x00000873L, MCI_COMMAND_HEAD, +L"setaudio\0", MCI_SETAUDIO, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -367,7 +373,7 @@ L"input\0", 0x02000000L, MCI_FLAG, L"output\0", 0x04000000L, MCI_FLAG, L"\0", 0x00000000L, MCI_END_COMMAND, -L"setvideo\0", 0x00000876L, MCI_COMMAND_HEAD, +L"setvideo\0", MCI_SETVIDEO, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -404,7 +410,7 @@ L"input\0", 0x02000000L, MCI_FLAG, L"output\0", 0x04000000L, MCI_FLAG, L"\0", 0x00000000L, MCI_END_COMMAND, -L"signal\0", 0x00000875L, MCI_COMMAND_HEAD, +L"signal\0", MCI_SIGNAL, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -414,8 +420,8 @@ L"cancel\0", 0x00080000L, MCI_FLAG, L"return position\0", 0x00100000L, MCI_FLAG, L"\0", 0x00000000L, MCI_END_COMMAND, -L"status\0", 0x00000814L, MCI_COMMAND_HEAD, -L"\0", 0x00000002L, MCI_RETURN, +L"status\0", MCI_STATUS, 0, MCI_COMMAND_HEAD, +L"\0", MCI_DWORD_PTR, 0, MCI_RETURN, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -494,40 +500,40 @@ L"disk space\0", 0x00200000L, MCI_STRING, L"reference\0", 0x00040000L, MCI_INTEGER, L"\0", 0x00000000L, MCI_END_COMMAND, -L"step\0", 0x0000080eL, MCI_COMMAND_HEAD, +L"step\0", MCI_STEP, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, L"reverse\0", 0x00010000L, MCI_FLAG, L"by\0", 0x00020000L, MCI_INTEGER, L"\0", 0x00000000L, MCI_END_COMMAND, -L"stop\0", 0x00000808L, MCI_COMMAND_HEAD, +L"stop\0", MCI_STOP, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, L"hold\0", 0x00010000L, MCI_FLAG, L"\0", 0x00000000L, MCI_END_COMMAND, -L"undo\0", 0x00000879L, MCI_COMMAND_HEAD, -L"notify\0", 0x00000001L, MCI_FLAG, -L"wait\0", 0x00000002L, MCI_FLAG, -L"test\0", 0x00000020L, MCI_FLAG, -L"\0", 0x00000000L, MCI_END_COMMAND, -L"unfreeze\0", 0x00000845L, MCI_COMMAND_HEAD, -L"notify\0", 0x00000001L, MCI_FLAG, -L"wait\0", 0x00000002L, MCI_FLAG, -L"test\0", 0x00000020L, MCI_FLAG, -L"at\0", 0x00010000L, MCI_RECT, -L"\0", 0x00000000L, MCI_END_COMMAND, -L"update\0", 0x00000854L, MCI_COMMAND_HEAD, -L"notify\0", 0x00000001L, MCI_FLAG, -L"wait\0", 0x00000002L, MCI_FLAG, -L"test\0", 0x00000020L, MCI_FLAG, -L"at\0", 0x00010000L, MCI_RECT, -L"hdc\0", 0x00020000L, MCI_INTEGER, +L"undo\0", MCI_UNDO, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"unfreeze\0", MCI_UNFREEZE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"at\0", 0x00010000L, MCI_RECT, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"update\0", MCI_UPDATE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"at\0", 0x00010000L, MCI_RECT, +L"hdc\0", 0x00020000L, MCI_HDC, L"paint\0", 0x00040000L, MCI_FLAG, L"\0", 0x00000000L, MCI_END_COMMAND, -L"where\0", 0x00000843L, MCI_COMMAND_HEAD, -L"\0", 0x00000007L, MCI_RETURN, +L"where\0", MCI_WHERE, 0, MCI_COMMAND_HEAD, +L"\0", MCI_RECT, 0, MCI_RETURN, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, @@ -539,12 +545,12 @@ L"max\0", 0x00400000L, MCI_FLAG, L"min\0", 0x00800000L, MCI_FLAG, L"\0", 0x00000000L, MCI_END_COMMAND, -L"window\0", 0x00000841L, MCI_COMMAND_HEAD, +L"window\0", MCI_WINDOW, 0, MCI_COMMAND_HEAD, L"notify\0", 0x00000001L, MCI_FLAG, L"wait\0", 0x00000002L, MCI_FLAG, L"test\0", 0x00000020L, MCI_FLAG, L"handle\0", 0x00010000L, MCI_CONSTANT, -L"default\0", 0x00000000L, MCI_INTEGER, +L"default\0", 0x00000000L, MCI_HWND, L"\0", 0x00000000L, MCI_END_CONSTANT, L"state\0", 0x00040000L, MCI_CONSTANT, L"hide\0", 0x00000000L, MCI_INTEGER, Modified: trunk/reactos/dll/win32/mciavi32/private_mciavi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciavi32/private…
============================================================================== --- trunk/reactos/dll/win32/mciavi32/private_mciavi.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mciavi32/private_mciavi.h [iso-8859-1] Tue Jan 24 14:07:33 2012 @@ -82,32 +82,32 @@ HANDLE ack_event; /* acknowledge that an async command has started */ } WINE_MCIAVI; -extern HINSTANCE MCIAVI_hInstance; +extern HINSTANCE MCIAVI_hInstance DECLSPEC_HIDDEN; /* info.c */ -DWORD MCIAVI_ConvertTimeFormatToFrame(WINE_MCIAVI* wma, DWORD val); -DWORD MCIAVI_mciGetDevCaps(UINT wDevID, DWORD dwFlags, LPMCI_GETDEVCAPS_PARMS lpParms); -DWORD MCIAVI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSW lpParms); -DWORD MCIAVI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParms); -DWORD MCIAVI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMSW lpParms); +DWORD MCIAVI_ConvertTimeFormatToFrame(WINE_MCIAVI* wma, DWORD val) DECLSPEC_HIDDEN; +DWORD MCIAVI_mciGetDevCaps(UINT wDevID, DWORD dwFlags, LPMCI_GETDEVCAPS_PARMS lpParms) DECLSPEC_HIDDEN; +DWORD MCIAVI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSW lpParms) DECLSPEC_HIDDEN; +DWORD MCIAVI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParms) DECLSPEC_HIDDEN; +DWORD MCIAVI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMSW lpParms) DECLSPEC_HIDDEN; /* mmoutput.c */ -BOOL MCIAVI_GetInfo(WINE_MCIAVI* wma); -DWORD MCIAVI_OpenAudio(WINE_MCIAVI* wma, unsigned* nHdr, LPWAVEHDR* pWaveHdr); -BOOL MCIAVI_OpenVideo(WINE_MCIAVI* wma); -void MCIAVI_PlayAudioBlocks(WINE_MCIAVI* wma, unsigned nHdr, LPWAVEHDR waveHdr); -LRESULT MCIAVI_PaintFrame(WINE_MCIAVI* wma, HDC hDC); +BOOL MCIAVI_GetInfo(WINE_MCIAVI* wma) DECLSPEC_HIDDEN; +DWORD MCIAVI_OpenAudio(WINE_MCIAVI* wma, unsigned* nHdr, LPWAVEHDR* pWaveHdr) DECLSPEC_HIDDEN; +BOOL MCIAVI_OpenVideo(WINE_MCIAVI* wma) DECLSPEC_HIDDEN; +void MCIAVI_PlayAudioBlocks(WINE_MCIAVI* wma, unsigned nHdr, LPWAVEHDR waveHdr) DECLSPEC_HIDDEN; +LRESULT MCIAVI_PaintFrame(WINE_MCIAVI* wma, HDC hDC) DECLSPEC_HIDDEN; /* mciavi.c */ -WINE_MCIAVI* MCIAVI_mciGetOpenDev(UINT wDevID); -DWORD MCIAVI_mciClose(UINT, DWORD, LPMCI_GENERIC_PARMS); +WINE_MCIAVI* MCIAVI_mciGetOpenDev(UINT wDevID) DECLSPEC_HIDDEN; +DWORD MCIAVI_mciClose(UINT, DWORD, LPMCI_GENERIC_PARMS) DECLSPEC_HIDDEN; /* wnd.c */ -BOOL MCIAVI_RegisterClass(void); -BOOL MCIAVI_UnregisterClass(void); -BOOL MCIAVI_CreateWindow(WINE_MCIAVI* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARMSW lpOpenParms); -DWORD MCIAVI_mciPut(UINT wDevID, DWORD dwFlags, LPMCI_DGV_PUT_PARMS lpParms); -DWORD MCIAVI_mciWhere(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms); -DWORD MCIAVI_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMSW lpParms); +BOOL MCIAVI_RegisterClass(void) DECLSPEC_HIDDEN; +BOOL MCIAVI_UnregisterClass(void) DECLSPEC_HIDDEN; +BOOL MCIAVI_CreateWindow(WINE_MCIAVI* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARMSW lpOpenParms) DECLSPEC_HIDDEN; +DWORD MCIAVI_mciPut(UINT wDevID, DWORD dwFlags, LPMCI_DGV_PUT_PARMS lpParms) DECLSPEC_HIDDEN; +DWORD MCIAVI_mciWhere(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms) DECLSPEC_HIDDEN; +DWORD MCIAVI_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMSW lpParms) DECLSPEC_HIDDEN; #endif /* __WINE_PRIVATE_MCIAVI_H */ Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Jan 24 14:07:33 2012 @@ -83,7 +83,7 @@ reactos/dll/win32/localui # Autosync reactos/dll/win32/lz32 # Autosync reactos/dll/win32/mapi32 # Autosync -reactos/dll/win32/mciavi32 # Autosync +reactos/dll/win32/mciavi32 # Synced to Wine-1.3.37 reactos/dll/win32/mcicda # Autosync reactos/dll/win32/mciqtz32 # Autosync reactos/dll/win32/mciseq # Autosync
12 years, 11 months
1
0
0
0
[akhaldi] 55144: [IMAADP32.ACM] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jan 24 14:02:18 2012 New Revision: 55144 URL:
http://svn.reactos.org/svn/reactos?rev=55144&view=rev
Log: [IMAADP32.ACM] * Sync to Wine 1.3.37. Modified: trunk/reactos/dll/win32/imaadp32.acm/imaadp32.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/imaadp32.acm/imaadp32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/imaadp32.acm/ima…
============================================================================== --- trunk/reactos/dll/win32/imaadp32.acm/imaadp32.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/imaadp32.acm/imaadp32.c [iso-8859-1] Tue Jan 24 14:02:18 2012 @@ -38,14 +38,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(adpcm); /*********************************************************************** - * ADPCM_drvOpen - */ -static LRESULT ADPCM_drvOpen(LPCSTR str) -{ - return 1; -} - -/*********************************************************************** * ADPCM_drvClose */ static LRESULT ADPCM_drvClose(DWORD_PTR dwDevID) @@ -169,7 +161,7 @@ /*********************************************************************** * R16 * - * Read a 16 bit sample (correctly handles endianess) + * Read a 16 bit sample (correctly handles endianness) */ static inline short R16(const unsigned char* src) { @@ -179,7 +171,7 @@ /*********************************************************************** * W16 * - * Write a 16 bit sample (correctly handles endianess) + * Write a 16 bit sample (correctly handles endianness) */ static inline void W16(unsigned char* dst, short s) { @@ -928,7 +920,7 @@ { case DRV_LOAD: return 1; case DRV_FREE: return 1; - case DRV_OPEN: return ADPCM_drvOpen((LPSTR)dwParam1); + case DRV_OPEN: return 1; case DRV_CLOSE: return ADPCM_drvClose(dwDevID); case DRV_ENABLE: return 1; case DRV_DISABLE: return 1; Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Jan 24 14:02:18 2012 @@ -68,7 +68,7 @@ reactos/dll/win32/httpapi # Synced to Wine-1.3.37 reactos/dll/win32/iccvid # Autosync reactos/dll/win32/icmp # Synced to Wine-0_9_10 -reactos/dll/win32/imaadp32.acm # Autosync +reactos/dll/win32/imaadp32.acm # Synced to Wine-1.3.37 reactos/dll/win32/imm32 # Autosync reactos/dll/win32/imagehlp # Autosync reactos/dll/win32/inetcomm # Autosync
12 years, 11 months
1
0
0
0
[akhaldi] 55143: [PSDK] * Update mmddk.h from Wine.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jan 24 13:55:54 2012 New Revision: 55143 URL:
http://svn.reactos.org/svn/reactos?rev=55143&view=rev
Log: [PSDK] * Update mmddk.h from Wine. Modified: trunk/reactos/include/psdk/mmddk.h Modified: trunk/reactos/include/psdk/mmddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/mmddk.h?rev=5…
============================================================================== --- trunk/reactos/include/psdk/mmddk.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/mmddk.h [iso-8859-1] Tue Jan 24 13:55:54 2012 @@ -380,6 +380,13 @@ #define MCI_RECT 7 #define MCI_CONSTANT 8 #define MCI_END_CONSTANT 9 +#define MCI_HWND 10 +#define MCI_HPAL 11 +#define MCI_HDC 12 + +#ifdef _WIN64 +#define MCI_INTEGER64 13 +#endif /* _WIN64 */ #define MAKEMCIRESOURCE(wRet, wRes) MAKELRESULT((wRet), (wRes))
12 years, 11 months
1
0
0
0
[akhaldi] 55142: [HTTPAPI] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jan 24 13:54:58 2012 New Revision: 55142 URL:
http://svn.reactos.org/svn/reactos?rev=55142&view=rev
Log: [HTTPAPI] * Sync to Wine 1.3.37. Modified: trunk/reactos/dll/win32/httpapi/httpapi.spec trunk/reactos/dll/win32/httpapi/httpapi_main.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/httpapi/httpapi.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/httpapi/httpapi.…
============================================================================== --- trunk/reactos/dll/win32/httpapi/httpapi.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/httpapi/httpapi.spec [iso-8859-1] Tue Jan 24 13:54:58 2012 @@ -5,7 +5,7 @@ @ stub HttpCreateAppPool @ stub HttpCreateConfigGroup @ stub HttpCreateFilter -@ stub HttpCreateHttpHandle +@ stdcall HttpCreateHttpHandle(ptr long) @ stub HttpDeleteConfigGroup @ stdcall HttpDeleteServiceConfiguration(ptr long ptr long ptr) @ stub HttpFilterAccept Modified: trunk/reactos/dll/win32/httpapi/httpapi_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/httpapi/httpapi_…
============================================================================== --- trunk/reactos/dll/win32/httpapi/httpapi_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/httpapi/httpapi_main.c [iso-8859-1] Tue Jan 24 13:54:58 2012 @@ -157,3 +157,22 @@ FIXME( "(%p, %d, %p, %d, %p): stub!\n", handle, type, config, length, overlapped ); return NO_ERROR; } + +/*********************************************************************** + * HttpCreateHttpHandle (HTTPAPI.@) + * + * Creates a handle to the HTTP request queue + * + * PARAMS + * handle [O] handle to request queue + * reserved [I] reserved, must be NULL + * + * RETURNS + * NO_ERROR if function succeeds, or error code if function fails + * + */ +ULONG WINAPI HttpCreateHttpHandle( PHANDLE handle, ULONG reserved ) +{ + FIXME( "(%p, %d): stub!\n", handle, reserved); + return ERROR_CALL_NOT_IMPLEMENTED; +} Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Jan 24 13:54:58 2012 @@ -65,7 +65,7 @@ reactos/dll/win32/hhctrl.ocx # Autosync reactos/dll/win32/hlink # Autosync reactos/dll/win32/hnetcfg # Autosync -reactos/dll/win32/httpapi # Autosync +reactos/dll/win32/httpapi # Synced to Wine-1.3.37 reactos/dll/win32/iccvid # Autosync reactos/dll/win32/icmp # Synced to Wine-0_9_10 reactos/dll/win32/imaadp32.acm # Autosync
12 years, 11 months
1
0
0
0
[akhaldi] 55141: [DWMAPI] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jan 24 13:52:57 2012 New Revision: 55141 URL:
http://svn.reactos.org/svn/reactos?rev=55141&view=rev
Log: [DWMAPI] * Sync to Wine 1.3.37. Modified: trunk/reactos/dll/win32/dwmapi/dwmapi.spec trunk/reactos/dll/win32/dwmapi/dwmapi_main.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/dwmapi/dwmapi.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dwmapi/dwmapi.sp…
============================================================================== --- trunk/reactos/dll/win32/dwmapi/dwmapi.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dwmapi/dwmapi.spec [iso-8859-1] Tue Jan 24 13:52:57 2012 @@ -21,7 +21,7 @@ 120 stub DWMAPI_120 @ stub DwmAttachMilContent -@ stub DwmDefWindowProc +@ stdcall DwmDefWindowProc(long long long long ptr) @ stub DwmDetachMilContent @ stdcall DwmEnableBlurBehindWindow(ptr ptr) @ stdcall DwmEnableMMCSS(long) @@ -32,11 +32,11 @@ @ stdcall DwmGetGraphicsStreamClient(long ptr) @ stdcall DwmGetGraphicsStreamTransformHint(long ptr) @ stdcall DwmGetTransportAttributes(ptr ptr ptr) -@ stub DwmGetWindowAttribute +@ stdcall DwmGetWindowAttribute(ptr long ptr long) @ stdcall DwmIsCompositionEnabled(ptr) @ stub DwmModifyPreviousDxFrameDuration @ stub DwmQueryThumbnailSourceSize -@ stub DwmRegisterThumbnail +@ stdcall DwmRegisterThumbnail(long long ptr) @ stub DwmSetDxFrameDuration @ stub DwmSetPresentParameters @ stdcall DwmSetWindowAttribute(long long ptr long) Modified: trunk/reactos/dll/win32/dwmapi/dwmapi_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dwmapi/dwmapi_ma…
============================================================================== --- trunk/reactos/dll/win32/dwmapi/dwmapi_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dwmapi/dwmapi_main.c [iso-8859-1] Tue Jan 24 13:52:57 2012 @@ -176,3 +176,35 @@ return E_NOTIMPL; } + +/********************************************************************** + * DwmDefWindowProc (DWMAPI.@) + */ +BOOL WINAPI DwmDefWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT *plResult) +{ + static int i; + + if (!i++) FIXME("stub\n"); + + return FALSE; +} + +/********************************************************************** + * DwmGetWindowAttribute (DWMAPI.@) + */ +HRESULT WINAPI DwmGetWindowAttribute(HWND hwnd, DWORD attribute, PVOID pv_attribute, DWORD size) +{ + FIXME("(%p %d %p %d) stub\n", hwnd, attribute, pv_attribute, size); + + return E_NOTIMPL; +} + +/********************************************************************** + * DwmRegisterThumbnail (DWMAPI.@) + */ +HRESULT WINAPI DwmRegisterThumbnail(HWND dest, HWND src, PHTHUMBNAIL thumbnail_id) +{ + FIXME("(%p %p %p) stub\n", dest, src, thumbnail_id); + + return E_NOTIMPL; +} Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Jan 24 13:52:57 2012 @@ -59,7 +59,7 @@ reactos/dll/win32/cryptui # Autosync reactos/dll/win32/dbghelp # Autosync reactos/dll/win32/dciman32 # Autosync -reactos/dll/win32/dwmapi # Autosync +reactos/dll/win32/dwmapi # Synced to Wine-1.3.37 reactos/dll/win32/fusion # Autosync reactos/dll/win32/gdiplus # Autosync reactos/dll/win32/hhctrl.ocx # Autosync
12 years, 11 months
1
0
0
0
[akhaldi] 55140: [CRYPTNET_WINETEST] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jan 24 13:50:35 2012 New Revision: 55140 URL:
http://svn.reactos.org/svn/reactos?rev=55140&view=rev
Log: [CRYPTNET_WINETEST] * Sync to Wine 1.3.37. Modified: trunk/rostests/winetests/cryptnet/cryptnet.c Modified: trunk/rostests/winetests/cryptnet/cryptnet.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/cryptnet/cryptn…
============================================================================== --- trunk/rostests/winetests/cryptnet/cryptnet.c [iso-8859-1] (original) +++ trunk/rostests/winetests/cryptnet/cryptnet.c [iso-8859-1] Tue Jan 24 13:50:35 2012 @@ -316,7 +316,7 @@ static void test_retrieveObjectByUrl(void) { BOOL ret; - char tmpfile[MAX_PATH * 2], *ptr, url[MAX_PATH + 8]; + char tmpfile[MAX_PATH * 2], url[MAX_PATH + 8]; CRYPT_BLOB_ARRAY *pBlobArray; PCCERT_CONTEXT cert; PCCRL_CONTEXT crl; @@ -332,17 +332,7 @@ GetLastError(), GetLastError()); make_tmp_file(tmpfile); - ptr = strchr(tmpfile, ':'); - if (ptr) - ptr += 2; /* skip colon and first slash */ - else - ptr = tmpfile; - snprintf(url, sizeof(url), "file:///%s", ptr); - do { - ptr = strchr(url, '\\'); - if (ptr) - *ptr = '/'; - } while (ptr); + snprintf(url, sizeof(url), "file://%s", tmpfile); pBlobArray = (CRYPT_BLOB_ARRAY *)0xdeadbeef; ret = CryptRetrieveObjectByUrlA(url, NULL, 0, 0, (void **)&pBlobArray, @@ -367,6 +357,7 @@ cert = (PCCERT_CONTEXT)0xdeadbeef; ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0, (void **)&cert, NULL, NULL, NULL, NULL); + ok(ret, "CryptRetrieveObjectByUrlA failed: %d\n", GetLastError()); ok(cert && cert != (PCCERT_CONTEXT)0xdeadbeef, "Expected a cert\n"); if (cert && cert != (PCCERT_CONTEXT)0xdeadbeef) CertFreeCertificateContext(cert); @@ -374,12 +365,10 @@ SetLastError(0xdeadbeef); ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CRL, 0, 0, (void **)&crl, NULL, NULL, NULL, NULL); - /* w2k3,XP, newer w2k: CRYPT_E_NO_MATCH, 95: OSS_DATA_ERROR */ + /* w2k3,XP, newer w2k: CRYPT_E_NO_MATCH, older w2k: CRYPT_E_ASN1_BADTAG */ ok(!ret && (GetLastError() == CRYPT_E_NO_MATCH || - GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_DATA_ERROR), - "got 0x%x/%u (expected CRYPT_E_NO_MATCH or CRYPT_E_ASN1_BADTAG or " - "OSS_DATA_ERROR)\n", GetLastError(), GetLastError()); + broken(GetLastError() == CRYPT_E_ASN1_BADTAG)), + "got 0x%x/%u (expected CRYPT_E_NO_MATCH)\n", GetLastError(), GetLastError()); /* only newer versions of cryptnet do the cleanup */ if(!ret && GetLastError() != CRYPT_E_ASN1_BADTAG && @@ -417,8 +406,8 @@ cert = (PCCERT_CONTEXT)0xdeadbeef; ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0, (void **)&cert, NULL, NULL, NULL, &aux); - /* w2k: success, 9x: fail with E_INVALIDARG */ - ok(ret || (GetLastError() == E_INVALIDARG), + /* w2k: failure with E_INVALIDARG */ + ok(ret || broken(GetLastError() == E_INVALIDARG), "got %u with 0x%x/%u (expected '!=0' or '0' with E_INVALIDARG)\n", ret, GetLastError(), GetLastError()); if (cert && cert != (PCCERT_CONTEXT)0xdeadbeef) @@ -428,8 +417,8 @@ aux.cbSize = sizeof(aux); ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0, (void **)&cert, NULL, NULL, NULL, &aux); - /* w2k: success, 9x: fail with E_INVALIDARG */ - ok(ret || (GetLastError() == E_INVALIDARG), + /* w2k: failure with E_INVALIDARG */ + ok(ret || broken(GetLastError() == E_INVALIDARG), "got %u with 0x%x/%u (expected '!=0' or '0' with E_INVALIDARG)\n", ret, GetLastError(), GetLastError()); if (!ret) { @@ -492,7 +481,7 @@ 0x2e,0x7c,0xf2,0x06,0x9d,0xb3,0x3b,0x7e,0x2f,0xda,0x25,0x66,0x7e,0xa7,0x1f, 0x45,0xd4,0xf5,0xe3,0xdf,0x2a,0xf1,0x18,0x28,0x20,0xb5,0xf8,0xf5,0x8d,0x7a, 0x2e,0x84,0xee }; -static const BYTE eeCert[] = { +static const BYTE revokedCert[] = { 0x30,0x82,0x01,0xb9,0x30,0x82,0x01,0x22,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, 0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, 0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, @@ -523,7 +512,37 @@ 0xd6,0x5e,0x0a,0x74,0xf2,0x85,0xa6,0xd5,0x3c,0x28,0xc0,0x89,0x5d,0xda,0xf3, 0xa6,0x01,0xc2,0xe9,0xa3,0xc1,0xb7,0x21,0x08,0xba,0x18,0x07,0x45,0xeb,0x77, 0x7d,0xcd,0xc6,0xe7,0x2a,0x7b,0x46,0xd2,0x3d,0xb5 }; -static const BYTE rootSignedCRL[] = { +static const BYTE unRevokedCert[] = { +0x30,0x82,0x01,0xa2,0x30,0x82,0x01,0x0d,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, +0x02,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30, +0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72, +0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,0x30,0x30, +0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,0x30,0x30, +0x30,0x30,0x30,0x5a,0x30,0x24,0x31,0x22,0x30,0x0e,0x06,0x03,0x55,0x04,0x03, +0x13,0x07,0x66,0x6f,0x6f,0x2e,0x63,0x6f,0x6d,0x30,0x10,0x06,0x03,0x55,0x04, +0x03,0x13,0x09,0x2a,0x2e,0x66,0x6f,0x6f,0x2e,0x63,0x6f,0x6d,0x30,0x81,0x9d, +0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81, +0x8d,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f, +0xe5,0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4, +0xc6,0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5, +0xa7,0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6, +0x8b,0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf, +0x6b,0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40, +0xfc,0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac, +0x85,0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23, +0xb2,0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98, +0x72,0xa3,0x02,0x03,0x01,0x00,0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86, +0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x9f,0x11,0x8a,0x0a,0x6e,0xb0, +0x73,0xcc,0x48,0xf1,0x92,0xca,0xaf,0x9a,0x3d,0xb9,0xcf,0xbe,0x84,0xd0,0xa8, +0x34,0x25,0x27,0x9d,0x28,0x68,0xc5,0x35,0x2b,0x84,0xff,0xdb,0xd0,0x1f,0x0d, +0xd7,0xd6,0x8c,0x1b,0x33,0x52,0x7d,0x19,0xd0,0xc2,0xf3,0x63,0xd6,0x55,0x45, +0xf9,0x46,0xa0,0xb7,0xb3,0x94,0xbb,0x25,0x9b,0x29,0x76,0x7c,0x11,0xc7,0x7b, +0xcc,0xcb,0x99,0x3c,0xae,0xe7,0x16,0xb5,0xa7,0x6a,0x1f,0x75,0x4a,0x58,0x65, +0xb1,0x5b,0x91,0x29,0x20,0x81,0x51,0x64,0x05,0x24,0xa5,0x77,0xb7,0x8e,0xc8, +0x32,0x0f,0x0d,0x4f,0xf9,0x78,0x0f,0xc4,0xef,0xd6,0x25,0x5a,0xa4,0x9b,0x07, +0x17,0xea,0x56,0xe2,0x7b,0x61,0x1c,0x2d,0x40,0x38,0x9a,0x24,0x64,0x4b,0x6d, +0x08,0x96 }; +static const BYTE rootSignedCRLWithBadAKI[] = { 0x30,0x82,0x01,0x1f,0x30,0x81,0x89,0x02,0x01,0x01,0x30,0x0d,0x06,0x09,0x2a, 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x10,0x31,0x0e,0x30, 0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x17,0x0d, @@ -544,12 +563,31 @@ 0xa5,0xed,0xf9,0x77,0xb0,0x3c,0x81,0xcf,0xcc,0x49,0xb2,0x1a,0xc3,0xfd,0x34, 0xd5,0xbc,0xb0,0xd5,0xa5,0x9c,0x1b,0x72,0xc3,0x0f,0xa3,0xe3,0x3c,0xf0,0xc3, 0x91,0xe8,0x93,0x4f,0xd4,0x2f }; - -BOOL (WINAPI *pCertVerifyRevocation)(DWORD, DWORD, DWORD, void **, DWORD, +static const BYTE rootSignedCRL[] = { +0x30,0x81,0xe6,0x30,0x53,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, +0x01,0x01,0x05,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13, +0x05,0x43,0x65,0x72,0x74,0x31,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30, +0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32, +0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x14,0x30,0x12,0x02,0x01,0x01,0x17,0x0d, +0x30,0x37,0x31,0x30,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x0b, +0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00, +0x94,0x84,0x0a,0xad,0x63,0xe3,0x05,0xc1,0xd8,0x94,0x44,0xeb,0x30,0x03,0xa1, +0xb4,0x7b,0x09,0x2f,0xf6,0xef,0x0f,0xe5,0x58,0x70,0x67,0xac,0x32,0x91,0xc0, +0x9d,0xf1,0x2b,0xf4,0xb3,0xcf,0xdd,0x1d,0x74,0x7b,0x6f,0x59,0x36,0x73,0xca, +0xcd,0x9c,0xb6,0xd9,0x35,0x39,0x45,0x8d,0xfd,0xf9,0x65,0xf3,0x42,0x2c,0x2c, +0xa6,0xfc,0xd2,0x23,0x6c,0x73,0x28,0x21,0x47,0x22,0x88,0x36,0x7d,0xd8,0xf0, +0xd0,0xca,0x11,0x20,0x50,0x6b,0x1e,0xb1,0x16,0x16,0xde,0xa6,0xc1,0x8d,0x18, +0xf1,0x42,0x22,0x1d,0x95,0x11,0xd7,0xa9,0x8f,0x90,0xe5,0x2f,0x71,0x52,0x47, +0xe0,0x45,0xb1,0x5a,0x2c,0x72,0x8a,0x25,0xca,0xd6,0x96,0xa2,0x7b,0x83,0x4c, +0xa3,0x24,0x7e,0xdd,0x45,0xa1,0x38,0xf8 }; + +static BOOL (WINAPI *pCertVerifyRevocation)(DWORD, DWORD, DWORD, void **, DWORD, PCERT_REVOCATION_PARA, PCERT_REVOCATION_STATUS); /* Wednesday, Oct 1, 2007 */ static SYSTEMTIME oct2007 = { 2007, 10, 1, 1, 0, 0, 0, 0 }; +/* Tuesday, May 1, 2007 */ +static SYSTEMTIME may2007 = { 2007, 5, 2, 1, 0, 0, 0, 0 }; static void test_verifyRevocation(void) { @@ -570,7 +608,7 @@ if (0) { /* Crash */ - ret = pCertVerifyRevocation(0, 0, 0, NULL, 0, NULL, NULL); + pCertVerifyRevocation(0, 0, 0, NULL, 0, NULL, NULL); } SetLastError(0xdeadbeef); ret = pCertVerifyRevocation(0, 0, 0, NULL, 0, NULL, &status); @@ -600,7 +638,7 @@ certs[0] = CertCreateCertificateContext(X509_ASN_ENCODING, rootWithKeySignAndCRLSign, sizeof(rootWithKeySignAndCRLSign)); certs[1] = CertCreateCertificateContext(X509_ASN_ENCODING, - eeCert, sizeof(eeCert)); + revokedCert, sizeof(revokedCert)); /* The root cert itself can't be checked for revocation */ SetLastError(0xdeadbeef); ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, @@ -632,7 +670,8 @@ revPara.hCrlStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); CertAddEncodedCRLToStore(revPara.hCrlStore, X509_ASN_ENCODING, - rootSignedCRL, sizeof(rootSignedCRL), CERT_STORE_ADD_ALWAYS, NULL); + rootSignedCRLWithBadAKI, sizeof(rootSignedCRLWithBadAKI), + CERT_STORE_ADD_ALWAYS, NULL); SetLastError(0xdeadbeef); ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, 2, (void **)certs, 0, &revPara, &status); @@ -655,8 +694,9 @@ SetLastError(0xdeadbeef); ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)&certs[1], 0, &revPara, &status); - /* Win2k thinks the cert is revoked, and it is, except the CRL is out of - * date, hence the revocation status should be unknown. + /* Win2k thinks the cert is revoked, and it is, except the CRL contains a + * bad authority key ID extension and can't be matched with the issuer + * cert, hence the revocation status should be unknown. */ ok(!ret && (GetLastError() == CRYPT_E_NO_REVOCATION_CHECK || broken(GetLastError() == CRYPT_E_REVOKED /* Win2k */)), @@ -679,6 +719,67 @@ "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", status.dwError); ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); CertCloseStore(revPara.hCrlStore, 0); + /* Test again with a valid CRL. This time, the cert should be revoked when + * the time is after the validity period of the CRL, or considered + * "revocation offline" when the checked time precedes the validity + * period of the CRL. + */ + revPara.hCrlStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, + CERT_STORE_CREATE_NEW_FLAG, NULL); + ret = CertAddEncodedCRLToStore(revPara.hCrlStore, X509_ASN_ENCODING, + rootSignedCRL, sizeof(rootSignedCRL), CERT_STORE_ADD_ALWAYS, NULL); + ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); + revPara.pftTimeToUse = NULL; + SetLastError(0xdeadbeef); + ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, + 1, (void **)&certs[1], 0, &revPara, &status); + ok(!ret && (GetLastError() == CRYPT_E_REVOKED || + broken(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK /* NT4 */)), + "expected CRYPT_E_REVOKED, got %08x\n", GetLastError()); + revPara.pftTimeToUse = &time; + SetLastError(0xdeadbeef); + ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, + 1, (void **)&certs[1], 0, &revPara, &status); + ok(!ret && (GetLastError() == CRYPT_E_REVOKED || + broken(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK /* NT4 */)), + "expected CRYPT_E_REVOKED, got %08x\n", GetLastError()); + SystemTimeToFileTime(&may2007, &time); + SetLastError(0xdeadbeef); + ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, + 1, (void **)&certs[1], 0, &revPara, &status); + ok(!ret && (GetLastError() == CRYPT_E_REVOCATION_OFFLINE || + broken(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK /* NT4 */)), + "expected CRYPT_E_REVOCATION_OFFLINE, got %08x\n", GetLastError()); + CertFreeCertificateContext(certs[1]); + /* Test again with a valid CRL and an un-revoked cert. No matter the + * time checked, it's reported as revocation offline. + */ + certs[1] = CertCreateCertificateContext(X509_ASN_ENCODING, + unRevokedCert, sizeof(unRevokedCert)); + ok(certs[1] != NULL, "CertCreateCertificateContext failed: %08x\n", + GetLastError()); + revPara.pftTimeToUse = NULL; + SetLastError(0xdeadbeef); + ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, + 1, (void **)&certs[1], 0, &revPara, &status); + ok(!ret && (GetLastError() == CRYPT_E_REVOCATION_OFFLINE || + broken(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK /* NT4 */)), + "expected CRYPT_E_REVOCATION_OFFLINE, got %08x\n", GetLastError()); + revPara.pftTimeToUse = &time; + SetLastError(0xdeadbeef); + ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, + 1, (void **)&certs[1], 0, &revPara, &status); + ok(!ret && (GetLastError() == CRYPT_E_REVOCATION_OFFLINE || + broken(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK /* NT4 */)), + "expected CRYPT_E_REVOCATION_OFFLINE, got %08x\n", GetLastError()); + SystemTimeToFileTime(&may2007, &time); + SetLastError(0xdeadbeef); + ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, + 1, (void **)&certs[1], 0, &revPara, &status); + ok(!ret && (GetLastError() == CRYPT_E_REVOCATION_OFFLINE || + broken(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK /* NT4 */)), + "expected CRYPT_E_REVOCATION_OFFLINE, got %08x\n", GetLastError()); + CertCloseStore(revPara.hCrlStore, 0); CertFreeCertificateContext(certs[1]); CertFreeCertificateContext(certs[0]); }
12 years, 11 months
1
0
0
0
[akhaldi] 55139: [CRYPTNET] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jan 24 13:50:22 2012 New Revision: 55139 URL:
http://svn.reactos.org/svn/reactos?rev=55139&view=rev
Log: [CRYPTNET] * Sync to Wine 1.3.37. Modified: trunk/reactos/dll/win32/cryptnet/cryptnet_main.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/cryptnet/cryptnet_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptnet/cryptne…
============================================================================== --- trunk/reactos/dll/win32/cryptnet/cryptnet_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cryptnet/cryptnet_main.c [iso-8859-1] Tue Jan 24 13:50:22 2012 @@ -60,8 +60,6 @@ static const WCHAR cryptNet[] = { 'c','r','y','p','t','n','e','t','.', 'd','l','l',0 }; -static const WCHAR ldapProvOpenStore[] = { 'L','d','a','p','P','r','o','v', - 'O','p','e','S','t','o','r','e',0 }; /*********************************************************************** * DllRegisterServer (CRYPTNET.@) @@ -571,7 +569,7 @@ return ret; } -/* Parses the URL, and sets components's lpszHostName and lpszUrlPath members +/* Parses the URL, and sets components' lpszHostName and lpszUrlPath members * to NULL-terminated copies of those portions of the URL (to be freed with * CryptMemFree.) */ @@ -583,16 +581,25 @@ memset(components, 0, sizeof(*components)); components->dwStructSize = sizeof(*components); - components->lpszHostName = CryptMemAlloc(MAX_PATH * sizeof(WCHAR)); - components->dwHostNameLength = MAX_PATH; - components->lpszUrlPath = CryptMemAlloc(MAX_PATH * 2 * sizeof(WCHAR)); - components->dwUrlPathLength = 2 * MAX_PATH; + components->lpszHostName = CryptMemAlloc(INTERNET_MAX_HOST_NAME_LENGTH * sizeof(WCHAR)); + components->dwHostNameLength = INTERNET_MAX_HOST_NAME_LENGTH; + if (!components->lpszHostName) + { + SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + components->lpszUrlPath = CryptMemAlloc(INTERNET_MAX_PATH_LENGTH * sizeof(WCHAR)); + components->dwUrlPathLength = INTERNET_MAX_PATH_LENGTH; + if (!components->lpszUrlPath) + { + CryptMemFree(components->lpszHostName); + SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + ret = InternetCrackUrlW(pszURL, 0, ICU_DECODE, components); if (ret) { - if ((components->dwUrlPathLength == 2 * MAX_PATH - 1) || - (components->dwHostNameLength == MAX_PATH - 1)) - FIXME("Buffers are too small\n"); switch (components->nScheme) { case INTERNET_SCHEME_FTP: @@ -740,11 +747,15 @@ if (ret) lstrcpyW(cacheFileName, info->lpszLocalFileName); /* Check if the existing cache entry is up to date. If it isn't, - * overwite it with the new value. + * remove the existing cache entry, and create a new one with the + * new value. */ GetSystemTimeAsFileTime(&ft); if (CompareFileTime(&info->ExpireTime, &ft) < 0) + { create = TRUE; + DeleteUrlCacheEntryW(pszURL); + } CryptMemFree(info); } else @@ -814,7 +825,7 @@ components->nPort, context, pCredentials, phInt, phInt); *phHost = NULL; - *phInt = InternetOpenW(NULL, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, + *phInt = InternetOpenW(NULL, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, context ? INTERNET_FLAG_ASYNC : 0); if (*phInt) { @@ -1021,15 +1032,18 @@ *ppfnFreeObject = CRYPT_FreeBlob; *ppvFreeContext = NULL; - components.lpszUrlPath = CryptMemAlloc(MAX_PATH * 2 * sizeof(WCHAR)); - components.dwUrlPathLength = 2 * MAX_PATH; + components.lpszUrlPath = CryptMemAlloc(INTERNET_MAX_PATH_LENGTH * sizeof(WCHAR)); + components.dwUrlPathLength = INTERNET_MAX_PATH_LENGTH; + if (!components.lpszUrlPath) + { + SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + ret = InternetCrackUrlW(pszURL, 0, ICU_DECODE, &components); if (ret) { LPWSTR path; - - if (components.dwUrlPathLength == 2 * MAX_PATH - 1) - FIXME("Buffers are too small\n"); /* 3 == lstrlenW(L"c:") + 1 */ path = CryptMemAlloc((components.dwUrlPathLength + 3) * sizeof(WCHAR)); @@ -1082,6 +1096,11 @@ else ret = FALSE; CryptMemFree(path); + } + else + { + SetLastError(ERROR_OUTOFMEMORY); + ret = FALSE; } } CryptMemFree(components.lpszUrlPath); @@ -1553,36 +1572,32 @@ return ret; } -static DWORD verify_cert_revocation_with_crl(PCCERT_CONTEXT cert, +static DWORD verify_cert_revocation_with_crl_online(PCCERT_CONTEXT cert, PCCRL_CONTEXT crl, DWORD index, FILETIME *pTime, PCERT_REVOCATION_STATUS pRevStatus) { DWORD error; - - if (CertVerifyCRLTimeValidity(pTime, crl->pCrlInfo)) - { - /* The CRL isn't time valid */ - error = CRYPT_E_NO_REVOCATION_CHECK; + PCRL_ENTRY entry = NULL; + + CertFindCertificateInCRL(cert, crl, 0, NULL, &entry); + if (entry) + { + error = CRYPT_E_REVOKED; + pRevStatus->dwIndex = index; } else { - PCRL_ENTRY entry = NULL; - - CertFindCertificateInCRL(cert, crl, 0, NULL, &entry); - if (entry) - { - error = CRYPT_E_REVOKED; - pRevStatus->dwIndex = index; - } - else - error = ERROR_SUCCESS; + /* Since the CRL was retrieved for the cert being checked, then it's + * guaranteed to be fresh, and the cert is not revoked. + */ + error = ERROR_SUCCESS; } return error; } static DWORD verify_cert_revocation_from_dist_points_ext( const CRYPT_DATA_BLOB *value, PCCERT_CONTEXT cert, DWORD index, - FILETIME *pTime, DWORD dwFlags, PCERT_REVOCATION_PARA pRevPara, + FILETIME *pTime, DWORD dwFlags, const CERT_REVOCATION_PARA *pRevPara, PCERT_REVOCATION_STATUS pRevStatus) { DWORD error = ERROR_SUCCESS, cbUrlArray; @@ -1621,8 +1636,8 @@ NULL, NULL, NULL, NULL); if (ret) { - error = verify_cert_revocation_with_crl(cert, crl, index, - pTime, pRevStatus); + error = verify_cert_revocation_with_crl_online(cert, crl, + index, pTime, pRevStatus); if (!error && timeout) { DWORD time = GetTickCount(); @@ -1692,6 +1707,45 @@ return error; } +static DWORD verify_cert_revocation_with_crl_offline(PCCERT_CONTEXT cert, + PCCRL_CONTEXT crl, DWORD index, FILETIME *pTime, + PCERT_REVOCATION_STATUS pRevStatus) +{ + DWORD error; + LONG valid; + + valid = CompareFileTime(pTime, &crl->pCrlInfo->ThisUpdate); + if (valid <= 0) + { + /* If this CRL is not older than the time being verified, there's no + * way to know whether the certificate was revoked. + */ + TRACE("CRL not old enough\n"); + error = CRYPT_E_REVOCATION_OFFLINE; + } + else + { + PCRL_ENTRY entry = NULL; + + CertFindCertificateInCRL(cert, crl, 0, NULL, &entry); + if (entry) + { + error = CRYPT_E_REVOKED; + pRevStatus->dwIndex = index; + } + else + { + /* Since the CRL was not retrieved for the cert being checked, + * there's no guarantee it's fresh, so the cert *might* be okay, + * but it's safer not to guess. + */ + TRACE("certificate not found\n"); + error = CRYPT_E_REVOCATION_OFFLINE; + } + } + return error; +} + static DWORD verify_cert_revocation(PCCERT_CONTEXT cert, DWORD index, FILETIME *pTime, DWORD dwFlags, PCERT_REVOCATION_PARA pRevPara, PCERT_REVOCATION_STATUS pRevStatus) @@ -1757,18 +1811,25 @@ } if (crl) { - error = verify_cert_revocation_with_crl(cert, crl, index, - pTime, pRevStatus); + error = verify_cert_revocation_with_crl_offline(cert, crl, + index, pTime, pRevStatus); CertFreeCRLContext(crl); } else { + TRACE("no CRL found\n"); error = CRYPT_E_NO_REVOCATION_CHECK; pRevStatus->dwIndex = index; } } else { + if (!pRevPara) + WARN("no CERT_REVOCATION_PARA\n"); + else if (!pRevPara->hCrlStore) + WARN("no dist points/aia extension and no CRL store\n"); + else if (!pRevPara->pIssuerCert) + WARN("no dist points/aia extension and no issuer\n"); error = CRYPT_E_NO_REVOCATION_CHECK; pRevStatus->dwIndex = index; } Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Jan 24 13:50:22 2012 @@ -55,7 +55,7 @@ reactos/dll/win32/crypt32 # Synced to Wine-1.3.37 reactos/dll/win32/cryptdlg # Synced to Wine-1.3.37 reactos/dll/win32/cryptdll # Synced to Wine-1.3.37 -reactos/dll/win32/cryptnet # Autosync +reactos/dll/win32/cryptnet # Synced to Wine-1.3.37 reactos/dll/win32/cryptui # Autosync reactos/dll/win32/dbghelp # Autosync reactos/dll/win32/dciman32 # Autosync
12 years, 11 months
1
0
0
0
[cgutman] 55138: [USBSTOR] - Fix cancellation for IRPs that have already been dispatched for processing by IoStartNextPacket - Don't complete IRPs with the IRP list lock held - Clear the cancel rou...
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Jan 24 04:39:09 2012 New Revision: 55138 URL:
http://svn.reactos.org/svn/reactos?rev=55138&view=rev
Log: [USBSTOR] - Fix cancellation for IRPs that have already been dispatched for processing by IoStartNextPacket - Don't complete IRPs with the IRP list lock held - Clear the cancel routine before completing the IRP Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/queue.c Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/queue.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbstor/queue.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbstor/queue.c [iso-8859-1] Tue Jan 24 04:39:09 2012 @@ -51,6 +51,45 @@ ASSERT(FDODeviceExtension->Common.IsFDO); // + // this IRP isn't in our list here + // + + // + // now release the cancel lock + // + IoReleaseCancelSpinLock(Irp->CancelIrql); + + // + // set cancel status + // + Irp->IoStatus.Status = STATUS_CANCELLED; + + // + // now cancel the irp + // + IoCompleteRequest(Irp, IO_NO_INCREMENT); +} + +VOID +NTAPI +USBSTOR_Cancel( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + PFDO_DEVICE_EXTENSION FDODeviceExtension; + + // + // get FDO device extension + // + FDODeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + + // + // sanity check + // + ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL); + ASSERT(FDODeviceExtension->Common.IsFDO); + + // // acquire irp list lock // KeAcquireSpinLockAtDpcLevel(&FDODeviceExtension->IrpListLock); @@ -80,7 +119,6 @@ // IoCompleteRequest(Irp, IO_NO_INCREMENT); } - BOOLEAN USBSTOR_QueueAddIrp( @@ -149,7 +187,14 @@ // // now set the driver cancel routine // - OldDriverCancel = IoSetCancelRoutine(Irp, USBSTOR_CancelIo); + if (SrbProcessing) + { + OldDriverCancel = IoSetCancelRoutine(Irp, USBSTOR_Cancel); + } + else + { + OldDriverCancel = IoSetCancelRoutine(Irp, USBSTOR_CancelIo); + } // // check if the irp has already been cancelled @@ -159,7 +204,7 @@ // // cancel irp // - USBSTOR_CancelIo(DeviceObject, Irp); + Irp->CancelRoutine(DeviceObject, Irp); // // irp was cancelled @@ -241,6 +286,7 @@ PIRP Irp; PIO_STACK_LOCATION IoStack; PSCSI_REQUEST_BLOCK Request; + KIRQL OldIrql; // // get FDO device extension @@ -273,6 +319,13 @@ Irp = (PIRP)CONTAINING_RECORD(Entry, IRP, Tail.Overlay.ListEntry); // + // remove the cancellation routine + // + IoAcquireCancelSpinLock(&OldIrql); + (void)IoSetCancelRoutine(Irp, NULL); + IoReleaseCancelSpinLock(OldIrql); + + // // get current stack location // IoStack = IoGetCurrentIrpStackLocation(Irp); @@ -298,15 +351,20 @@ Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; // + // release lock + // + KeReleaseSpinLock(&FDODeviceExtension->IrpListLock, OldLevel); + + // // complete request // IoCompleteRequest(Irp, IO_NO_INCREMENT); - } - - // - // release lock - // - KeReleaseSpinLock(&FDODeviceExtension->IrpListLock, OldLevel); + + // + // acquire lock + // + KeAcquireSpinLock(&FDODeviceExtension->IrpListLock, &OldLevel); + } } VOID
12 years, 11 months
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
56
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
Results per page:
10
25
50
100
200