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
March 2010
----- 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
896 discussions
Start a n
N
ew thread
[akhaldi] 45807: - Move more stuff to wdm.h - Improve more Io* and Ke* definitions
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Mar 3 22:06:23 2010 New Revision: 45807 URL:
http://svn.reactos.org/svn/reactos?rev=45807&view=rev
Log: - Move more stuff to wdm.h - Improve more Io* and Ke* definitions Modified: branches/header-work/include/ddk/wdm.h branches/header-work/include/ddk/winddk.h Modified: branches/header-work/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/wdm.h?r…
============================================================================== --- branches/header-work/include/ddk/wdm.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/wdm.h [iso-8859-1] Wed Mar 3 22:06:23 2010 @@ -1454,6 +1454,170 @@ /****************************************************************************** * Kernel Functions * ******************************************************************************/ + +#if (NTDDI_VERSION >= NTDDI_WIN2K) + +NTKERNELAPI +DECLSPEC_NORETURN +VOID +NTAPI +KeBugCheckEx( + IN ULONG BugCheckCode, + IN ULONG_PTR BugCheckParameter1, + IN ULONG_PTR BugCheckParameter2, + IN ULONG_PTR BugCheckParameter3, + IN ULONG_PTR BugCheckParameter4); + +NTKERNELAPI +BOOLEAN +KeCancelTimer( + IN OUT PKTIMER); + +NTKERNELAPI +NTSTATUS +KeDelayExecutionThread( + IN KPROCESSOR_MODE WaitMode, + IN BOOLEAN Alertable, + IN PLARGE_INTEGER Interval); + +NTKERNELAPI +BOOLEAN +KeDeregisterBugCheckCallback( + IN OUT PKBUGCHECK_CALLBACK_RECORD CallbackRecord); + +NTKERNELAPI +VOID +KeEnterCriticalRegion(VOID); + +NTKERNELAPI +VOID +KeInitializeDeviceQueue( + OUT PKDEVICE_QUEUE DeviceQueue); + +NTKERNELAPI +VOID +KeInitializeMutex( + OUT PRKMUTEX Mutex, + IN ULONG Level); + +NTKERNELAPI +VOID +KeInitializeSemaphore( + OUT PRKSEMAPHORE Semaphore, + IN LONG Count, + IN LONG Limit); + +NTKERNELAPI +VOID +KeInitializeTimer( + OUT PKTIMER Timer); + +NTKERNELAPI +VOID +KeInitializeTimerEx( + OUT PKTIMER Timer, + IN TIMER_TYPE Type); + +NTKERNELAPI +BOOLEAN +KeInsertByKeyDeviceQueue( + IN OUT PKDEVICE_QUEUE DeviceQueue, + IN OUT PKDEVICE_QUEUE_ENTRY DeviceQueueEntry, + IN ULONG SortKey); + +NTKERNELAPI +BOOLEAN +KeInsertDeviceQueue( + IN OUT PKDEVICE_QUEUE DeviceQueue, + IN OUT PKDEVICE_QUEUE_ENTRY DeviceQueueEntry); + +NTKERNELAPI +BOOLEAN +KeInsertQueueDpc( + IN OUT PRKDPC Dpc, + IN PVOID SystemArgument1 OPTIONAL, + IN PVOID SystemArgument2 OPTIONAL); + +NTKERNELAPI +VOID +KeLeaveCriticalRegion(VOID); + +#endif + +#if (NTDDI_VERSION >= NTDDI_WINXP) + +VOID +FASTCALL +KeAcquireInStackQueuedSpinLock ( + IN OUT PKSPIN_LOCK SpinLock, + OUT PKLOCK_QUEUE_HANDLE LockHandle); + +NTKERNELAPI +VOID +FASTCALL +KeAcquireInStackQueuedSpinLockAtDpcLevel( + IN OUT PKSPIN_LOCK SpinLock, + OUT PKLOCK_QUEUE_HANDLE LockHandle); + +NTKERNELAPI +KIRQL +KeAcquireInterruptSpinLock( + IN OUT PKINTERRUPT Interrupt); + +NTKERNELAPI +BOOLEAN +KeAreApcsDisabled(VOID); + +NTKERNELAPI +ULONG +KeGetRecommendedSharedDataAlignment(VOID); + +#endif + +#if (NTDDI_VERSION >= NTDDI_WINXPSP2) + +NTKERNELAPI +VOID +KeFlushQueuedDpcs( + VOID); + +#endif + +#if defined(_IA64_) +FORCEINLINE +VOID +KeFlushWriteBuffer (VOID) +{ + __mf (); + return; +} + +#else +NTHALAPI +VOID +KeFlushWriteBuffer (VOID); + +#endif + +NTKERNELAPI +VOID +KeClearEvent( + IN OUT PRKEVENT Event); + +/* + * VOID + * KeFlushIoBuffers( + * IN PMDL Mdl, + * IN BOOLEAN ReadOperation, + * IN BOOLEAN DmaOperation) + */ +#define KeFlushIoBuffers(_Mdl, _ReadOperation, _DmaOperation) + +#define ExAcquireSpinLock(Lock, OldIrql) KeAcquireSpinLock((Lock), (OldIrql)) +#define ExReleaseSpinLock(Lock, OldIrql) KeReleaseSpinLock((Lock), (OldIrql)) +#define ExAcquireSpinLockAtDpcLevel(Lock) KeAcquireSpinLockAtDpcLevel(Lock) +#define ExReleaseSpinLockFromDpcLevel(Lock) KeReleaseSpinLockFromDpcLevel(Lock) + /* SPINLOCK FUNCTIONS */ @@ -6634,6 +6798,72 @@ IN PULONG Key OPTIONAL, IN PDRIVER_CANCEL CancelFunction OPTIONAL); +NTKERNELAPI +VOID +IoStartTimer( + IN PDEVICE_OBJECT DeviceObject); + +NTKERNELAPI +VOID +IoStopTimer( + IN PDEVICE_OBJECT DeviceObject); + +NTKERNELAPI +NTSTATUS +IoUnregisterPlugPlayNotification( + IN PVOID NotificationEntry); + +NTKERNELAPI +VOID +IoUnregisterShutdownNotification( + IN PDEVICE_OBJECT DeviceObject); + +NTKERNELAPI +VOID +IoUpdateShareAccess( + IN PFILE_OBJECT FileObject, + IN OUT PSHARE_ACCESS ShareAccess); + +NTKERNELAPI +NTSTATUS +IoWMIAllocateInstanceIds( + IN GUID *Guid, + IN ULONG InstanceCount, + OUT ULONG *FirstInstanceId); + +NTKERNELAPI +NTSTATUS +IoWMIQuerySingleInstanceMultiple( + IN PVOID *DataBlockObjectList, + IN PUNICODE_STRING InstanceNames, + IN ULONG ObjectCount, + IN OUT ULONG *InOutBufferSize, + OUT PVOID OutBuffer); + +NTKERNELAPI +NTSTATUS +IoWMIRegistrationControl( + IN PDEVICE_OBJECT DeviceObject, + IN ULONG Action); + +NTKERNELAPI +NTSTATUS +IoWMISuggestInstanceName( + IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL, + IN PUNICODE_STRING SymbolicLinkName OPTIONAL, + IN BOOLEAN CombineNames, + OUT PUNICODE_STRING SuggestedInstanceName); + +NTKERNELAPI +NTSTATUS +IoWMIWriteEvent( + IN PVOID WnodeEventItem); + +NTKERNELAPI +VOID +IoWriteErrorLogEntry( + IN PVOID ElEntry); + #endif #if (NTDDI_VERSION >= NTDDI_WINXP) @@ -6700,6 +6930,95 @@ IN BOOLEAN DeferredStartIo, IN BOOLEAN NonCancelable); +NTKERNELAPI +NTSTATUS +IoWMIDeviceObjectToInstanceName( + IN PVOID DataBlockObject, + IN PDEVICE_OBJECT DeviceObject, + OUT PUNICODE_STRING InstanceName); + +NTKERNELAPI +NTSTATUS +IoWMIExecuteMethod( + IN PVOID DataBlockObject, + IN PUNICODE_STRING InstanceName, + IN ULONG MethodId, + IN ULONG InBufferSize, + IN OUT PULONG OutBufferSize, + IN OUT PUCHAR InOutBuffer); + +NTKERNELAPI +NTSTATUS +IoWMIHandleToInstanceName( + IN PVOID DataBlockObject, + IN HANDLE FileHandle, + OUT PUNICODE_STRING InstanceName); + +NTKERNELAPI +NTSTATUS +IoWMIOpenBlock( + IN GUID *DataBlockGuid, + IN ULONG DesiredAccess, + OUT PVOID *DataBlockObject); + +NTKERNELAPI +NTSTATUS +IoWMIQueryAllData( + IN PVOID DataBlockObject, + IN OUT ULONG *InOutBufferSize, + OUT PVOID OutBuffer); + +NTKERNELAPI +NTSTATUS +IoWMIQueryAllDataMultiple( + IN PVOID *DataBlockObjectList, + IN ULONG ObjectCount, + IN OUT ULONG *InOutBufferSize, + OUT PVOID OutBuffer); + +NTKERNELAPI +NTSTATUS +IoWMIQuerySingleInstance( + IN PVOID DataBlockObject, + IN PUNICODE_STRING InstanceName, + IN OUT ULONG *InOutBufferSize, + OUT PVOID OutBuffer); + +NTKERNELAPI +NTSTATUS +IoWMISetNotificationCallback( + IN OUT PVOID Object, + IN WMI_NOTIFICATION_CALLBACK Callback, + IN PVOID Context OPTIONAL); + +NTKERNELAPI +NTSTATUS +IoWMISetSingleInstance( + IN PVOID DataBlockObject, + IN PUNICODE_STRING InstanceName, + IN ULONG Version, + IN ULONG ValueBufferSize, + IN PVOID ValueBuffer); + +NTKERNELAPI +NTSTATUS +IoWMISetSingleItem( + IN PVOID DataBlockObject, + IN PUNICODE_STRING InstanceName, + IN ULONG DataItemId, + IN ULONG Version, + IN ULONG ValueBufferSize, + IN PVOID ValueBuffer); + +#endif + +#if defined(_WIN64) +NTKERNELAPI +ULONG +IoWMIDeviceObjectToProviderId( + IN PDEVICE_OBJECT DeviceObject); +#else +#define IoWMIDeviceObjectToProviderId(DeviceObject) ((ULONG)(DeviceObject)) #endif /* Modified: branches/header-work/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/winddk.…
============================================================================== --- branches/header-work/include/ddk/winddk.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/winddk.h [iso-8859-1] Wed Mar 3 22:06:23 2010 @@ -2790,40 +2790,6 @@ IoSetThreadHardErrorMode( IN BOOLEAN EnableHardErrors); - - - -NTKERNELAPI -VOID -NTAPI -IoStartTimer( - IN PDEVICE_OBJECT DeviceObject); - -NTKERNELAPI -VOID -NTAPI -IoStopTimer( - IN PDEVICE_OBJECT DeviceObject); - -NTKERNELAPI -NTSTATUS -NTAPI -IoUnregisterPlugPlayNotification( - IN PVOID NotificationEntry); - -NTKERNELAPI -VOID -NTAPI -IoUnregisterShutdownNotification( - IN PDEVICE_OBJECT DeviceObject); - -NTKERNELAPI -VOID -NTAPI -IoUpdateShareAccess( - IN PFILE_OBJECT FileObject, - IN OUT PSHARE_ACCESS ShareAccess); - NTKERNELAPI NTSTATUS NTAPI @@ -2837,148 +2803,6 @@ IoVolumeDeviceToDosName( IN PVOID VolumeDeviceObject, OUT PUNICODE_STRING DosName); - -NTKERNELAPI -NTSTATUS -NTAPI -IoWMIAllocateInstanceIds( - IN GUID *Guid, - IN ULONG InstanceCount, - OUT ULONG *FirstInstanceId); - -NTKERNELAPI -ULONG -NTAPI -IoWMIDeviceObjectToProviderId( - IN PDEVICE_OBJECT DeviceObject); - -NTKERNELAPI -NTSTATUS -NTAPI -IoWMIDeviceObjectToInstanceName( - IN PVOID DataBlockObject, - IN PDEVICE_OBJECT DeviceObject, - OUT PUNICODE_STRING InstanceName); - -NTKERNELAPI -NTSTATUS -NTAPI -IoWMIExecuteMethod( - IN PVOID DataBlockObject, - IN PUNICODE_STRING InstanceName, - IN ULONG MethodId, - IN ULONG InBufferSize, - IN OUT PULONG OutBufferSize, - IN OUT PUCHAR InOutBuffer); - -NTKERNELAPI -NTSTATUS -NTAPI -IoWMIHandleToInstanceName( - IN PVOID DataBlockObject, - IN HANDLE FileHandle, - OUT PUNICODE_STRING InstanceName); - -NTKERNELAPI -NTSTATUS -NTAPI -IoWMIOpenBlock( - IN GUID *DataBlockGuid, - IN ULONG DesiredAccess, - OUT PVOID *DataBlockObject); - -NTKERNELAPI -NTSTATUS -NTAPI -IoWMIQueryAllData( - IN PVOID DataBlockObject, - IN OUT ULONG *InOutBufferSize, - OUT PVOID OutBuffer); - -NTKERNELAPI -NTSTATUS -NTAPI -IoWMIQueryAllDataMultiple( - IN PVOID *DataBlockObjectList, - IN ULONG ObjectCount, - IN OUT ULONG *InOutBufferSize, - OUT PVOID OutBuffer); - -NTKERNELAPI -NTSTATUS -NTAPI -IoWMIQuerySingleInstance( - IN PVOID DataBlockObject, - IN PUNICODE_STRING InstanceName, - IN OUT ULONG *InOutBufferSize, - OUT PVOID OutBuffer); - -NTKERNELAPI -NTSTATUS -NTAPI -IoWMIQuerySingleInstanceMultiple( - IN PVOID *DataBlockObjectList, - IN PUNICODE_STRING InstanceNames, - IN ULONG ObjectCount, - IN OUT ULONG *InOutBufferSize, - OUT PVOID OutBuffer); - -NTKERNELAPI -NTSTATUS -NTAPI -IoWMIRegistrationControl( - IN PDEVICE_OBJECT DeviceObject, - IN ULONG Action); - -NTKERNELAPI -NTSTATUS -NTAPI -IoWMISetNotificationCallback( - IN PVOID Object, - IN WMI_NOTIFICATION_CALLBACK Callback, - IN PVOID Context); - -NTKERNELAPI -NTSTATUS -NTAPI -IoWMISetSingleInstance( - IN PVOID DataBlockObject, - IN PUNICODE_STRING InstanceName, - IN ULONG Version, - IN ULONG ValueBufferSize, - IN PVOID ValueBuffer); - -NTKERNELAPI -NTSTATUS -NTAPI -IoWMISetSingleItem( - IN PVOID DataBlockObject, - IN PUNICODE_STRING InstanceName, - IN ULONG DataItemId, - IN ULONG Version, - IN ULONG ValueBufferSize, - IN PVOID ValueBuffer); - -NTKERNELAPI -NTSTATUS -NTAPI -IoWMISuggestInstanceName( - IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL, - IN PUNICODE_STRING SymbolicLinkName OPTIONAL, - IN BOOLEAN CombineNames, - OUT PUNICODE_STRING SuggestedInstanceName); - -NTKERNELAPI -NTSTATUS -NTAPI -IoWMIWriteEvent( - IN PVOID WnodeEventItem); - -NTKERNELAPI -VOID -NTAPI -IoWriteErrorLogEntry( - IN PVOID ElEntry); NTKERNELAPI NTSTATUS @@ -2997,56 +2821,7 @@ IN PDEVICE_OBJECT DeviceObject, IN struct _DRIVE_LAYOUT_INFORMATION_EX *PartitionBuffer); - - /** Kernel routines **/ - -#if defined (_M_AMD64) -NTKERNELAPI -VOID -FASTCALL -KeAcquireInStackQueuedSpinLock( - IN PKSPIN_LOCK SpinLock, - IN PKLOCK_QUEUE_HANDLE LockHandle); - -NTKERNELAPI -VOID -FASTCALL -KeReleaseInStackQueuedSpinLock( - IN PKLOCK_QUEUE_HANDLE LockHandle); -#else -NTHALAPI -VOID -FASTCALL -KeAcquireInStackQueuedSpinLock( - IN PKSPIN_LOCK SpinLock, - IN PKLOCK_QUEUE_HANDLE LockHandle); - -NTHALAPI -VOID -FASTCALL -KeReleaseInStackQueuedSpinLock( - IN PKLOCK_QUEUE_HANDLE LockHandle); -#endif - -NTKERNELAPI -VOID -FASTCALL -KeAcquireInStackQueuedSpinLockAtDpcLevel( - IN PKSPIN_LOCK SpinLock, - IN PKLOCK_QUEUE_HANDLE LockHandle); - -NTKERNELAPI -KIRQL -NTAPI -KeAcquireInterruptSpinLock( - IN PKINTERRUPT Interrupt); - -NTKERNELAPI -BOOLEAN -NTAPI -KeAreApcsDisabled( - VOID); NTKERNELAPI DECLSPEC_NORETURN @@ -3054,144 +2829,6 @@ NTAPI KeBugCheck( IN ULONG BugCheckCode); - -NTKERNELAPI -DECLSPEC_NORETURN -VOID -NTAPI -KeBugCheckEx( - IN ULONG BugCheckCode, - IN ULONG_PTR BugCheckParameter1, - IN ULONG_PTR BugCheckParameter2, - IN ULONG_PTR BugCheckParameter3, - IN ULONG_PTR BugCheckParameter4); - -NTKERNELAPI -BOOLEAN -NTAPI -KeCancelTimer( - IN PKTIMER Timer); - -NTKERNELAPI -VOID -NTAPI -KeClearEvent( - IN PRKEVENT Event); - -NTKERNELAPI -NTSTATUS -NTAPI -KeDelayExecutionThread( - IN KPROCESSOR_MODE WaitMode, - IN BOOLEAN Alertable, - IN PLARGE_INTEGER Interval); - -NTKERNELAPI -BOOLEAN -NTAPI -KeDeregisterBugCheckCallback( - IN PKBUGCHECK_CALLBACK_RECORD CallbackRecord); - -NTKERNELAPI -VOID -NTAPI -KeEnterCriticalRegion( - VOID); - -/* - * VOID - * KeFlushIoBuffers( - * IN PMDL Mdl, - * IN BOOLEAN ReadOperation, - * IN BOOLEAN DmaOperation) - */ -#define KeFlushIoBuffers(_Mdl, _ReadOperation, _DmaOperation) - -#define ExAcquireSpinLock(Lock, OldIrql) KeAcquireSpinLock((Lock), (OldIrql)) -#define ExReleaseSpinLock(Lock, OldIrql) KeReleaseSpinLock((Lock), (OldIrql)) -#define ExAcquireSpinLockAtDpcLevel(Lock) KeAcquireSpinLockAtDpcLevel(Lock) -#define ExReleaseSpinLockFromDpcLevel(Lock) KeReleaseSpinLockFromDpcLevel(Lock) - -NTKERNELAPI -VOID -NTAPI -KeFlushQueuedDpcs( - VOID -); - -NTHALAPI -VOID -NTAPI -KeFlushWriteBuffer(VOID); - -NTKERNELAPI -ULONG -NTAPI -KeGetRecommendedSharedDataAlignment( - VOID); - -NTKERNELAPI -VOID -NTAPI -KeInitializeDeviceQueue( - IN PKDEVICE_QUEUE DeviceQueue); - -NTKERNELAPI -VOID -NTAPI -KeInitializeMutex( - IN PRKMUTEX Mutex, - IN ULONG Level); - -NTKERNELAPI -VOID -NTAPI -KeInitializeSemaphore( - IN PRKSEMAPHORE Semaphore, - IN LONG Count, - IN LONG Limit); - -NTKERNELAPI -VOID -NTAPI -KeInitializeTimer( - IN PKTIMER Timer); - -NTKERNELAPI -VOID -NTAPI -KeInitializeTimerEx( - IN PKTIMER Timer, - IN TIMER_TYPE Type); - -NTKERNELAPI -BOOLEAN -NTAPI -KeInsertByKeyDeviceQueue( - IN PKDEVICE_QUEUE DeviceQueue, - IN PKDEVICE_QUEUE_ENTRY DeviceQueueEntry, - IN ULONG SortKey); - -NTKERNELAPI -BOOLEAN -NTAPI -KeInsertDeviceQueue( - IN PKDEVICE_QUEUE DeviceQueue, - IN PKDEVICE_QUEUE_ENTRY DeviceQueueEntry); - -NTKERNELAPI -BOOLEAN -NTAPI -KeInsertQueueDpc( - IN PRKDPC Dpc, - IN PVOID SystemArgument1, - IN PVOID SystemArgument2); - -NTKERNELAPI -VOID -NTAPI -KeLeaveCriticalRegion( - VOID); #ifdef _X86_
14 years, 9 months
1
0
0
0
[cwittich] 45806: [XMLLITE] sync xmllite to wine 1.1.39
by cwittich@svn.reactos.org
Author: cwittich Date: Wed Mar 3 22:02:05 2010 New Revision: 45806 URL:
http://svn.reactos.org/svn/reactos?rev=45806&view=rev
Log: [XMLLITE] sync xmllite to wine 1.1.39 Added: trunk/reactos/dll/win32/xmllite/reader.c (with props) Modified: trunk/reactos/dll/win32/xmllite/xmllite.rbuild trunk/reactos/dll/win32/xmllite/xmllite.spec Added: trunk/reactos/dll/win32/xmllite/reader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/xmllite/reader.c…
============================================================================== --- trunk/reactos/dll/win32/xmllite/reader.c (added) +++ trunk/reactos/dll/win32/xmllite/reader.c [iso-8859-1] Wed Mar 3 22:02:05 2010 @@ -1,0 +1,493 @@ +/* + * IXmlReader implementation + * + * Copyright 2010 Nikolay Sivov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS + +#include <stdarg.h> +#include "windef.h" +#include "winbase.h" +#include "initguid.h" +#include "objbase.h" +#include "xmllite.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(xmllite); + +/* not defined in public headers */ +DEFINE_GUID(IID_IXmlReaderInput, 0x0b3ccc9b, 0x9214, 0x428b, 0xa2, 0xae, 0xef, 0x3a, 0xa8, 0x71, 0xaf, 0xda); + +static HRESULT xmlreaderinput_query_for_stream(IXmlReaderInput *iface, void **pObj); + +typedef struct _xmlreader +{ + const IXmlReaderVtbl *lpVtbl; + LONG ref; + IXmlReaderInput *input; + ISequentialStream *stream;/* stored as sequential stream, cause currently + optimizations possible with IStream aren't implemented */ + XmlReadState state; + UINT line, pos; /* reader position in XML stream */ +} xmlreader; + +typedef struct _xmlreaderinput +{ + const IUnknownVtbl *lpVtbl; + LONG ref; + IUnknown *input; /* reference passed on IXmlReaderInput creation */ +} xmlreaderinput; + +static inline xmlreader *impl_from_IXmlReader(IXmlReader *iface) +{ + return (xmlreader *)((char*)iface - FIELD_OFFSET(xmlreader, lpVtbl)); +} + +static inline xmlreaderinput *impl_from_IXmlReaderInput(IXmlReaderInput *iface) +{ + return (xmlreaderinput *)((char*)iface - FIELD_OFFSET(xmlreaderinput, lpVtbl)); +} + +static HRESULT WINAPI xmlreader_QueryInterface(IXmlReader *iface, REFIID riid, void** ppvObject) +{ + xmlreader *This = impl_from_IXmlReader(iface); + + TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IXmlReader)) + { + *ppvObject = iface; + } + else + { + FIXME("interface %s not implemented\n", debugstr_guid(riid)); + return E_NOINTERFACE; + } + + IXmlReader_AddRef(iface); + + return S_OK; +} + +static ULONG WINAPI xmlreader_AddRef(IXmlReader *iface) +{ + xmlreader *This = impl_from_IXmlReader(iface); + TRACE("%p\n", This); + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI xmlreader_Release(IXmlReader *iface) +{ + xmlreader *This = impl_from_IXmlReader(iface); + LONG ref; + + TRACE("%p\n", This); + + ref = InterlockedDecrement(&This->ref); + if (ref == 0) + { + if (This->input) IUnknown_Release(This->input); + if (This->stream) IUnknown_Release(This->stream); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +static HRESULT WINAPI xmlreader_SetInput(IXmlReader* iface, IUnknown *input) +{ + xmlreader *This = impl_from_IXmlReader(iface); + HRESULT hr; + + TRACE("(%p %p)\n", This, input); + + if (This->input) + { + IUnknown_Release(This->input); + This->input = NULL; + } + + if (This->stream) + { + IUnknown_Release(This->stream); + This->stream = NULL; + } + + This->line = This->pos = 0; + + /* just reset current input */ + if (!input) + { + This->state = XmlReadState_Initial; + return S_OK; + } + + /* now try IXmlReaderInput, ISequentialStream, IStream */ + hr = IUnknown_QueryInterface(input, &IID_IXmlReaderInput, (void**)&This->input); + if (hr != S_OK) + { + /* create IXmlReaderInput basing on supplied interface */ + hr = CreateXmlReaderInputWithEncodingName(input, + NULL, NULL, FALSE, NULL, &This->input); + if (hr != S_OK) return hr; + } + + /* set stream for supplied IXmlReaderInput */ + hr = xmlreaderinput_query_for_stream(This->input, (void**)&This->stream); + if (hr == S_OK) + This->state = XmlReadState_Initial; + + return hr; +} + +static HRESULT WINAPI xmlreader_GetProperty(IXmlReader* iface, UINT property, LONG_PTR *value) +{ + xmlreader *This = impl_from_IXmlReader(iface); + + TRACE("(%p %u %p)\n", This, property, value); + + if (!value) return E_INVALIDARG; + + switch (property) + { + case XmlReaderProperty_ReadState: + *value = This->state; + break; + default: + FIXME("Unimplemented property (%u)\n", property); + return E_NOTIMPL; + } + + return S_OK; +} + +static HRESULT WINAPI xmlreader_SetProperty(IXmlReader* iface, UINT property, LONG_PTR value) +{ + FIXME("(%p %u %lu): stub\n", iface, property, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_Read(IXmlReader* iface, XmlNodeType *node_type) +{ + FIXME("(%p %p): stub\n", iface, node_type); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetNodeType(IXmlReader* iface, XmlNodeType *node_type) +{ + FIXME("(%p %p): stub\n", iface, node_type); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_MoveToFirstAttribute(IXmlReader* iface) +{ + FIXME("(%p): stub\n", iface); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_MoveToNextAttribute(IXmlReader* iface) +{ + FIXME("(%p): stub\n", iface); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_MoveToAttributeByName(IXmlReader* iface, + LPCWSTR local_name, + LPCWSTR namespaceUri) +{ + FIXME("(%p %p %p): stub\n", iface, local_name, namespaceUri); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_MoveToElement(IXmlReader* iface) +{ + FIXME("(%p): stub\n", iface); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetQualifiedName(IXmlReader* iface, LPCWSTR *qualifiedName, + UINT *qualifiedName_length) +{ + FIXME("(%p %p %p): stub\n", iface, qualifiedName, qualifiedName_length); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetNamespaceUri(IXmlReader* iface, + LPCWSTR *namespaceUri, + UINT *namespaceUri_length) +{ + FIXME("(%p %p %p): stub\n", iface, namespaceUri, namespaceUri_length); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetLocalName(IXmlReader* iface, + LPCWSTR *local_name, + UINT *local_name_length) +{ + FIXME("(%p %p %p): stub\n", iface, local_name, local_name_length); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetPrefix(IXmlReader* iface, + LPCWSTR *prefix, + UINT *prefix_length) +{ + FIXME("(%p %p %p): stub\n", iface, prefix, prefix_length); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetValue(IXmlReader* iface, + LPCWSTR *value, + UINT *value_length) +{ + FIXME("(%p %p %p): stub\n", iface, value, value_length); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_ReadValueChunk(IXmlReader* iface, + WCHAR *buffer, + UINT chunk_size, + UINT *read) +{ + FIXME("(%p %p %u %p): stub\n", iface, buffer, chunk_size, read); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetBaseUri(IXmlReader* iface, + LPCWSTR *baseUri, + UINT *baseUri_length) +{ + FIXME("(%p %p %p): stub\n", iface, baseUri, baseUri_length); + return E_NOTIMPL; +} + +static BOOL WINAPI xmlreader_IsDefault(IXmlReader* iface) +{ + FIXME("(%p): stub\n", iface); + return E_NOTIMPL; +} + +static BOOL WINAPI xmlreader_IsEmptyElement(IXmlReader* iface) +{ + FIXME("(%p): stub\n", iface); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetLineNumber(IXmlReader* iface, UINT *lineNumber) +{ + xmlreader *This = impl_from_IXmlReader(iface); + + TRACE("(%p %p)\n", This, lineNumber); + + if (!lineNumber) return E_INVALIDARG; + + *lineNumber = This->line; + + return S_OK; +} + +static HRESULT WINAPI xmlreader_GetLinePosition(IXmlReader* iface, UINT *linePosition) +{ + xmlreader *This = impl_from_IXmlReader(iface); + + TRACE("(%p %p)\n", This, linePosition); + + if (!linePosition) return E_INVALIDARG; + + *linePosition = This->pos; + + return S_OK; +} + +static HRESULT WINAPI xmlreader_GetAttributeCount(IXmlReader* iface, UINT *attributeCount) +{ + FIXME("(%p %p): stub\n", iface, attributeCount); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetDepth(IXmlReader* iface, UINT *depth) +{ + FIXME("(%p %p): stub\n", iface, depth); + return E_NOTIMPL; +} + +static BOOL WINAPI xmlreader_IsEOF(IXmlReader* iface) +{ + FIXME("(%p): stub\n", iface); + return E_NOTIMPL; +} + +static const struct IXmlReaderVtbl xmlreader_vtbl = +{ + xmlreader_QueryInterface, + xmlreader_AddRef, + xmlreader_Release, + xmlreader_SetInput, + xmlreader_GetProperty, + xmlreader_SetProperty, + xmlreader_Read, + xmlreader_GetNodeType, + xmlreader_MoveToFirstAttribute, + xmlreader_MoveToNextAttribute, + xmlreader_MoveToAttributeByName, + xmlreader_MoveToElement, + xmlreader_GetQualifiedName, + xmlreader_GetNamespaceUri, + xmlreader_GetLocalName, + xmlreader_GetPrefix, + xmlreader_GetValue, + xmlreader_ReadValueChunk, + xmlreader_GetBaseUri, + xmlreader_IsDefault, + xmlreader_IsEmptyElement, + xmlreader_GetLineNumber, + xmlreader_GetLinePosition, + xmlreader_GetAttributeCount, + xmlreader_GetDepth, + xmlreader_IsEOF +}; + +/** IXmlReaderInput **/ + +/* Queries already stored interface for IStream/ISequentialStream. + Interface supplied on creation will be overwritten */ +static HRESULT xmlreaderinput_query_for_stream(IXmlReaderInput *iface, void **pObj) +{ + xmlreaderinput *This = impl_from_IXmlReaderInput(iface); + HRESULT hr; + + hr = IUnknown_QueryInterface(This->input, &IID_IStream, pObj); + if (hr != S_OK) + hr = IUnknown_QueryInterface(This->input, &IID_ISequentialStream, pObj); + + return hr; +} + +static HRESULT WINAPI xmlreaderinput_QueryInterface(IXmlReaderInput *iface, REFIID riid, void** ppvObject) +{ + xmlreaderinput *This = impl_from_IXmlReaderInput(iface); + + TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject); + + if (IsEqualGUID(riid, &IID_IXmlReaderInput) || + IsEqualGUID(riid, &IID_IUnknown)) + { + *ppvObject = iface; + } + else + { + FIXME("interface %s not implemented\n", debugstr_guid(riid)); + return E_NOINTERFACE; + } + + IUnknown_AddRef(iface); + + return S_OK; +} + +static ULONG WINAPI xmlreaderinput_AddRef(IXmlReaderInput *iface) +{ + xmlreaderinput *This = impl_from_IXmlReaderInput(iface); + TRACE("%p\n", This); + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI xmlreaderinput_Release(IXmlReaderInput *iface) +{ + xmlreaderinput *This = impl_from_IXmlReaderInput(iface); + LONG ref; + + TRACE("%p\n", This); + + ref = InterlockedDecrement(&This->ref); + if (ref == 0) + { + if (This->input) IUnknown_Release(This->input); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +static const struct IUnknownVtbl xmlreaderinput_vtbl = +{ + xmlreaderinput_QueryInterface, + xmlreaderinput_AddRef, + xmlreaderinput_Release +}; + +HRESULT WINAPI CreateXmlReader(REFIID riid, void **pObject, IMalloc *pMalloc) +{ + xmlreader *reader; + + TRACE("(%s, %p, %p)\n", wine_dbgstr_guid(riid), pObject, pMalloc); + + if (pMalloc) FIXME("custom IMalloc not supported yet\n"); + + if (!IsEqualGUID(riid, &IID_IXmlReader)) + { + ERR("Unexpected IID requested -> (%s)\n", wine_dbgstr_guid(riid)); + return E_FAIL; + } + + reader = HeapAlloc(GetProcessHeap(), 0, sizeof (*reader)); + if(!reader) return E_OUTOFMEMORY; + + reader->lpVtbl = &xmlreader_vtbl; + reader->ref = 1; + reader->stream = NULL; + reader->input = NULL; + reader->state = XmlReadState_Closed; + reader->line = reader->pos = 0; + + *pObject = &reader->lpVtbl; + + TRACE("returning iface %p\n", *pObject); + + return S_OK; +} + +HRESULT WINAPI CreateXmlReaderInputWithEncodingName(IUnknown *stream, + IMalloc *pMalloc, + LPCWSTR encoding, + BOOL hint, + LPCWSTR base_uri, + IXmlReaderInput **ppInput) +{ + xmlreaderinput *readerinput; + + FIXME("%p %p %s %d %s %p: stub\n", stream, pMalloc, wine_dbgstr_w(encoding), + hint, wine_dbgstr_w(base_uri), ppInput); + + if (!stream || !ppInput) return E_INVALIDARG; + + readerinput = HeapAlloc(GetProcessHeap(), 0, sizeof (*readerinput)); + if(!readerinput) return E_OUTOFMEMORY; + + readerinput->lpVtbl = &xmlreaderinput_vtbl; + readerinput->ref = 1; + IUnknown_QueryInterface(stream, &IID_IUnknown, (void**)&readerinput->input); + + *ppInput = (IXmlReaderInput*)&readerinput->lpVtbl; + + TRACE("returning iface %p\n", *ppInput); + + return S_OK; +} Propchange: trunk/reactos/dll/win32/xmllite/reader.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/xmllite/xmllite.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/xmllite/xmllite.…
============================================================================== --- trunk/reactos/dll/win32/xmllite/xmllite.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/xmllite/xmllite.rbuild [iso-8859-1] Wed Mar 3 22:02:05 2010 @@ -4,5 +4,6 @@ <include base="ReactOS">include/reactos/wine</include> <define name="__WINESRC__" /> <library>wine</library> + <file>reader.c</file> <file>xmllite_main.c</file> </module> Modified: trunk/reactos/dll/win32/xmllite/xmllite.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/xmllite/xmllite.…
============================================================================== --- trunk/reactos/dll/win32/xmllite/xmllite.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/xmllite/xmllite.spec [iso-8859-1] Wed Mar 3 22:02:05 2010 @@ -1,6 +1,6 @@ -@ stub CreateXmlReader +@ stdcall CreateXmlReader(ptr ptr ptr) @ stub CreateXmlReaderInputWithEncodingCodePage -@ stub CreateXmlReaderInputWithEncodingName +@ stdcall CreateXmlReaderInputWithEncodingName(ptr ptr ptr long ptr ptr) @ stub CreateXmlWriter @ stub CreateXmlWriterOutputWithEncodingCodePage @ stub CreateXmlWriterOutputWithEncodingName
14 years, 9 months
1
0
0
0
[cwittich] 45805: [PSDK] add xmllite.idl from wine 1.1.39
by cwittich@svn.reactos.org
Author: cwittich Date: Wed Mar 3 22:01:57 2010 New Revision: 45805 URL:
http://svn.reactos.org/svn/reactos?rev=45805&view=rev
Log: [PSDK] add xmllite.idl from wine 1.1.39 Added: trunk/reactos/include/psdk/xmllite.idl (with props) Modified: trunk/reactos/include/psdk/psdk.rbuild Modified: trunk/reactos/include/psdk/psdk.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/psdk.rbuild?r…
============================================================================== --- trunk/reactos/include/psdk/psdk.rbuild [iso-8859-1] (original) +++ trunk/reactos/include/psdk/psdk.rbuild [iso-8859-1] Wed Mar 3 22:01:57 2010 @@ -66,6 +66,7 @@ <file>comcat.idl</file> <file>xmldso.idl</file> <file>xmldom.idl</file> + <file>xmllite.idl</file> </module> <module name="stdole2" type="embeddedtypelib"> <file>stdole2.idl</file> Added: trunk/reactos/include/psdk/xmllite.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/xmllite.idl?r…
============================================================================== --- trunk/reactos/include/psdk/xmllite.idl (added) +++ trunk/reactos/include/psdk/xmllite.idl [iso-8859-1] Wed Mar 3 22:01:57 2010 @@ -1,0 +1,111 @@ +/* + * Copyright (C) 2010 Nikolay Sivov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "objidl.idl"; +import "oaidl.idl"; + +typedef enum XmlNodeType { + XmlNodeType_None = 0, + XmlNodeType_Element = 1, + XmlNodeType_Attribute = 2, + XmlNodeType_Text = 3, + XmlNodeType_CDATA = 4, + XmlNodeType_ProcessingInstruction = 7, + XmlNodeType_Comment = 8, + XmlNodeType_DocumentType = 10, + XmlNodeType_Whitespace = 13, + XmlNodeType_EndElement = 15, + XmlNodeType_XmlDeclaration = 17, + _XmlNodeType_Last = 17 +} XmlNodeType; + +/* IXmlReader */ +[ + local, + object, + uuid(7279fc81-709d-4095-b63d-69fe4b0d9030), + pointer_default(unique) +] +interface IXmlReader : IUnknown +{ + HRESULT SetInput( [in] IUnknown *input); + HRESULT GetProperty( [in] UINT property, [out] LONG_PTR *value); + HRESULT SetProperty( [in] UINT property, [in] LONG_PTR value); + HRESULT Read( [out] XmlNodeType *node_type); + HRESULT GetNodeType( [out] XmlNodeType *node_type); + HRESULT MoveToFirstAttribute(void); + HRESULT MoveToNextAttribute(void); + HRESULT MoveToAttributeByName( [in] LPCWSTR local_name, + [in] LPCWSTR namespaceUri); + HRESULT MoveToElement(void); + HRESULT GetQualifiedName( [out] LPCWSTR *qualifiedName, + [out] UINT *qualifiedName_length); + HRESULT GetNamespaceUri( [out] LPCWSTR *namespaceUri, + [out] UINT *nnamespaceUri_length); + HRESULT GetLocalName( [out] LPCWSTR *local_name, + [out] UINT *locale_name_length); + HRESULT GetPrefix( [out] LPCWSTR *prefix, + [out] UINT *prefix_length); + HRESULT GetValue( [out] LPCWSTR *value, + [out] UINT *value_length); + HRESULT ReadValueChunk( [out] WCHAR *buffer, + [in] UINT chunk_size, + [in,out] UINT *read); + HRESULT GetBaseUri( [out] LPCWSTR *baseUri, + [out] UINT *baseUri_length); + BOOL IsDefault(void); + BOOL IsEmptyElement(void); + HRESULT GetLineNumber( [out] UINT *lineNumber); + HRESULT GetLinePosition( [out] UINT *linePosition); + HRESULT GetAttributeCount( [out] UINT *attributeCount); + HRESULT GetDepth( [out] UINT *depth); + BOOL IsEOF(void); +} + +/* IXmlReader state */ +cpp_quote("typedef enum XmlReadState") +cpp_quote("{") +cpp_quote(" XmlReadState_Initial = 0,") +cpp_quote(" XmlReadState_Interactive = 1,") +cpp_quote(" XmlReadState_Error = 2,") +cpp_quote(" XmlReadState_EndOfFile = 3,") +cpp_quote(" XmlReadState_Closed = 4") +cpp_quote("} XmlReadState;") + +/* IXmlReader properties */ +cpp_quote("typedef enum XmlReaderProperty") +cpp_quote("{") +cpp_quote(" XmlReaderProperty_MultiLanguage = 0,") +cpp_quote(" XmlReaderProperty_ConformanceLevel = XmlReaderProperty_MultiLanguage + 1,") +cpp_quote(" XmlReaderProperty_RandomAccess = XmlReaderProperty_ConformanceLevel + 1,") +cpp_quote(" XmlReaderProperty_XmlResolver = XmlReaderProperty_RandomAccess + 1,") +cpp_quote(" XmlReaderProperty_DtdProcessing = XmlReaderProperty_XmlResolver + 1,") +cpp_quote(" XmlReaderProperty_ReadState = XmlReaderProperty_DtdProcessing + 1,") +cpp_quote(" XmlReaderProperty_MaxElementDepth = XmlReaderProperty_ReadState + 1,") +cpp_quote(" XmlReaderProperty_MaxEntityExpansion = XmlReaderProperty_MaxElementDepth + 1,") +cpp_quote(" _XmlReaderProperty_Last = XmlReaderProperty_MaxEntityExpansion") +cpp_quote("} XmlReaderProperty;") + +/* IXmlReader construction */ +cpp_quote("STDAPI CreateXmlReader(REFIID riid, void **ppvObject, IMalloc *pMalloc);") + +cpp_quote("typedef IUnknown IXmlReaderInput;") +cpp_quote("STDAPI CreateXmlReaderInputWithEncodingName(IUnknown *stream, IMalloc *pMalloc,") +cpp_quote(" LPCWSTR encoding, BOOL hint,") +cpp_quote(" LPCWSTR base_uri, IXmlReaderInput **ppInput);") Propchange: trunk/reactos/include/psdk/xmllite.idl ------------------------------------------------------------------------------ svn:eol-style = native
14 years, 9 months
1
0
0
0
[cwittich] 45804: [CRYPTNET] sync cryptnet to wine 1.1.39
by cwittich@svn.reactos.org
Author: cwittich Date: Wed Mar 3 21:55:41 2010 New Revision: 45804 URL:
http://svn.reactos.org/svn/reactos?rev=45804&view=rev
Log: [CRYPTNET] sync cryptnet to wine 1.1.39 Modified: trunk/reactos/dll/win32/cryptnet/cryptnet_main.c 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] Wed Mar 3 21:55:41 2010 @@ -40,6 +40,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(cryptnet); +#define IS_INTOID(x) (((ULONG_PTR)(x) >> 16) == 0) + BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); @@ -92,9 +94,7 @@ static const char *url_oid_to_str(LPCSTR oid) { - if (HIWORD(oid)) - return oid; - else + if (IS_INTOID(oid)) { static char buf[10]; @@ -115,6 +115,8 @@ return buf; } } + else + return oid; } typedef BOOL (WINAPI *UrlDllGetObjectUrlFunc)(LPCSTR, LPVOID, DWORD, @@ -124,18 +126,6 @@ LPVOID pvPara, DWORD dwFlags, PCRYPT_URL_ARRAY pUrlArray, DWORD *pcbUrlArray, PCRYPT_URL_INFO pUrlInfo, DWORD *pcbUrlInfo, LPVOID pvReserved) { - /* FIXME: This depends on the AIA (authority info access) extension being - * supported in crypt32. - */ - FIXME("\n"); - SetLastError(CRYPT_E_NOT_FOUND); - return FALSE; -} - -static BOOL WINAPI CRYPT_GetUrlFromCertificateCRLDistPoint(LPCSTR pszUrlOid, - LPVOID pvPara, DWORD dwFlags, PCRYPT_URL_ARRAY pUrlArray, DWORD *pcbUrlArray, - PCRYPT_URL_INFO pUrlInfo, DWORD *pcbUrlInfo, LPVOID pvReserved) -{ PCCERT_CONTEXT cert = pvPara; PCERT_EXTENSION ext; BOOL ret = FALSE; @@ -146,39 +136,37 @@ SetLastError(CRYPT_E_NOT_FOUND); return FALSE; } - if ((ext = CertFindExtension(szOID_CRL_DIST_POINTS, + if ((ext = CertFindExtension(szOID_AUTHORITY_INFO_ACCESS, cert->pCertInfo->cExtension, cert->pCertInfo->rgExtension))) { - CRL_DIST_POINTS_INFO *info; + CERT_AUTHORITY_INFO_ACCESS *aia; DWORD size; - ret = CryptDecodeObjectEx(X509_ASN_ENCODING, X509_CRL_DIST_POINTS, + ret = CryptDecodeObjectEx(X509_ASN_ENCODING, X509_AUTHORITY_INFO_ACCESS, ext->Value.pbData, ext->Value.cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, - &info, &size); + &aia, &size); if (ret) { DWORD i, cUrl, bytesNeeded = sizeof(CRYPT_URL_ARRAY); - for (i = 0, cUrl = 0; i < info->cDistPoint; i++) - if (info->rgDistPoint[i].DistPointName.dwDistPointNameChoice - == CRL_DIST_POINT_FULL_NAME) - { - DWORD j; - CERT_ALT_NAME_INFO *name = - &info->rgDistPoint[i].DistPointName.u.FullName; - - for (j = 0; j < name->cAltEntry; j++) - if (name->rgAltEntry[j].dwAltNameChoice == - CERT_ALT_NAME_URL) + for (i = 0, cUrl = 0; i < aia->cAccDescr; i++) + if (!strcmp(aia->rgAccDescr[i].pszAccessMethod, + szOID_PKIX_CA_ISSUERS)) + { + if (aia->rgAccDescr[i].AccessLocation.dwAltNameChoice == + CERT_ALT_NAME_URL) + { + if (aia->rgAccDescr[i].AccessLocation.u.pwszURL) { - if (name->rgAltEntry[j].u.pwszURL) - { - cUrl++; - bytesNeeded += sizeof(LPWSTR) + - (lstrlenW(name->rgAltEntry[j].u.pwszURL) + 1) - * sizeof(WCHAR); - } + cUrl++; + bytesNeeded += sizeof(LPWSTR) + + (lstrlenW(aia->rgAccDescr[i].AccessLocation.u. + pwszURL) + 1) * sizeof(WCHAR); } + } + else + FIXME("unsupported alt name type %d\n", + aia->rgAccDescr[i].AccessLocation.dwAltNameChoice); } if (!pcbUrlArray) { @@ -203,28 +191,22 @@ (LPWSTR *)((BYTE *)pUrlArray + sizeof(CRYPT_URL_ARRAY)); nextUrl = (LPWSTR)((BYTE *)pUrlArray + sizeof(CRYPT_URL_ARRAY) + cUrl * sizeof(LPWSTR)); - for (i = 0; i < info->cDistPoint; i++) - if (info->rgDistPoint[i].DistPointName.dwDistPointNameChoice - == CRL_DIST_POINT_FULL_NAME) + for (i = 0; i < aia->cAccDescr; i++) + if (!strcmp(aia->rgAccDescr[i].pszAccessMethod, + szOID_PKIX_CA_ISSUERS)) { - DWORD j; - CERT_ALT_NAME_INFO *name = - &info->rgDistPoint[i].DistPointName.u.FullName; - - for (j = 0; j < name->cAltEntry; j++) - if (name->rgAltEntry[j].dwAltNameChoice == - CERT_ALT_NAME_URL) + if (aia->rgAccDescr[i].AccessLocation.dwAltNameChoice + == CERT_ALT_NAME_URL) + { + if (aia->rgAccDescr[i].AccessLocation.u.pwszURL) { - if (name->rgAltEntry[j].u.pwszURL) - { - lstrcpyW(nextUrl, - name->rgAltEntry[j].u.pwszURL); - pUrlArray->rgwszUrl[pUrlArray->cUrl++] = - nextUrl; - nextUrl += - (lstrlenW(name->rgAltEntry[j].u.pwszURL) + 1); - } + lstrcpyW(nextUrl, + aia->rgAccDescr[i].AccessLocation.u.pwszURL); + pUrlArray->rgwszUrl[pUrlArray->cUrl++] = + nextUrl; + nextUrl += (lstrlenW(nextUrl) + 1); } + } } } if (ret) @@ -247,9 +229,139 @@ } } } - LocalFree(info); - } - } + LocalFree(aia); + } + } + else + SetLastError(CRYPT_E_NOT_FOUND); + return ret; +} + +static BOOL CRYPT_GetUrlFromCRLDistPointsExt(const CRYPT_DATA_BLOB *value, + PCRYPT_URL_ARRAY pUrlArray, DWORD *pcbUrlArray, PCRYPT_URL_INFO pUrlInfo, + DWORD *pcbUrlInfo) +{ + BOOL ret; + CRL_DIST_POINTS_INFO *info; + DWORD size; + + ret = CryptDecodeObjectEx(X509_ASN_ENCODING, X509_CRL_DIST_POINTS, + value->pbData, value->cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); + if (ret) + { + DWORD i, cUrl, bytesNeeded = sizeof(CRYPT_URL_ARRAY); + + for (i = 0, cUrl = 0; i < info->cDistPoint; i++) + if (info->rgDistPoint[i].DistPointName.dwDistPointNameChoice + == CRL_DIST_POINT_FULL_NAME) + { + DWORD j; + CERT_ALT_NAME_INFO *name = + &info->rgDistPoint[i].DistPointName.u.FullName; + + for (j = 0; j < name->cAltEntry; j++) + if (name->rgAltEntry[j].dwAltNameChoice == + CERT_ALT_NAME_URL) + { + if (name->rgAltEntry[j].u.pwszURL) + { + cUrl++; + bytesNeeded += sizeof(LPWSTR) + + (lstrlenW(name->rgAltEntry[j].u.pwszURL) + 1) + * sizeof(WCHAR); + } + } + } + if (!pcbUrlArray) + { + SetLastError(E_INVALIDARG); + ret = FALSE; + } + else if (!pUrlArray) + *pcbUrlArray = bytesNeeded; + else if (*pcbUrlArray < bytesNeeded) + { + SetLastError(ERROR_MORE_DATA); + *pcbUrlArray = bytesNeeded; + ret = FALSE; + } + else + { + LPWSTR nextUrl; + + *pcbUrlArray = bytesNeeded; + pUrlArray->cUrl = 0; + pUrlArray->rgwszUrl = + (LPWSTR *)((BYTE *)pUrlArray + sizeof(CRYPT_URL_ARRAY)); + nextUrl = (LPWSTR)((BYTE *)pUrlArray + sizeof(CRYPT_URL_ARRAY) + + cUrl * sizeof(LPWSTR)); + for (i = 0; i < info->cDistPoint; i++) + if (info->rgDistPoint[i].DistPointName.dwDistPointNameChoice + == CRL_DIST_POINT_FULL_NAME) + { + DWORD j; + CERT_ALT_NAME_INFO *name = + &info->rgDistPoint[i].DistPointName.u.FullName; + + for (j = 0; j < name->cAltEntry; j++) + if (name->rgAltEntry[j].dwAltNameChoice == + CERT_ALT_NAME_URL) + { + if (name->rgAltEntry[j].u.pwszURL) + { + lstrcpyW(nextUrl, + name->rgAltEntry[j].u.pwszURL); + pUrlArray->rgwszUrl[pUrlArray->cUrl++] = + nextUrl; + nextUrl += + (lstrlenW(name->rgAltEntry[j].u.pwszURL) + 1); + } + } + } + } + if (ret) + { + if (pcbUrlInfo) + { + FIXME("url info: stub\n"); + if (!pUrlInfo) + *pcbUrlInfo = sizeof(CRYPT_URL_INFO); + else if (*pcbUrlInfo < sizeof(CRYPT_URL_INFO)) + { + *pcbUrlInfo = sizeof(CRYPT_URL_INFO); + SetLastError(ERROR_MORE_DATA); + ret = FALSE; + } + else + { + *pcbUrlInfo = sizeof(CRYPT_URL_INFO); + memset(pUrlInfo, 0, sizeof(CRYPT_URL_INFO)); + } + } + } + LocalFree(info); + } + return ret; +} + +static BOOL WINAPI CRYPT_GetUrlFromCertificateCRLDistPoint(LPCSTR pszUrlOid, + LPVOID pvPara, DWORD dwFlags, PCRYPT_URL_ARRAY pUrlArray, DWORD *pcbUrlArray, + PCRYPT_URL_INFO pUrlInfo, DWORD *pcbUrlInfo, LPVOID pvReserved) +{ + PCCERT_CONTEXT cert = pvPara; + PCERT_EXTENSION ext; + BOOL ret = FALSE; + + /* The only applicable flag is CRYPT_GET_URL_FROM_EXTENSION */ + if (dwFlags && !(dwFlags & CRYPT_GET_URL_FROM_EXTENSION)) + { + SetLastError(CRYPT_E_NOT_FOUND); + return FALSE; + } + if ((ext = CertFindExtension(szOID_CRL_DIST_POINTS, + cert->pCertInfo->cExtension, cert->pCertInfo->rgExtension))) + ret = CRYPT_GetUrlFromCRLDistPointsExt(&ext->Value, pUrlArray, + pcbUrlArray, pUrlInfo, pcbUrlInfo); else SetLastError(CRYPT_E_NOT_FOUND); return ret; @@ -269,7 +381,7 @@ TRACE("(%s, %p, %08x, %p, %p, %p, %p, %p)\n", debugstr_a(pszUrlOid), pvPara, dwFlags, pUrlArray, pcbUrlArray, pUrlInfo, pcbUrlInfo, pvReserved); - if (!HIWORD(pszUrlOid)) + if (IS_INTOID(pszUrlOid)) { switch (LOWORD(pszUrlOid)) { @@ -566,7 +678,7 @@ } } if (ret) - object.cbData += bytesAvailable; + object.cbData += buffer.dwBufferLength; } else { @@ -1246,20 +1358,24 @@ if (!CertAddCertificateContextToStore(store, context, CERT_STORE_ADD_ALWAYS, NULL)) ret = FALSE; + CertFreeCertificateContext(context); break; case CERT_QUERY_CONTENT_CRL: if (!CertAddCRLContextToStore(store, context, CERT_STORE_ADD_ALWAYS, NULL)) ret = FALSE; + CertFreeCRLContext(context); break; case CERT_QUERY_CONTENT_CTL: if (!CertAddCTLContextToStore(store, context, CERT_STORE_ADD_ALWAYS, NULL)) ret = FALSE; + CertFreeCTLContext(context); break; default: CertAddStoreToCollection(store, contextStore, 0, 0); } + CertCloseStore(contextStore, 0); } else ret = FALSE; @@ -1284,7 +1400,7 @@ *pFunc = NULL; *phFunc = 0; - if (!HIWORD(pszObjectOid)) + if (IS_INTOID(pszObjectOid)) { switch (LOWORD(pszObjectOid)) { @@ -1354,7 +1470,7 @@ { BOOL ret; - if (!HIWORD(pszObjectOid)) + if (IS_INTOID(pszObjectOid)) { switch (LOWORD(pszObjectOid)) { @@ -1437,6 +1553,238 @@ return ret; } +static DWORD verify_cert_revocation_with_crl(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; + } + else + { + PCRL_ENTRY entry = NULL; + + CertFindCertificateInCRL(cert, crl, 0, NULL, &entry); + if (entry) + { + error = CRYPT_E_REVOKED; + pRevStatus->dwIndex = index; + } + else + 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, + PCERT_REVOCATION_STATUS pRevStatus) +{ + DWORD error = ERROR_SUCCESS, cbUrlArray; + + if (CRYPT_GetUrlFromCRLDistPointsExt(value, NULL, &cbUrlArray, NULL, NULL)) + { + CRYPT_URL_ARRAY *urlArray = CryptMemAlloc(cbUrlArray); + + if (urlArray) + { + DWORD j, retrievalFlags = 0, startTime, endTime, timeout; + BOOL ret; + + ret = CRYPT_GetUrlFromCRLDistPointsExt(value, urlArray, + &cbUrlArray, NULL, NULL); + if (dwFlags & CERT_VERIFY_CACHE_ONLY_BASED_REVOCATION) + retrievalFlags |= CRYPT_CACHE_ONLY_RETRIEVAL; + if (dwFlags & CERT_VERIFY_REV_ACCUMULATIVE_TIMEOUT_FLAG && + pRevPara && pRevPara->cbSize >= offsetof(CERT_REVOCATION_PARA, + dwUrlRetrievalTimeout) + sizeof(DWORD)) + { + startTime = GetTickCount(); + endTime = startTime + pRevPara->dwUrlRetrievalTimeout; + timeout = pRevPara->dwUrlRetrievalTimeout; + } + else + endTime = timeout = 0; + if (!ret) + error = GetLastError(); + for (j = 0; !error && j < urlArray->cUrl; j++) + { + PCCRL_CONTEXT crl; + + ret = CryptRetrieveObjectByUrlW(urlArray->rgwszUrl[j], + CONTEXT_OID_CRL, retrievalFlags, timeout, (void **)&crl, + NULL, NULL, NULL, NULL); + if (ret) + { + error = verify_cert_revocation_with_crl(cert, crl, index, + pTime, pRevStatus); + if (!error && timeout) + { + DWORD time = GetTickCount(); + + if ((int)(endTime - time) <= 0) + { + error = ERROR_TIMEOUT; + pRevStatus->dwIndex = index; + } + else + timeout = endTime - time; + } + CertFreeCRLContext(crl); + } + else + error = CRYPT_E_REVOCATION_OFFLINE; + } + CryptMemFree(urlArray); + } + else + { + error = ERROR_OUTOFMEMORY; + pRevStatus->dwIndex = index; + } + } + else + { + error = GetLastError(); + pRevStatus->dwIndex = index; + } + return error; +} + +static DWORD verify_cert_revocation_from_aia_ext( + const CRYPT_DATA_BLOB *value, PCCERT_CONTEXT cert, DWORD index, + FILETIME *pTime, DWORD dwFlags, PCERT_REVOCATION_PARA pRevPara, + PCERT_REVOCATION_STATUS pRevStatus) +{ + BOOL ret; + DWORD error, size; + CERT_AUTHORITY_INFO_ACCESS *aia; + + ret = CryptDecodeObjectEx(X509_ASN_ENCODING, X509_AUTHORITY_INFO_ACCESS, + value->pbData, value->cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, &aia, &size); + if (ret) + { + DWORD i; + + for (i = 0; i < aia->cAccDescr; i++) + if (!strcmp(aia->rgAccDescr[i].pszAccessMethod, + szOID_PKIX_OCSP)) + { + if (aia->rgAccDescr[i].AccessLocation.dwAltNameChoice == + CERT_ALT_NAME_URL) + FIXME("OCSP URL = %s\n", + debugstr_w(aia->rgAccDescr[i].AccessLocation.u.pwszURL)); + else + FIXME("unsupported AccessLocation type %d\n", + aia->rgAccDescr[i].AccessLocation.dwAltNameChoice); + } + LocalFree(aia); + /* FIXME: lie and pretend OCSP validated the cert */ + error = ERROR_SUCCESS; + } + else + error = GetLastError(); + return error; +} + +static DWORD verify_cert_revocation(PCCERT_CONTEXT cert, DWORD index, + FILETIME *pTime, DWORD dwFlags, PCERT_REVOCATION_PARA pRevPara, + PCERT_REVOCATION_STATUS pRevStatus) +{ + DWORD error = ERROR_SUCCESS; + PCERT_EXTENSION ext; + + if ((ext = CertFindExtension(szOID_CRL_DIST_POINTS, + cert->pCertInfo->cExtension, cert->pCertInfo->rgExtension))) + error = verify_cert_revocation_from_dist_points_ext(&ext->Value, cert, + index, pTime, dwFlags, pRevPara, pRevStatus); + else if ((ext = CertFindExtension(szOID_AUTHORITY_INFO_ACCESS, + cert->pCertInfo->cExtension, cert->pCertInfo->rgExtension))) + error = verify_cert_revocation_from_aia_ext(&ext->Value, cert, + index, pTime, dwFlags, pRevPara, pRevStatus); + else + { + if (pRevPara && pRevPara->hCrlStore && pRevPara->pIssuerCert) + { + PCCRL_CONTEXT crl = NULL; + BOOL canSignCRLs; + + /* If the caller told us about the issuer, make sure the issuer + * can sign CRLs before looking for one. + */ + if ((ext = CertFindExtension(szOID_KEY_USAGE, + pRevPara->pIssuerCert->pCertInfo->cExtension, + pRevPara->pIssuerCert->pCertInfo->rgExtension))) + { + CRYPT_BIT_BLOB usage; + DWORD size = sizeof(usage); + + if (!CryptDecodeObjectEx(cert->dwCertEncodingType, X509_BITS, + ext->Value.pbData, ext->Value.cbData, + CRYPT_DECODE_NOCOPY_FLAG, NULL, &usage, &size)) + canSignCRLs = FALSE; + else if (usage.cbData > 2) + { + /* The key usage extension only defines 9 bits => no more + * than 2 bytes are needed to encode all known usages. + */ + canSignCRLs = FALSE; + } + else + { + BYTE usageBits = usage.pbData[usage.cbData - 1]; + + canSignCRLs = usageBits & CERT_CRL_SIGN_KEY_USAGE; + } + } + else + canSignCRLs = TRUE; + if (canSignCRLs) + { + /* If the caller was helpful enough to tell us where to find a + * CRL for the cert, look for one and check it. + */ + crl = CertFindCRLInStore(pRevPara->hCrlStore, + cert->dwCertEncodingType, + CRL_FIND_ISSUED_BY_SIGNATURE_FLAG | + CRL_FIND_ISSUED_BY_AKI_FLAG, + CRL_FIND_ISSUED_BY, pRevPara->pIssuerCert, NULL); + } + if (crl) + { + error = verify_cert_revocation_with_crl(cert, crl, index, + pTime, pRevStatus); + CertFreeCRLContext(crl); + } + else + { + error = CRYPT_E_NO_REVOCATION_CHECK; + pRevStatus->dwIndex = index; + } + } + else + { + error = CRYPT_E_NO_REVOCATION_CHECK; + pRevStatus->dwIndex = index; + } + } + return error; +} + +typedef struct _CERT_REVOCATION_PARA_NO_EXTRA_FIELDS { + DWORD cbSize; + PCCERT_CONTEXT pIssuerCert; + DWORD cCertStore; + HCERTSTORE *rgCertStore; + HCERTSTORE hCrlStore; + LPFILETIME pftTimeToUse; +} CERT_REVOCATION_PARA_NO_EXTRA_FIELDS, *PCERT_REVOCATION_PARA_NO_EXTRA_FIELDS; + typedef struct _OLD_CERT_REVOCATION_STATUS { DWORD cbSize; DWORD dwIndex; @@ -1452,7 +1800,8 @@ PCERT_REVOCATION_PARA pRevPara, PCERT_REVOCATION_STATUS pRevStatus) { DWORD error = 0, i; - BOOL ret; + FILETIME now; + LPFILETIME pTime = NULL; TRACE("(%08x, %d, %d, %p, %08x, %p, %p)\n", dwEncodingType, dwRevType, cContext, rgpvContext, dwFlags, pRevPara, pRevStatus); @@ -1463,106 +1812,33 @@ SetLastError(E_INVALIDARG); return FALSE; } + if (!cContext) + { + SetLastError(E_INVALIDARG); + return FALSE; + } + if (pRevPara && pRevPara->cbSize >= + sizeof(CERT_REVOCATION_PARA_NO_EXTRA_FIELDS)) + pTime = pRevPara->pftTimeToUse; + if (!pTime) + { + GetSystemTimeAsFileTime(&now); + pTime = &now; + } memset(&pRevStatus->dwIndex, 0, pRevStatus->cbSize - sizeof(DWORD)); if (dwRevType != CERT_CONTEXT_REVOCATION_TYPE) - { error = CRYPT_E_NO_REVOCATION_CHECK; - ret = FALSE; - } else { - ret = TRUE; - for (i = 0; ret && i < cContext; i++) - { - DWORD cbUrlArray; - - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, - rgpvContext[i], 0, NULL, &cbUrlArray, NULL, NULL, NULL); - if (!ret && GetLastError() == CRYPT_E_NOT_FOUND) - { - error = CRYPT_E_NO_REVOCATION_CHECK; - pRevStatus->dwIndex = i; - } - else if (ret) - { - CRYPT_URL_ARRAY *urlArray = CryptMemAlloc(cbUrlArray); - - if (urlArray) - { - DWORD j, retrievalFlags = 0, startTime, endTime, timeout; - - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, - rgpvContext[i], 0, urlArray, &cbUrlArray, NULL, NULL, - NULL); - if (dwFlags & CERT_VERIFY_CACHE_ONLY_BASED_REVOCATION) - retrievalFlags |= CRYPT_CACHE_ONLY_RETRIEVAL; - if (dwFlags & CERT_VERIFY_REV_ACCUMULATIVE_TIMEOUT_FLAG && - pRevPara->cbSize >= offsetof(CERT_REVOCATION_PARA, - dwUrlRetrievalTimeout) + sizeof(DWORD)) - { - startTime = GetTickCount(); - endTime = startTime + pRevPara->dwUrlRetrievalTimeout; - timeout = pRevPara->dwUrlRetrievalTimeout; - } - else - endTime = timeout = 0; - for (j = 0; ret && j < urlArray->cUrl; j++) - { - PCCRL_CONTEXT crl; - - ret = CryptRetrieveObjectByUrlW(urlArray->rgwszUrl[j], - CONTEXT_OID_CRL, retrievalFlags, timeout, - (void **)&crl, NULL, NULL, NULL, NULL); - if (ret) - { - PCRL_ENTRY entry = NULL; - - CertFindCertificateInCRL( - rgpvContext[i], crl, 0, NULL, - &entry); - if (entry) - { - error = CRYPT_E_REVOKED; - pRevStatus->dwIndex = i; - ret = FALSE; - } - else if (timeout) - { - DWORD time = GetTickCount(); - - if ((int)(endTime - time) <= 0) - { - error = ERROR_TIMEOUT; - pRevStatus->dwIndex = i; - ret = FALSE; - } - else - timeout = endTime - time; - } - CertFreeCRLContext(crl); - } - else - error = CRYPT_E_REVOCATION_OFFLINE; - } - CryptMemFree(urlArray); - } - else - { - error = ERROR_OUTOFMEMORY; - pRevStatus->dwIndex = i; - ret = FALSE; - } - } - else - pRevStatus->dwIndex = i; - } - } - - if (!ret) + for (i = 0; !error && i < cContext; i++) + error = verify_cert_revocation(rgpvContext[i], i, pTime, dwFlags, + pRevPara, pRevStatus); + } + if (error) { SetLastError(error); pRevStatus->dwError = error; } - TRACE("returning %d (%08x)\n", ret, error); - return ret; -} + TRACE("returning %d (%08x)\n", !error, error); + return !error; +}
14 years, 9 months
1
0
0
0
[cwittich] 45803: [CRYPTUI] sync cryptui to wine 1.1.39
by cwittich@svn.reactos.org
Author: cwittich Date: Wed Mar 3 21:55:29 2010 New Revision: 45803 URL:
http://svn.reactos.org/svn/reactos?rev=45803&view=rev
Log: [CRYPTUI] sync cryptui to wine 1.1.39 Modified: trunk/reactos/dll/win32/cryptui/cryptui.rc trunk/reactos/dll/win32/cryptui/cryptui_De.rc trunk/reactos/dll/win32/cryptui/cryptui_En.rc trunk/reactos/dll/win32/cryptui/cryptui_Fr.rc trunk/reactos/dll/win32/cryptui/cryptui_Ko.rc trunk/reactos/dll/win32/cryptui/cryptui_Lt.rc trunk/reactos/dll/win32/cryptui/cryptui_Nl.rc trunk/reactos/dll/win32/cryptui/cryptui_Pt.rc trunk/reactos/dll/win32/cryptui/cryptuires.h trunk/reactos/dll/win32/cryptui/main.c Modified: trunk/reactos/dll/win32/cryptui/cryptui.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptui.…
============================================================================== --- trunk/reactos/dll/win32/cryptui/cryptui.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cryptui/cryptui.rc [iso-8859-1] Wed Mar 3 21:55:29 2010 @@ -46,10 +46,13 @@ /* @makedep: certheader.bmp */ IDB_CERT_HEADER BITMAP LOADONCALL DISCARDABLE certheader.bmp +#include "cryptui_En.rc" +#include "cryptui_Ko.rc" + +/* UTF-8 */ #include "cryptui_De.rc" -#include "cryptui_En.rc" #include "cryptui_Fr.rc" -#include "cryptui_Ko.rc" #include "cryptui_Lt.rc" #include "cryptui_Nl.rc" #include "cryptui_Pt.rc" + Modified: trunk/reactos/dll/win32/cryptui/cryptui_De.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptui_…
============================================================================== --- trunk/reactos/dll/win32/cryptui/cryptui_De.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cryptui/cryptui_De.rc [iso-8859-1] Wed Mar 3 21:55:29 2010 @@ -119,6 +119,7 @@ IDS_WARN_REMOVE_DEFAULT "Sind Sie sicher, dass Sie dieses Zertifikat entfernen möchten?" IDS_WARN_REMOVE_PLURAL_DEFAULT "Sind Sie sicher, dass Sie diese Zertifikate entfernen möchten?" IDS_CERT_MGR "Zertifikate" + IDS_FRIENDLY_NAME_NONE "<Keiner>" IDS_PURPOSE_SERVER_AUTH "Garantiert die Identität eines entfernten Computers" IDS_PURPOSE_CLIENT_AUTH "Beweist Ihre Identität für einen entfernten Computers" IDS_PURPOSE_CODE_SIGNING "Schützt Software vor Manipulation nach der Veröffentlichung" Modified: trunk/reactos/dll/win32/cryptui/cryptui_En.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptui_…
============================================================================== --- trunk/reactos/dll/win32/cryptui/cryptui_En.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cryptui/cryptui_En.rc [iso-8859-1] Wed Mar 3 21:55:29 2010 @@ -31,7 +31,7 @@ IDS_CERT_INFO_UNTRUSTED_ROOT "This certificate could not be validated to a trusted root certificate." IDS_CERT_INFO_PARTIAL_CHAIN "This certificate's issuer could not be found." IDS_CERT_INFO_BAD_PURPOSES "All the intended purposes of this certificate could not be verified." - IDS_CERT_INFO_PURPOSES "This cerificate is intended for the following purposes:" + IDS_CERT_INFO_PURPOSES "This certificate is intended for the following purposes:" IDS_SUBJECT_HEADING "Issued to: " IDS_ISSUER_HEADING "Issued by: " IDS_VALID_FROM "Valid from " @@ -117,6 +117,7 @@ IDS_WARN_REMOVE_DEFAULT "Are you sure you want to remove this certificate?" IDS_WARN_REMOVE_PLURAL_DEFAULT "Are you sure you want to remove these certificates?" IDS_CERT_MGR "Certificates" + IDS_FRIENDLY_NAME_NONE "<None>" IDS_PURPOSE_SERVER_AUTH "Ensures the identify of a remote computer" IDS_PURPOSE_CLIENT_AUTH "Proves your identity to a remote computer" IDS_PURPOSE_CODE_SIGNING "Ensures software came from software publisher\nProtects software from alteration after publication" Modified: trunk/reactos/dll/win32/cryptui/cryptui_Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptui_…
============================================================================== --- trunk/reactos/dll/win32/cryptui/cryptui_Fr.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cryptui/cryptui_Fr.rc [iso-8859-1] Wed Mar 3 21:55:29 2010 @@ -120,6 +120,7 @@ IDS_WARN_REMOVE_DEFAULT "Voulez-vous réellement supprimer ce certificat ?" IDS_WARN_REMOVE_PLURAL_DEFAULT "Voulez-vous réellement supprimer ces certificats ?" IDS_CERT_MGR "Certificats" + IDS_FRIENDLY_NAME_NONE "<Aucun>" IDS_PURPOSE_SERVER_AUTH "Prouve l'identité d'un ordinateur distant" IDS_PURPOSE_CLIENT_AUTH "Prouve votre identité à un ordinateur distant" IDS_PURPOSE_CODE_SIGNING "Garantit que des logiciels proviennent bien d'un éditeur de logiciels donné\nProtège le logiciel contre toute altération après publication" @@ -464,4 +465,3 @@ LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END -#pragma code_page(default) Modified: trunk/reactos/dll/win32/cryptui/cryptui_Ko.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptui_…
============================================================================== --- trunk/reactos/dll/win32/cryptui/cryptui_Ko.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cryptui/cryptui_Ko.rc [iso-8859-1] Wed Mar 3 21:55:29 2010 @@ -118,6 +118,7 @@ IDS_WARN_REMOVE_DEFAULT "ÀÌ ÀÎÁõ°Å¸¦ Á¦°ÅÇϱ⸦ ¿øÇմϱî?" IDS_WARN_REMOVE_PLURAL_DEFAULT "ÀÌ ÀÎÁõ¼µé¸¦ Á¦°ÅÇϱ⸦ ¿øÇմϱî?" IDS_CERT_MGR "ÀÎÁõ¼" + IDS_FRIENDLY_NAME_NONE "<¾øÀ½>" IDS_PURPOSE_SERVER_AUTH "¿ø°Ý ÄÄÇ»ÅÍÀÇ µ¿Àϼº º¸Áõ" IDS_PURPOSE_CLIENT_AUTH "´ç½ÅÀÇ ½Å¿øÀ» ¿ø°ÝÄÄÇ»ÅÍ·Î ÀÎÁõ" IDS_PURPOSE_CODE_SIGNING "¼ÒÇÁÆ®¿þ¾î ¹ßÇàÀڷκÎÅÍ ¿Â ¼ÒÇÁÆ®¿þ¾î º¸Áõ\n¹ßÇàµÈ ÈÄÀÇ ¼ÒÇÁÆ®¿þ¾î¸¦ °³Á¶·ÎºÎÅÍ º¸È£" Modified: trunk/reactos/dll/win32/cryptui/cryptui_Lt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptui_…
============================================================================== --- trunk/reactos/dll/win32/cryptui/cryptui_Lt.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cryptui/cryptui_Lt.rc [iso-8859-1] Wed Mar 3 21:55:29 2010 @@ -120,6 +120,7 @@ IDS_WARN_REMOVE_DEFAULT "Ar tikrai norite paÅ¡alinti šį liudijimÄ ?" IDS_WARN_REMOVE_PLURAL_DEFAULT "Ar tikrai norite paÅ¡alinti Å¡iuos liudijimus?" IDS_CERT_MGR "Liudijimai" + IDS_FRIENDLY_NAME_NONE "<joks>" IDS_PURPOSE_SERVER_AUTH "Garantuoja nutolusio kompiuterio tapatumÄ " IDS_PURPOSE_CLIENT_AUTH "Ä®rodo jÅ«sų tapatumÄ nutolusiam kompiuteriui" IDS_PURPOSE_CODE_SIGNING "Garantuoja, kad programinÄ Ä¯ranga yra iÅ¡ Å¡io leidÄjo\nApsaugo programinÄ Ä¯rangÄ nuo pakeitimų po iÅ¡leidimo" Modified: trunk/reactos/dll/win32/cryptui/cryptui_Nl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptui_…
============================================================================== --- trunk/reactos/dll/win32/cryptui/cryptui_Nl.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cryptui/cryptui_Nl.rc [iso-8859-1] Wed Mar 3 21:55:29 2010 @@ -119,6 +119,7 @@ IDS_WARN_REMOVE_DEFAULT "Weet u zeker dat u dit certificaat wilt verwijderen?" IDS_WARN_REMOVE_PLURAL_DEFAULT "Weet u zeker dat u deze certificaten wilt verwijderen?" IDS_CERT_MGR "Certificaten" + IDS_FRIENDLY_NAME_NONE "<Geen>" IDS_PURPOSE_SERVER_AUTH "Bewijst de identiteit van een remote computer" IDS_PURPOSE_CLIENT_AUTH "Bewijst uw identiteit aan een remote computer" IDS_PURPOSE_CODE_SIGNING "Bewijst dat de software kwam van de software uitgever\nBeschermt software tegen wijzigingen na publicatie" Modified: trunk/reactos/dll/win32/cryptui/cryptui_Pt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptui_…
============================================================================== --- trunk/reactos/dll/win32/cryptui/cryptui_Pt.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cryptui/cryptui_Pt.rc [iso-8859-1] Wed Mar 3 21:55:29 2010 @@ -119,6 +119,7 @@ IDS_WARN_REMOVE_DEFAULT "Tem a certeza que deseja remover este certificado?" IDS_WARN_REMOVE_PLURAL_DEFAULT "Tem a certeza que deseja remover estes certificados?" IDS_CERT_MGR "Certificados" + IDS_FRIENDLY_NAME_NONE "<Nenhum>" IDS_PURPOSE_SERVER_AUTH "Assegura a identidade de um computador remoto" IDS_PURPOSE_CLIENT_AUTH "Prova a sua identidade a um computador remoto" IDS_PURPOSE_CODE_SIGNING "Assegura que o software veio de uma editora de software\nProtege o software de alterações após publicação" Modified: trunk/reactos/dll/win32/cryptui/cryptuires.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptuir…
============================================================================== --- trunk/reactos/dll/win32/cryptui/cryptuires.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cryptui/cryptuires.h [iso-8859-1] Wed Mar 3 21:55:29 2010 @@ -116,6 +116,7 @@ #define IDS_WARN_REMOVE_DEFAULT 1092 #define IDS_WARN_REMOVE_PLURAL_DEFAULT 1093 #define IDS_CERT_MGR 1094 +#define IDS_FRIENDLY_NAME_NONE 1095 #define IDS_PURPOSE_SERVER_AUTH 1100 #define IDS_PURPOSE_CLIENT_AUTH 1101 Modified: trunk/reactos/dll/win32/cryptui/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/main.c?r…
============================================================================== --- trunk/reactos/dll/win32/cryptui/main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cryptui/main.c [iso-8859-1] Wed Mar 3 21:55:29 2010 @@ -104,6 +104,7 @@ WCHAR dateFmt[80]; /* sufficient for LOCALE_SSHORTDATE */ WCHAR date[80]; SYSTEMTIME sysTime; + LPWSTR none; item.mask = LVIF_IMAGE | LVIF_PARAM | LVIF_TEXT; item.iItem = SendMessageW(lv, LVM_GETITEMCOUNT, 0, 0); @@ -155,8 +156,9 @@ item.iSubItem = 2; SendMessageW(lv, LVM_SETITEMTEXTW, item.iItem, (LPARAM)&item); - len = CertGetNameStringW(cert, CERT_NAME_FRIENDLY_DISPLAY_TYPE, 0, NULL, - NULL, 0); + if (!CertGetCertificateContextProperty(cert, CERT_FRIENDLY_NAME_PROP_ID, + NULL, &len)) + len = LoadStringW(hInstance, IDS_FRIENDLY_NAME_NONE, (LPWSTR)&none, 0); if (len > *allocatedLen) { HeapFree(GetProcessHeap(), 0, *str); @@ -166,9 +168,11 @@ } if (*str) { - CertGetNameStringW(cert, CERT_NAME_FRIENDLY_DISPLAY_TYPE, 0, NULL, - *str, len); - item.pszText = *str; + if (!CertGetCertificateContextProperty(cert, CERT_FRIENDLY_NAME_PROP_ID, + *str, &len)) + item.pszText = none; + else + item.pszText = *str; item.iSubItem = 3; SendMessageW(lv, LVM_SETITEMTEXTW, item.iItem, (LPARAM)&item); } @@ -348,6 +352,8 @@ return advancedUsage; } +static int CALLBACK cert_mgr_sort_by_subject(LPARAM lp1, LPARAM lp2, LPARAM lp); + static void show_store_certs(HWND hwnd, HCERTSTORE store) { HWND lv = GetDlgItem(hwnd, IDC_MGR_CERTS); @@ -443,6 +449,8 @@ HeapFree(GetProcessHeap(), 0, advanced->rgpszUsageIdentifier); HeapFree(GetProcessHeap(), 0, advanced); } + SendMessageW(lv, LVM_SORTITEMSEX, (WPARAM)lv, + (LPARAM)cert_mgr_sort_by_subject); } static const WCHAR my[] = { 'M','y',0 }; @@ -1062,6 +1070,48 @@ } } +static int cert_mgr_sort_by_text(HWND lv, int col, int index1, int index2) +{ + LVITEMW item; + WCHAR buf1[MAX_STRING_LEN]; + WCHAR buf2[MAX_STRING_LEN]; + + item.cchTextMax = sizeof(buf1) / sizeof(buf1[0]); + item.mask = LVIF_TEXT; + item.pszText = buf1; + item.iItem = index1; + item.iSubItem = col; + SendMessageW(lv, LVM_GETITEMW, 0, (LPARAM)&item); + item.pszText = buf2; + item.iItem = index2; + SendMessageW(lv, LVM_GETITEMW, 0, (LPARAM)&item); + return strcmpW(buf1, buf2); +} + +static int CALLBACK cert_mgr_sort_by_subject(LPARAM lp1, LPARAM lp2, LPARAM lp) +{ + return cert_mgr_sort_by_text((HWND)lp, 0, lp1, lp2); +} + +static int CALLBACK cert_mgr_sort_by_issuer(LPARAM lp1, LPARAM lp2, LPARAM lp) +{ + return cert_mgr_sort_by_text((HWND)lp, 1, lp1, lp2); +} + +static int CALLBACK cert_mgr_sort_by_date(LPARAM lp1, LPARAM lp2, LPARAM lp) +{ + PCCERT_CONTEXT cert1 = (PCCERT_CONTEXT)lp1; + PCCERT_CONTEXT cert2 = (PCCERT_CONTEXT)lp2; + return CompareFileTime(&cert1->pCertInfo->NotAfter, + &cert2->pCertInfo->NotAfter); +} + +static int CALLBACK cert_mgr_sort_by_friendly_name(LPARAM lp1, LPARAM lp2, + LPARAM lp) +{ + return cert_mgr_sort_by_text((HWND)lp, 3, lp1, lp2); +} + static LRESULT CALLBACK cert_mgr_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) { @@ -1139,6 +1189,35 @@ if (lvk->wVKey == VK_DELETE) cert_mgr_do_remove(hwnd); + break; + } + case LVN_COLUMNCLICK: + { + NMLISTVIEW *nmlv = (NMLISTVIEW *)lp; + HWND lv = GetDlgItem(hwnd, IDC_MGR_CERTS); + + /* FIXME: doesn't support swapping sort order between ascending + * and descending. + */ + switch (nmlv->iSubItem) + { + case 0: + SendMessageW(lv, LVM_SORTITEMSEX, (WPARAM)lv, + (LPARAM)cert_mgr_sort_by_subject); + break; + case 1: + SendMessageW(lv, LVM_SORTITEMSEX, (WPARAM)lv, + (LPARAM)cert_mgr_sort_by_issuer); + break; + case 2: + SendMessageW(lv, LVM_SORTITEMS, 0, + (LPARAM)cert_mgr_sort_by_date); + break; + case 3: + SendMessageW(lv, LVM_SORTITEMSEX, (WPARAM)lv, + (LPARAM)cert_mgr_sort_by_friendly_name); + break; + } break; } } @@ -1385,7 +1464,7 @@ static void free_store_info(HWND tree) { HTREEITEM next = (HTREEITEM)SendMessageW(tree, TVM_GETNEXTITEM, TVGN_CHILD, - (LPARAM)NULL); + 0); while (next) { @@ -1473,7 +1552,7 @@ { HWND tree = GetDlgItem(hwnd, IDC_STORE_LIST); HTREEITEM selection = (HTREEITEM)SendMessageW(tree, - TVM_GETNEXTITEM, TVGN_CARET, (LPARAM)NULL); + TVM_GETNEXTITEM, TVGN_CARET, 0); selectInfo = (struct SelectStoreInfo *)GetWindowLongPtrW(hwnd, DWLP_USER); @@ -4034,8 +4113,7 @@ memset(&item, 0, sizeof(item)); item.mask = TVIF_HANDLE | TVIF_PARAM; - item.hItem = (HTREEITEM)SendMessageW(tree, TVM_GETNEXTITEM, TVGN_CARET, - (LPARAM)NULL); + item.hItem = (HTREEITEM)SendMessageW(tree, TVM_GETNEXTITEM, TVGN_CARET, 0); SendMessageW(tree, TVM_GETITEMW, 0, (LPARAM)&item); data = get_hierarchy_data_from_tree_item(tree, item.hItem); selection = lparam_to_index(data, item.lParam); @@ -4137,7 +4215,7 @@ memset(&item, 0, sizeof(item)); item.mask = TVIF_HANDLE | TVIF_PARAM; item.hItem = (HTREEITEM)SendMessageW(tree, TVM_GETNEXTITEM, TVGN_ROOT, - (LPARAM)NULL); + 0); data = get_hierarchy_data_from_tree_item(tree, item.hItem); /* Delete the contents of the tree */ SendMessageW(tree, TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT);
14 years, 9 months
1
0
0
0
[cwittich] 45802: [CRYPT32] sync crypt32 to wine 1.1.39
by cwittich@svn.reactos.org
Author: cwittich Date: Wed Mar 3 21:55:13 2010 New Revision: 45802 URL:
http://svn.reactos.org/svn/reactos?rev=45802&view=rev
Log: [CRYPT32] sync crypt32 to wine 1.1.39 Added: trunk/reactos/dll/win32/crypt32/crypt32_Uk.rc (with props) Modified: trunk/reactos/dll/win32/crypt32/chain.c trunk/reactos/dll/win32/crypt32/crypt32.rc trunk/reactos/dll/win32/crypt32/crypt32_Fr.rc trunk/reactos/dll/win32/crypt32/crypt32_private.h trunk/reactos/dll/win32/crypt32/decode.c trunk/reactos/dll/win32/crypt32/encode.c trunk/reactos/dll/win32/crypt32/object.c trunk/reactos/dll/win32/crypt32/oid.c trunk/reactos/dll/win32/crypt32/store.c Modified: trunk/reactos/dll/win32/crypt32/chain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/chain.c?…
============================================================================== --- trunk/reactos/dll/win32/crypt32/chain.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/chain.c [iso-8859-1] Wed Mar 3 21:55:13 2010 @@ -686,8 +686,12 @@ authority_end = strchrW(name, '?'); if (!authority_end) authority_end = name + strlenW(name); - /* Remove any port number from the authority */ - for (colon = authority_end; colon >= name && *colon != ':'; colon--) + /* Remove any port number from the authority. The userinfo portion + * of an authority may contain a colon, so stop if a userinfo portion + * is found (indicated by '@'). + */ + for (colon = authority_end; colon >= name && *colon != ':' && + *colon != '@'; colon--) ; if (*colon == ':') authority_end = colon; @@ -3376,7 +3380,7 @@ TRACE("(%s, %p, %p, %p)\n", debugstr_a(szPolicyOID), pChainContext, pPolicyPara, pPolicyStatus); - if (!HIWORD(szPolicyOID)) + if (IS_INTOID(szPolicyOID)) { switch (LOWORD(szPolicyOID)) { Modified: trunk/reactos/dll/win32/crypt32/crypt32.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crypt32.…
============================================================================== --- trunk/reactos/dll/win32/crypt32/crypt32.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/crypt32.rc [iso-8859-1] Wed Mar 3 21:55:13 2010 @@ -24,13 +24,16 @@ #include "version.rc" +#include "crypt32_En.rc" +#include "crypt32_Ko.rc" + +/* UTF-8 */ #include "crypt32_De.rc" -#include "crypt32_En.rc" #include "crypt32_Fr.rc" -#include "crypt32_Ko.rc" #include "crypt32_Lt.rc" #include "crypt32_Nl.rc" #include "crypt32_No.rc" #include "crypt32_Pt.rc" #include "crypt32_Ro.rc" #include "crypt32_Sv.rc" +#include "crypt32_Uk.rc" Modified: trunk/reactos/dll/win32/crypt32/crypt32_Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crypt32_…
============================================================================== --- trunk/reactos/dll/win32/crypt32/crypt32_Fr.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/crypt32_Fr.rc [iso-8859-1] Wed Mar 3 21:55:13 2010 @@ -242,4 +242,3 @@ IDS_NETSCAPE_SMIME_CA "AC S/MIME" IDS_NETSCAPE_SIGN_CA "Signature CA" } -#pragma code_page(default) Added: trunk/reactos/dll/win32/crypt32/crypt32_Uk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crypt32_…
============================================================================== --- trunk/reactos/dll/win32/crypt32/crypt32_Uk.rc (added) +++ trunk/reactos/dll/win32/crypt32/crypt32_Uk.rc [iso-8859-1] Wed Mar 3 21:55:13 2010 @@ -1,0 +1,247 @@ +/* + * crypt32 dll resources + * + * Copyright (C) 2006 Juan Lang + * + * Ukrainian language support + * Copyright (C) 2010 igor Paliychuk + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "cryptres.h" + +/* UTF-8 */ +#pragma code_page(65001) + +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT + +STRINGTABLE DISCARDABLE +{ + IDS_AUTHORITY_KEY_ID "Authority Key Identifier" + IDS_KEY_ATTRIBUTES "ÐлаÑÑивоÑÑÑ ÐлÑÑа" + IDS_KEY_USAGE_RESTRICTION "Key Usage Restriction" + IDS_SUBJECT_ALT_NAME "Subject Alternative Name" + IDS_ISSUER_ALT_NAME "Issuer Alternative Name" + IDS_BASIC_CONSTRAINTS "ÐÑÐ½Ð¾Ð²Ð½Ñ ÐбмеженнÑ" + IDS_KEY_USAGE "ÐикоÑиÑÑÐ°Ð½Ð½Ñ ÐлÑÑа" + IDS_CERT_POLICIES "ÐолÑÑика СеÑÑиÑÑкаÑÑв" + IDS_SUBJECT_KEY_IDENTIFIER "Subject Key Identifier" + IDS_CRL_REASON_CODE "CRL Reason Code" + IDS_CRL_DIST_POINTS "CRL Distribution Points" + IDS_ENHANCED_KEY_USAGE "РозÑиÑене ÐикоÑиÑÑÐ°Ð½Ð½Ñ ÐлÑÑа" + IDS_AUTHORITY_INFO_ACCESS "Authority Information Access" + IDS_CERT_EXTENSIONS "РозÑиÑÐµÐ½Ð½Ñ Ð¡ÐµÑÑиÑÑкаÑÑв" + IDS_NEXT_UPDATE_LOCATION "Next Update Location" + IDS_YES_OR_NO_TRUST "Yes or No Trust" + IDS_EMAIL_ADDRESS "ÐдÑеÑа Ðл. ÐоÑÑи" + IDS_UNSTRUCTURED_NAME "Unstructured Name" + IDS_CONTENT_TYPE "Тип ÐмÑÑÑÑ" + IDS_MESSAGE_DIGEST "Message Digest" + IDS_SIGNING_TIME "Ð§Ð°Ñ ÐÑ Ð¾Ð´Ñ" + IDS_COUNTER_SIGN "Counter Sign" + IDS_CHALLENGE_PASSWORD "Challenge Password" + IDS_UNSTRUCTURED_ADDRESS "Unstructured Address" + IDS_SMIME_CAPABILITIES "SMIME Capabilities" + IDS_PREFER_SIGNED_DATA "Prefer Signed Data" + IDS_CPS "CPS" + IDS_USER_NOTICE "User Notice" + IDS_OCSP "On-line Certificate Status Protocol" + IDS_CA_ISSUER "Certification Authority Issuer" + IDS_CERT_TEMPLATE_NAME "Certification Template Name" + IDS_CERT_TYPE "Тип СеÑÑиÑÑкаÑÑ" + IDS_CERT_MANIFOLD "Certificate Manifold" + IDS_NETSCAPE_CERT_TYPE "Netscape Cert Type" + IDS_NETSCAPE_BASE_URL "Netscape Base URL" + IDS_NETSCAPE_REVOCATION_URL "Netscape Revocation URL" + IDS_NETSCAPE_CA_REVOCATION_URL "Netscape CA Revocation URL" + IDS_NETSCAPE_CERT_RENEWAL_URL "Netscape Cert Renewal URL" + IDS_NETSCAPE_CA_POLICY_URL "Netscape CA Policy URL" + IDS_NETSCAPE_SSL_SERVER_NAME "Netscape SSL ServerName" + IDS_NETSCAPE_COMMENT "Netscape ÐоменÑаÑ" + IDS_SPC_SP_AGENCY_INFO "SpcSpAgencyInfo" + IDS_SPC_FINANCIAL_CRITERIA "SpcFinancialCriteria" + IDS_SPC_MINIMAL_CRITERIA "SpcMinimalCriteria" + IDS_COUNTRY "ÐÑаÑна/РегÑон" + IDS_ORGANIZATION "ÐÑганÑзаÑÑÑ" + IDS_ORGANIZATIONAL_UNIT "Organizational Unit" + IDS_COMMON_NAME "Common Name" + IDS_LOCALITY "Locality" + IDS_STATE_OR_PROVINCE "State or Province" + IDS_TITLE "Title" + IDS_GIVEN_NAME "Given Name" + IDS_INITIALS "ÐнÑÑÑали" + IDS_SUR_NAME "Sur Name" + IDS_DOMAIN_COMPONENT "Domain Component" + IDS_STREET_ADDRESS "Street Address" + IDS_SERIAL_NUMBER "СеÑÑйний номеÑ" + IDS_CA_VERSION "CA Version" + IDS_CROSS_CA_VERSION "Cross CA Version" + IDS_SERIALIZED_SIG_SERIAL_NUMBER "Serialized Signature Serial Number" + IDS_PRINCIPAL_NAME "Principal Name" + IDS_WINDOWS_PRODUCT_UPDATE "Windows Product Update" + IDS_ENROLLMENT_NAME_VALUE_PAIR "Enrollment Name Value Pair" + IDS_OS_VERSION "OS Version" + IDS_ENROLLMENT_CSP "Enrollment CSP" + IDS_CRL_NUMBER "CRL Number" + IDS_DELTA_CRL_INDICATOR "Delta CRL Indicator" + IDS_ISSUING_DIST_POINT "Issuing Distribution Point" + IDS_FRESHEST_CRL "Freshest CRL" + IDS_NAME_CONSTRAINTS "Name Constraints" + IDS_POLICY_MAPPINGS "Policy Mappings" + IDS_POLICY_CONSTRAINTS "Policy Constraints" + IDS_CROSS_CERT_DIST_POINTS "Cross-Certificate Distribution Points" + IDS_APPLICATION_POLICIES "Application Policies" + IDS_APPLICATION_POLICY_MAPPINGS "Application Policy Mappings" + IDS_APPLICATION_POLICY_CONSTRAINTS "Application Policy Constraints" + IDS_CMC_DATA "CMC Data" + IDS_CMC_RESPONSE "CMC Response" + IDS_UNSIGNED_CMC_REQUEST "Unsigned CMC Request" + IDS_CMC_STATUS_INFO "CMC Status Info" + IDS_CMC_EXTENSIONS "CMC Extensions" + IDS_CMC_ATTRIBUTES "CMC Attributes" + IDS_PKCS_7_DATA "PKCS 7 Data" + IDS_PKCS_7_SIGNED "PKCS 7 Signed" + IDS_PKCS_7_ENVELOPED "PKCS 7 Enveloped" + IDS_PKCS_7_SIGNED_ENVELOPED "PKCS 7 Signed Enveloped" + IDS_PKCS_7_DIGESTED "PKCS 7 Digested" + IDS_PKCS_7_ENCRYPTED "PKCS 7 Encrypted" + IDS_PREVIOUS_CA_CERT_HASH "Previous CA Certificate Hash" + IDS_CRL_VIRTUAL_BASE "Virtual Base CRL Number" + IDS_CRL_NEXT_PUBLISH "Next CRL Publish" + IDS_CA_EXCHANGE "CA Encryption Certificate" + IDS_KEY_RECOVERY_AGENT "Key Recovery Agent" + IDS_CERTIFICATE_TEMPLATE "Certificate Template Information" + IDS_ENTERPRISE_ROOT_OID "Enterprise Root OID" + IDS_RDN_DUMMY_SIGNER "Dummy Signer" + IDS_ARCHIVED_KEY_ATTR "Encrypted Private Key" + IDS_CRL_SELF_CDP "Published CRL Locations" + IDS_REQUIRE_CERT_CHAIN_POLICY "Enforce Certificate Chain Policy" + IDS_TRANSACTION_ID "Transaction Id" + IDS_SENDER_NONCE "Sender Nonce" + IDS_RECIPIENT_NONCE "Recipient Nonce" + IDS_REG_INFO "Reg Info" + IDS_GET_CERTIFICATE "Get Certificate" + IDS_GET_CRL "Get CRL" + IDS_REVOKE_REQUEST "Revoke Request" + IDS_QUERY_PENDING "Query Pending" + IDS_SORTED_CTL "Certificate Trust List" + IDS_ARCHIVED_KEY_CERT_HASH "Archived Key Certificate Hash" + IDS_PRIVATE_KEY_USAGE_PERIOD "Private Key Usage Period" + IDS_CLIENT_INFORMATION "ÐлÑÑнÑÑÐºÑ ÐанÑ" + IDS_SERVER_AUTHENTICATION "Server Authentication" + IDS_CLIENT_AUTHENTICATION "Client Authentication" + IDS_CODE_SIGNING "Code Signing" + IDS_SECURE_EMAIL "Secure Email" + IDS_TIME_STAMPING "Time Stamping" + IDS_MICROSOFT_TRUST_LIST_SIGNING "Microsoft Trust List Signing" + IDS_MICROSOFT_TIME_STAMPING "Microsoft Time Stamping" + IDS_IPSEC_END_SYSTEM "IP security end system" + IDS_IPSEC_TUNNEL "IP security tunnel termination" + IDS_IPSEC_USER "IP security user" + IDS_EFS "Encrypting File System" + IDS_WHQL_CRYPTO "Windows Hardware Driver Verification" + IDS_NT5_CRYPTO "Windows System Component Verification" + IDS_OEM_WHQL_CRYPTO "OEM Windows System Component Verification" + IDS_EMBEDDED_NT_CRYPTO "Embedded Windows System Component Verification" + IDS_KEY_PACK_LICENSES "Key Pack Licenses" + IDS_LICENSE_SERVER "License Server Verification" + IDS_SMART_CARD_LOGON "Smart Card Logon" + IDS_DIGITAL_RIGHTS "Digital Rights" + IDS_QUALIFIED_SUBORDINATION "Qualified Subordination" + IDS_KEY_RECOVERY "Key Recovery" + IDS_DOCUMENT_SIGNING "Document Signing" + IDS_IPSEC_IKE_INTERMEDIATE "IP security IKE intermediate" + IDS_FILE_RECOVERY "File Recovery" + IDS_ROOT_LIST_SIGNER "Root List Signer" + IDS_ANY_APPLICATION_POLICIES "All application policies" + IDS_DS_EMAIL_REPLICATION "Directory Service Email Replication" + IDS_ENROLLMENT_AGENT "Certificate Request Agent" + IDS_LIFETIME_SIGNING "Lifetime Signing" + IDS_ANY_CERT_POLICY "All issuance policies" +} + +STRINGTABLE DISCARDABLE +{ + IDS_LOCALIZEDNAME_ROOT "Trusted Root Certification Authorities" + IDS_LOCALIZEDNAME_MY "Personal" + IDS_LOCALIZEDNAME_CA "Intermediate Certification Authorities" + IDS_LOCALIZEDNAME_ADDRESSBOOK "Other People" + IDS_LOCALIZEDNAME_TRUSTEDPUBLISHER "Trusted Publishers" + IDS_LOCALIZEDNAME_DISALLOWED "Untrusted Certificates" +} + +STRINGTABLE DISCARDABLE +{ + IDS_KEY_ID "KeyID=" + IDS_CERT_ISSUER "Certificate Issuer" + IDS_CERT_SERIAL_NUMBER "Certificate Serial Number=" + IDS_ALT_NAME_OTHER_NAME "ÐнÑе Ðм'Ñ=" + IDS_ALT_NAME_RFC822_NAME "ÐдÑеÑа Ðл. ÐоÑÑи=" + IDS_ALT_NAME_DNS_NAME "DNS Name=" + IDS_ALT_NAME_DIRECTORY_NAME "Directory Address" + IDS_ALT_NAME_URL "URL=" + IDS_ALT_NAME_IP_ADDRESS "IP ÐдÑеÑа=" + IDS_ALT_NAME_MASK "ÐаÑка=" + IDS_ALT_NAME_REGISTERED_ID "Registered ID=" + IDS_USAGE_UNKNOWN "Unknown Key Usage" + IDS_SUBJECT_TYPE "Subject Type=" + IDS_SUBJECT_TYPE_CA "CA" + IDS_SUBJECT_TYPE_END_CERT "End Entity" + IDS_PATH_LENGTH "Path Length Constraint=" + IDS_PATH_LENGTH_NONE "None" + IDS_INFO_NOT_AVAILABLE "Information Not Available" + IDS_AIA "Authority Info Access" + IDS_ACCESS_METHOD "Access Method=" + IDS_ACCESS_METHOD_OCSP "OCSP" + IDS_ACCESS_METHOD_CA_ISSUERS "CA Issuers" + IDS_ACCESS_METHOD_UNKNOWN "Unknown Access Method" + IDS_ACCESS_LOCATION "Alternative Name" + IDS_CRL_DIST_POINT "CRL Distribution Point" + IDS_CRL_DIST_POINT_NAME "Distribution Point Name" + IDS_CRL_DIST_POINT_FULL_NAME "Full Name" + IDS_CRL_DIST_POINT_RDN_NAME "RDN Name" + IDS_CRL_DIST_POINT_REASON "CRL Reason=" + IDS_CRL_DIST_POINT_ISSUER "CRL Issuer" + IDS_REASON_KEY_COMPROMISE "Key Compromise" + IDS_REASON_CA_COMPROMISE "CA Compromise" + IDS_REASON_AFFILIATION_CHANGED "Affiliation Changed" + IDS_REASON_SUPERSEDED "Superseded" + IDS_REASON_CESSATION_OF_OPERATION "Operation Ceased" + IDS_REASON_CERTIFICATE_HOLD "Certificate Hold" + IDS_FINANCIAL_CRITERIA "ФÑнанÑÐ¾Ð²Ñ ÐанÑ=" + IDS_FINANCIAL_CRITERIA_AVAILABLE "Available" + IDS_FINANCIAL_CRITERIA_NOT_AVAILABLE "Not Available" + IDS_FINANCIAL_CRITERIA_MEETS_CRITERIA "Meets Criteria=" + IDS_YES "Yes" + IDS_NO "No" + IDS_DIGITAL_SIGNATURE "ЦиÑÑовий ÐÑдпиÑ" + IDS_NON_REPUDIATION "Non-Repudiation" + IDS_KEY_ENCIPHERMENT "Key Encipherment" + IDS_DATA_ENCIPHERMENT "Data Encipherment" + IDS_KEY_AGREEMENT "Key Agreement" + IDS_CERT_SIGN "Certificate Signing" + IDS_OFFLINE_CRL_SIGN "Off-line CRL Signing" + IDS_CRL_SIGN "CRL Signing" + IDS_ENCIPHER_ONLY "Encipher Only" + IDS_DECIPHER_ONLY "Decipher Only" + IDS_NETSCAPE_SSL_CLIENT "SSL Client Authentication" + IDS_NETSCAPE_SSL_SERVER "SSL Server Authentication" + IDS_NETSCAPE_SMIME "S/MIME" + IDS_NETSCAPE_SIGN "Signature" + IDS_NETSCAPE_SSL_CA "SSL CA" + IDS_NETSCAPE_SMIME_CA "S/MIME CA" + IDS_NETSCAPE_SIGN_CA "Signature CA" +} Propchange: trunk/reactos/dll/win32/crypt32/crypt32_Uk.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/crypt32/crypt32_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crypt32_…
============================================================================== --- trunk/reactos/dll/win32/crypt32/crypt32_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/crypt32_private.h [iso-8859-1] Wed Mar 3 21:55:13 2010 @@ -405,4 +405,8 @@ #define ALIGN_DWORD_PTR(x) (((x) + sizeof(DWORD_PTR) - 1) & ~(sizeof(DWORD_PTR) - 1)) #define POINTER_ALIGN_DWORD_PTR(p) ((LPVOID)ALIGN_DWORD_PTR((DWORD_PTR)(p))) +/* Check if the OID is a small int + */ +#define IS_INTOID(x) (((ULONG_PTR)(x) >> 16) == 0) + #endif Modified: trunk/reactos/dll/win32/crypt32/decode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/decode.c…
============================================================================== --- trunk/reactos/dll/win32/crypt32/decode.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/decode.c [iso-8859-1] Wed Mar 3 21:55:13 2010 @@ -5578,7 +5578,7 @@ SetLastError(ERROR_FILE_NOT_FOUND); return NULL; } - if (!HIWORD(lpszStructType)) + if (IS_INTOID(lpszStructType)) { switch (LOWORD(lpszStructType)) { Modified: trunk/reactos/dll/win32/crypt32/encode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/encode.c…
============================================================================== --- trunk/reactos/dll/win32/crypt32/encode.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/encode.c [iso-8859-1] Wed Mar 3 21:55:13 2010 @@ -4305,7 +4305,7 @@ return NULL; } - if (!HIWORD(lpszStructType)) + if (IS_INTOID(lpszStructType)) { switch (LOWORD(lpszStructType)) { Modified: trunk/reactos/dll/win32/crypt32/object.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/object.c…
============================================================================== --- trunk/reactos/dll/win32/crypt32/object.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/object.c [iso-8859-1] Wed Mar 3 21:55:13 2010 @@ -2525,7 +2525,7 @@ SetLastError(ERROR_FILE_NOT_FOUND); return NULL; } - if (!HIWORD(lpszStructType)) + if (IS_INTOID(lpszStructType)) { switch (LOWORD(lpszStructType)) { Modified: trunk/reactos/dll/win32/crypt32/oid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/oid.c?re…
============================================================================== --- trunk/reactos/dll/win32/crypt32/oid.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/oid.c [iso-8859-1] Wed Mar 3 21:55:13 2010 @@ -170,7 +170,7 @@ * "EncodingType 2" would be expected if it were a mask. Instead native * stores values in "EncodingType 3". */ - if (!HIWORD(pszOID)) + if (IS_INTOID(pszOID)) { snprintf(numericOID, sizeof(numericOID), "#%d", LOWORD(pszOID)); oid = numericOID; @@ -255,7 +255,7 @@ { struct OIDFunction *func; - if (HIWORD(rgFuncEntry[i].pszOID)) + if (!IS_INTOID(rgFuncEntry[i].pszOID)) func = CryptMemAlloc(sizeof(struct OIDFunction) + strlen(rgFuncEntry[i].pszOID) + 1); else @@ -263,7 +263,7 @@ if (func) { func->encoding = GET_CERT_ENCODING_TYPE(dwEncodingType); - if (HIWORD(rgFuncEntry[i].pszOID)) + if (!IS_INTOID(rgFuncEntry[i].pszOID)) { LPSTR oid; @@ -402,9 +402,9 @@ { if (function->encoding == GET_CERT_ENCODING_TYPE(dwEncodingType)) { - if (HIWORD(pszOID)) + if (!IS_INTOID(pszOID)) { - if (HIWORD(function->entry.pszOID) && + if (!IS_INTOID(function->entry.pszOID) && !strcasecmp(function->entry.pszOID, pszOID)) { *ppvFuncAddr = function->entry.pvFuncAddr; @@ -1398,7 +1398,7 @@ for (i = 0; i < sizeof(oidInfoConstructors) / sizeof(oidInfoConstructors[0]); i++) { - if (HIWORD(oidInfoConstructors[i].pwszName)) + if (!IS_INTRESOURCE(oidInfoConstructors[i].pwszName)) { struct OIDInfo *info; Modified: trunk/reactos/dll/win32/crypt32/store.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/store.c?…
============================================================================== --- trunk/reactos/dll/win32/crypt32/store.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/store.c [iso-8859-1] Wed Mar 3 21:55:13 2010 @@ -745,7 +745,7 @@ TRACE("(%s, %08x, %08lx, %08x, %p)\n", debugstr_a(lpszStoreProvider), dwMsgAndCertEncodingType, hCryptProv, dwFlags, pvPara); - if (!HIWORD(lpszStoreProvider)) + if (IS_INTOID(lpszStoreProvider)) { switch (LOWORD(lpszStoreProvider)) {
14 years, 9 months
1
0
0
0
[cwittich] 45801: [CRYPTDLG] sync cryptdlg to wine 1.1.39
by cwittich@svn.reactos.org
Author: cwittich Date: Wed Mar 3 21:42:01 2010 New Revision: 45801 URL:
http://svn.reactos.org/svn/reactos?rev=45801&view=rev
Log: [CRYPTDLG] sync cryptdlg to wine 1.1.39 Added: trunk/reactos/dll/win32/cryptdlg/cryptdlg_Uk.rc (with props) Modified: trunk/reactos/dll/win32/cryptdlg/cryptdlg.rc trunk/reactos/dll/win32/cryptdlg/cryptdlg_Fr.rc trunk/reactos/dll/win32/cryptdlg/main.c Modified: trunk/reactos/dll/win32/cryptdlg/cryptdlg.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptdlg/cryptdl…
============================================================================== --- trunk/reactos/dll/win32/cryptdlg/cryptdlg.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cryptdlg/cryptdlg.rc [iso-8859-1] Wed Mar 3 21:42:01 2010 @@ -22,11 +22,15 @@ #include "winuser.h" #include "cryptres.h" +#include "cryptdlg_En.rc" +#include "cryptdlg_Ko.rc" +#include "cryptdlg_Nl.rc" + +/* UTF-8 */ #include "cryptdlg_De.rc" -#include "cryptdlg_En.rc" #include "cryptdlg_Fr.rc" -#include "cryptdlg_Ko.rc" #include "cryptdlg_Lt.rc" -#include "cryptdlg_Nl.rc" +#include "cryptdlg_Uk.rc" #include "cryptdlg_Pt.rc" #include "cryptdlg_Ro.rc" + Modified: trunk/reactos/dll/win32/cryptdlg/cryptdlg_Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptdlg/cryptdl…
============================================================================== --- trunk/reactos/dll/win32/cryptdlg/cryptdlg_Fr.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cryptdlg/cryptdlg_Fr.rc [iso-8859-1] Wed Mar 3 21:42:01 2010 @@ -40,4 +40,3 @@ IDS_NOTICE_NUM "Numéro de l'avis =" IDS_NOTICE_TEXT "Texte de l'avis =" } -#pragma code_page(default) Added: trunk/reactos/dll/win32/cryptdlg/cryptdlg_Uk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptdlg/cryptdl…
============================================================================== --- trunk/reactos/dll/win32/cryptdlg/cryptdlg_Uk.rc (added) +++ trunk/reactos/dll/win32/cryptdlg/cryptdlg_Uk.rc [iso-8859-1] Wed Mar 3 21:42:01 2010 @@ -1,0 +1,42 @@ +/* + * cryptdlg dll resources + * + * Copyright 2008 Juan Lang + * Copyright 2010 Igor Paliychuk + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "cryptres.h" + +/* UTF-8 */ +#pragma code_page(65001) + +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT + +STRINGTABLE DISCARDABLE +{ + IDS_CERT_POLICY "Certificate Policy" + IDS_POLICY_ID "Policy Identifier: " + IDS_POLICY_QUALIFIER_INFO "Policy Qualifier Info" + IDS_POLICY_QUALIFIER_ID "Policy Qualifier Id=" + IDS_CPS "CPS" /* Certification Practice Statement */ + IDS_USER_NOTICE "User Notice" + IDS_QUALIFIER "Qualifier" + IDS_NOTICE_REF "Notice Reference" + IDS_ORGANIZATION "ÐÑганÑзаÑÑÑ=" + IDS_NOTICE_NUM "Notice Number=" + IDS_NOTICE_TEXT "Notice Text=" +} Propchange: trunk/reactos/dll/win32/cryptdlg/cryptdlg_Uk.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/cryptdlg/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptdlg/main.c?…
============================================================================== --- trunk/reactos/dll/win32/cryptdlg/main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cryptdlg/main.c [iso-8859-1] Wed Mar 3 21:42:01 2010 @@ -535,7 +535,7 @@ pbEncoded, cbEncoded, CRYPT_DECODE_ALLOC_FLAG, NULL, &cpsValue, &size))) { LPCWSTR headingSep, sep; - DWORD headingSepLen, sepLen; + DWORD sepLen; if (dwFormatStrType & CRYPT_FORMAT_STR_MULTI_LINE) { @@ -547,8 +547,8 @@ headingSep = colonSpace; sep = commaSep; } + sepLen = strlenW(sep); - headingSepLen = strlenW(headingSep); if (dwFormatStrType & CRYPT_FORMAT_STR_MULTI_LINE) {
14 years, 9 months
1
0
0
0
[cwittich] 45800: [CREDUI] sync credui to wine 1.1.39
by cwittich@svn.reactos.org
Author: cwittich Date: Wed Mar 3 21:37:28 2010 New Revision: 45800 URL:
http://svn.reactos.org/svn/reactos?rev=45800&view=rev
Log: [CREDUI] sync credui to wine 1.1.39 Added: trunk/reactos/dll/win32/credui/credui_It.rc (with props) trunk/reactos/dll/win32/credui/credui_Uk.rc (with props) Modified: trunk/reactos/dll/win32/credui/credui.rc trunk/reactos/dll/win32/credui/credui_Fr.rc trunk/reactos/dll/win32/credui/credui_Lt.rc trunk/reactos/dll/win32/credui/credui_Si.rc Modified: trunk/reactos/dll/win32/credui/credui.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui.rc…
============================================================================== --- trunk/reactos/dll/win32/credui/credui.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui.rc [iso-8859-1] Wed Mar 3 21:37:28 2010 @@ -28,18 +28,22 @@ IDB_BANNER BITMAP LOADONCALL DISCARDABLE banner.bmp #include "credui_Da.rc" -#include "credui_De.rc" #include "credui_En.rc" -#include "credui_Es.rc" -#include "credui_Fr.rc" #include "credui_Ko.rc" -#include "credui_Lt.rc" #include "credui_Nl.rc" #include "credui_No.rc" #include "credui_Pl.rc" #include "credui_Pt.rc" +#include "credui_Sv.rc" +#include "credui_Zh.rc" + +/* UTF-8 */ +#include "credui_De.rc" +#include "credui_Es.rc" +#include "credui_Fr.rc" +#include "credui_It.rc" +#include "credui_Lt.rc" #include "credui_Ro.rc" #include "credui_Ru.rc" #include "credui_Si.rc" -#include "credui_Sv.rc" -#include "credui_Zh.rc" +#include "credui_Uk.rc" Modified: trunk/reactos/dll/win32/credui/credui_Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_Fr…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_Fr.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_Fr.rc [iso-8859-1] Wed Mar 3 21:37:28 2010 @@ -52,4 +52,3 @@ IDS_CAPSLOCKONTITLE "VERR.MAJ est activé" IDS_CAPSLOCKON "Le verrouillage majuscule étant activé, cela pourrait provoquer une erreur lors de la saisie de votre mot de passe.\n\nAppuyez sur la touche VERR.MAJ de votre clavier afin de désactiver le verrouilage majuscule avant\nde saisir votre mot de passe." } -#pragma code_page(default) Added: trunk/reactos/dll/win32/credui/credui_It.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_It…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_It.rc (added) +++ trunk/reactos/dll/win32/credui/credui_It.rc [iso-8859-1] Wed Mar 3 21:37:28 2010 @@ -1,0 +1,55 @@ +/* + * Italian language resource file for Credentials UI + * + * Copyright 2010 Luca Bennati + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "credui_resources.h" + +/* UTF-8 */ +#pragma code_page(65001) + +LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL + +IDD_CREDDIALOG DIALOG DISCARDABLE 0, 0, 213, 149 +STYLE DS_MODALFRAME | DS_NOIDLEMSG | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "IDS_TITLEFORMAT" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + 0,213,37 + LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP + LTEXT "&Nome Utente:",-1,8,62,72,12,SS_CENTERIMAGE + CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | + CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,87 + LTEXT "&Password:",-1,8,80,72,12,SS_CENTERIMAGE + EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL + CONTROL "&Ricorda la mia password",IDC_SAVE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 + DEFPUSHBUTTON "OK",IDOK,97,128,50,14 + PUSHBUTTON "Annulla",IDCANCEL,156,128,50,14 +END + +STRINGTABLE DISCARDABLE +{ + IDS_TITLEFORMAT "Connetti a %s" + IDS_MESSAGEFORMAT "Connettendo a %s" + IDS_INCORRECTPASSWORDTITLE "Accesso fallito" + IDS_INCORRECTPASSWORD "Assicurati che il tuo nome utente\ne password siano corrette." + IDS_CAPSLOCKONTITLE "Il Caps Lock è acceso" + IDS_CAPSLOCKON "Avere Caps Lock acceso può portarti a immettere la password incorrettamente.\n\nPremere il tasto Caps Lock sulla tua tastiera per spegnere Caps Lock prima\n di immettere la tua password." +} Propchange: trunk/reactos/dll/win32/credui/credui_It.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/credui/credui_Lt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_Lt…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_Lt.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_Lt.rc [iso-8859-1] Wed Mar 3 21:37:28 2010 @@ -53,4 +53,3 @@ IDS_CAPSLOCKONTITLE "Didžiųjų raidžių bÅ«sena įjungta" IDS_CAPSLOCKON "Kai įjungta didžiųjų raidžių bÅ«sena, savo slaptažodį galite įvesti neteisingai.\n\nPaspauskite didžiųjų raidžių klaviatÅ«ros klaviÅ¡Ä didžiųjų raidžių bÅ«senai iÅ¡jungti\nprieÅ¡ rinkdami savo slaptažodį." } -#pragma code_page(default) Modified: trunk/reactos/dll/win32/credui/credui_Si.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_Si…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_Si.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_Si.rc [iso-8859-1] Wed Mar 3 21:37:28 2010 @@ -52,5 +52,3 @@ IDS_CAPSLOCKONTITLE "Caps Lock je vkljuÄen" IDS_CAPSLOCKON "VkljuÄen Caps Lock je lahko vzrok nepravilnega vnosa gesla.\n\nPritisnite tipko Caps Lock, s Äimer ga izklopite\nin ponovno vnesite geslo." } - -#pragma code_page(default) Added: trunk/reactos/dll/win32/credui/credui_Uk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_Uk…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_Uk.rc (added) +++ trunk/reactos/dll/win32/credui/credui_Uk.rc [iso-8859-1] Wed Mar 3 21:37:28 2010 @@ -1,0 +1,56 @@ +/* + * Ukrainian language resource file for Credentials UI + * + * Copyright 2007 Robert Shearman (for CodeWeavers) + * Copyright 2010 Igor Paliychuk + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "credui_resources.h" + +/* UTF-8 */ +#pragma code_page(65001) + +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT + +IDD_CREDDIALOG DIALOG DISCARDABLE 0, 0, 213, 149 +STYLE DS_MODALFRAME | DS_NOIDLEMSG | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "IDS_TITLEFORMAT" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + 0,213,37 + LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP + LTEXT "&ÐоÑиÑÑÑваÑ:",-1,8,62,72,12,SS_CENTERIMAGE + CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | + CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,87 + LTEXT "&ÐаÑолÑ:",-1,8,80,72,12,SS_CENTERIMAGE + EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL + CONTROL "&Ðапам'ÑÑаÑи мÑй паÑолÑ",IDC_SAVE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 + DEFPUSHBUTTON "OK",IDOK,97,128,50,14 + PUSHBUTTON "СкаÑÑваÑи",IDCANCEL,156,128,50,14 +END + +STRINGTABLE DISCARDABLE +{ + IDS_TITLEFORMAT "ÐÑд'ÑднаÑиÑÑ Ð´Ð¾ %s" + IDS_MESSAGEFORMAT "ÐÑд'ÑднÑÑÑÑ Ð´Ð¾ %s" + IDS_INCORRECTPASSWORDTITLE "ÐÑ Ñд не вÑдбÑвÑÑ" + IDS_INCORRECTPASSWORD "ÐеÑеконайÑеÑÑ Ñо Ñм'Ñ ÐºÐ¾ÑиÑÑÑваÑа\nÑ Ð¿Ð°ÑÐ¾Ð»Ñ Ð¿ÑавилÑнÑ." + IDS_CAPSLOCKONTITLE "Caps Lock вклÑÑений" + IDS_CAPSLOCKON "ÐаÑÐ¾Ð»Ñ Ð¼Ð¾Ð¶Ðµ бÑÑи введений непÑавилÑно ÑеÑез наÑиÑÐ½ÐµÐ½Ñ ÐºÐ»Ð°Ð²ÑÑÑ Caps Lock.\n\nÐимкнÑÑÑ Caps Lock пеÑед\nвведеннÑм паÑолÑ." +} Propchange: trunk/reactos/dll/win32/credui/credui_Uk.rc ------------------------------------------------------------------------------ svn:eol-style = native
14 years, 9 months
1
0
0
0
[cwittich] 45799: [HLINK_WINETEST] sync hlink_winetest to wine 1.1.39
by cwittich@svn.reactos.org
Author: cwittich Date: Wed Mar 3 20:44:02 2010 New Revision: 45799 URL:
http://svn.reactos.org/svn/reactos?rev=45799&view=rev
Log: [HLINK_WINETEST] sync hlink_winetest to wine 1.1.39 Added: trunk/rostests/winetests/hlink/browse_ctx.c (with props) Modified: trunk/rostests/winetests/hlink/hlink.c trunk/rostests/winetests/hlink/hlink.rbuild trunk/rostests/winetests/hlink/testlist.c Added: trunk/rostests/winetests/hlink/browse_ctx.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/hlink/browse_ct…
============================================================================== --- trunk/rostests/winetests/hlink/browse_ctx.c (added) +++ trunk/rostests/winetests/hlink/browse_ctx.c [iso-8859-1] Wed Mar 3 20:44:02 2010 @@ -1,0 +1,90 @@ +/* + * Copyright 2009 Andrew Eikum for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS + +#include <stdio.h> + +#include <hlink.h> + +#include "wine/test.h" + +/* Win9x and WinMe don't have lstrcmpW */ +static int strcmp_ww(const WCHAR *str1, const WCHAR *str2) +{ + DWORD len1 = lstrlenW(str1); + DWORD len2 = lstrlenW(str2); + + if (len1 != len2) return 1; + return memcmp(str1, str2, len1 * sizeof(WCHAR)); +} + +static void test_SetInitialHlink(void) +{ + IHlinkBrowseContext *bc; + IHlink *found_hlink; + IMoniker *dummy, *found_moniker; + IBindCtx *bindctx; + WCHAR one[] = {'1',0}; + WCHAR five[] = {'5',0}; + WCHAR *found_name, *exp_name; + HRESULT hres; + + hres = CreateBindCtx(0, &bindctx); + ok(hres == S_OK, "CreateBindCtx failed: 0x%08x\n", hres); + + hres = CreateItemMoniker(one, five, &dummy); + ok(hres == S_OK, "CreateItemMoniker failed: 0x%08x\n", hres); + + hres = IMoniker_GetDisplayName(dummy, bindctx, NULL, &exp_name); + ok(hres == S_OK, "GetDisplayName failed: 0x%08x\n", hres); + + hres = HlinkCreateBrowseContext(NULL, &IID_IHlinkBrowseContext, (void**)&bc); + ok(hres == S_OK, "HlinkCreateBrowseContext failed: 0x%08x\n", hres); + + hres = IHlinkBrowseContext_SetInitialHlink(bc, dummy, one, NULL); + ok(hres == S_OK, "SetInitialHlink failed: 0x%08x\n", hres); + + hres = IHlinkBrowseContext_GetHlink(bc, HLID_CURRENT, &found_hlink); + ok(hres == S_OK, "GetHlink failed: 0x%08x\n", hres); + + hres = IHlink_GetMonikerReference(found_hlink, HLINKGETREF_DEFAULT, &found_moniker, NULL); + ok(hres == S_OK, "GetMonikerReference failed: 0x%08x\n", hres); + + hres = IMoniker_GetDisplayName(found_moniker, bindctx, NULL, &found_name); + ok(hres == S_OK, "GetDisplayName failed: 0x%08x\n", hres); + ok(!strcmp_ww(found_name, exp_name), "Found display name should have been %s, was: %s\n", wine_dbgstr_w(exp_name), wine_dbgstr_w(found_name)); + + CoTaskMemFree(exp_name); + CoTaskMemFree(found_name); + + IBindCtx_Release(bindctx); + IMoniker_Release(found_moniker); + IHlink_Release(found_hlink); + IHlinkBrowseContext_Release(bc); + IMoniker_Release(dummy); +} + +START_TEST(browse_ctx) +{ + CoInitialize(NULL); + + test_SetInitialHlink(); + + CoUninitialize(); +} Propchange: trunk/rostests/winetests/hlink/browse_ctx.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/winetests/hlink/hlink.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/hlink/hlink.c?r…
============================================================================== --- trunk/rostests/winetests/hlink/hlink.c [iso-8859-1] (original) +++ trunk/rostests/winetests/hlink/hlink.c [iso-8859-1] Wed Mar 3 20:44:02 2010 @@ -137,9 +137,7 @@ r = IHlink_GetStringReference(lnk, HLINKGETREF_DEFAULT, &str, NULL); ok(r == S_OK, "failed\n"); - todo_wine { ok(!lstrcmpW(str, url2), "url wrong\n"); - } CoTaskMemFree(str); r = IHlink_GetStringReference(lnk, HLINKGETREF_DEFAULT, NULL, NULL); @@ -1121,6 +1119,231 @@ IMoniker_Release(dummy); } +static void test_HlinkGetSetStringReference(void) +{ + IHlink *link; + static const WCHAR one[] = {'1',0}; + static const WCHAR two[] = {'2',0}; + static const WCHAR three[] = {'3',0}; + static const WCHAR empty[] = {0}; + WCHAR *fnd_tgt, *fnd_loc; + HRESULT hres; + + /* create a new hlink: target => NULL, location => one */ + hres = HlinkCreateFromMoniker(NULL, one, empty, NULL, 0, NULL, &IID_IHlink, (void**)&link); + ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08x\n", hres); + + /* test setting/getting location */ + hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); + ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres); + ok(fnd_tgt == NULL, "Found target should have been NULL, was: %s\n", wine_dbgstr_w(fnd_tgt)); + ok(!lstrcmpW(fnd_loc, one), "Found location should have been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(fnd_loc)); + CoTaskMemFree(fnd_tgt); + CoTaskMemFree(fnd_loc); + + hres = IHlink_SetStringReference(link, HLINKSETF_LOCATION, one, two); + ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres); + + hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); + ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres); + ok(fnd_tgt == NULL, "Found target should have been NULL, was: %s\n", wine_dbgstr_w(fnd_tgt)); + ok(!lstrcmpW(fnd_loc, two), "Found location should have been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(fnd_loc)); + CoTaskMemFree(fnd_tgt); + CoTaskMemFree(fnd_loc); + + hres = IHlink_SetStringReference(link, -HLINKSETF_LOCATION, two, one); + ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres); + + hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); + ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres); + ok(fnd_tgt == NULL, "Found target should have been NULL, was: %s\n", wine_dbgstr_w(fnd_tgt)); + ok(!lstrcmpW(fnd_loc, one), "Found location should have been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(fnd_loc)); + CoTaskMemFree(fnd_tgt); + CoTaskMemFree(fnd_loc); + + /* test setting/getting target */ + hres = IHlink_SetStringReference(link, HLINKSETF_TARGET, two, three); + ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres); + + hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); + ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres); + ok(!lstrcmpW(fnd_tgt, two), "Found target should have been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(fnd_tgt)); + ok(!lstrcmpW(fnd_loc, one), "Found location should have been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(fnd_loc)); + CoTaskMemFree(fnd_tgt); + CoTaskMemFree(fnd_loc); + + hres = IHlink_SetStringReference(link, -HLINKSETF_TARGET, three, two); + ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres); + + hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); + ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres); + ok(!lstrcmpW(fnd_tgt, three), "Found target should have been %s, was: %s\n", wine_dbgstr_w(three), wine_dbgstr_w(fnd_tgt)); + ok(!lstrcmpW(fnd_loc, two), "Found location should have been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(fnd_loc)); + CoTaskMemFree(fnd_tgt); + CoTaskMemFree(fnd_loc); + + /* test setting/getting both */ + hres = IHlink_SetStringReference(link, HLINKSETF_TARGET | HLINKSETF_LOCATION, one, two); + ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres); + + hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); + ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres); + ok(!lstrcmpW(fnd_tgt, one), "Found target should have been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(fnd_tgt)); + ok(!lstrcmpW(fnd_loc, two), "Found location should have been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(fnd_loc)); + CoTaskMemFree(fnd_tgt); + CoTaskMemFree(fnd_loc); + + hres = IHlink_SetStringReference(link, -(HLINKSETF_TARGET | HLINKSETF_LOCATION), three, one); + ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres); + + hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); + ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres); + ok(!lstrcmpW(fnd_tgt, three), "Found target should have been %s, was: %s\n", wine_dbgstr_w(three), wine_dbgstr_w(fnd_tgt)); + ok(!lstrcmpW(fnd_loc, two), "Found location should have been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(fnd_loc)); + CoTaskMemFree(fnd_tgt); + CoTaskMemFree(fnd_loc); + + /* test invalid flags/params */ + hres = IHlink_GetStringReference(link, 4, &fnd_tgt, &fnd_loc); + ok(hres == E_INVALIDARG, "IHlink_GetStringReference should have failed " + "with E_INVALIDARG (0x%08x), instead: 0x%08x\n", E_INVALIDARG, hres); + ok(fnd_tgt == NULL, "Found target should have been NULL, was: %s\n", wine_dbgstr_w(fnd_tgt)); + ok(fnd_loc == NULL, "Found location should have been NULL, was: %s\n", wine_dbgstr_w(fnd_loc)); + CoTaskMemFree(fnd_tgt); + CoTaskMemFree(fnd_loc); + + hres = IHlink_GetStringReference(link, -1, &fnd_tgt, &fnd_loc); + todo_wine ok(hres == E_FAIL, "IHlink_GetStringReference should have failed " + "with E_FAIL (0x%08x), instead: 0x%08x\n", E_FAIL, hres); + CoTaskMemFree(fnd_tgt); + CoTaskMemFree(fnd_loc); + + hres = IHlink_GetStringReference(link, -2, &fnd_tgt, &fnd_loc); + ok(hres == E_INVALIDARG, "IHlink_GetStringReference should have failed " + "with E_INVALIDARG (0x%08x), instead: 0x%08x\n", E_INVALIDARG, hres); + CoTaskMemFree(fnd_tgt); + CoTaskMemFree(fnd_loc); + + hres = IHlink_SetStringReference(link, 4, NULL, NULL); + ok(hres == 4, "IHlink_SetStringReference should have failed with 0x4, instead: 0x%08x\n", hres); + + hres = IHlink_SetStringReference(link, -4, NULL, NULL); + ok(hres == -4, "IHlink_SetStringReference should have failed with 0xFFFFFFFC, instead: 0x%08x\n", hres); + + IHlink_Release(link); +} + +#define setStringRef(h,f,t,l) r_setStringRef(__LINE__,h,f,t,l) +static void r_setStringRef(unsigned line, IHlink *hlink, DWORD flags, const WCHAR *tgt, const WCHAR *loc) +{ + HRESULT hres; + hres = IHlink_SetStringReference(hlink, flags, tgt, loc); + ok_(__FILE__,line) (hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres); +} + +#define getStringRef(h,t,l) r_getStringRef(__LINE__,h,t,l) +static void r_getStringRef(unsigned line, IHlink *hlink, const WCHAR *exp_tgt, const WCHAR *exp_loc) +{ + HRESULT hres; + WCHAR *fnd_tgt, *fnd_loc; + + hres = IHlink_GetStringReference(hlink, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); + ok_(__FILE__,line) (hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres); + + if(exp_tgt) + ok_(__FILE__,line) (!lstrcmpW(fnd_tgt, exp_tgt), "Found string target should have been %s, was: %s\n", wine_dbgstr_w(exp_tgt), wine_dbgstr_w(fnd_tgt)); + else + ok_(__FILE__,line) (exp_tgt == NULL, "Found string target should have been NULL, was: %s\n", wine_dbgstr_w(fnd_tgt)); + + if(exp_loc) + ok_(__FILE__,line) (!lstrcmpW(fnd_loc, exp_loc), "Found string location should have been %s, was: %s\n", wine_dbgstr_w(exp_loc), wine_dbgstr_w(fnd_loc)); + else + ok_(__FILE__,line) (exp_loc == NULL, "Found string location should have been NULL, was: %s\n", wine_dbgstr_w(fnd_loc)); + + CoTaskMemFree(fnd_tgt); + CoTaskMemFree(fnd_loc); +} + +#define setMonikerRef(h,f,t,l) r_setMonikerRef(__LINE__,h,f,t,l) +static void r_setMonikerRef(unsigned line, IHlink *hlink, DWORD flags, IMoniker *tgt, const WCHAR *loc) +{ + HRESULT hres; + hres = IHlink_SetMonikerReference(hlink, flags, tgt, loc); + ok_(__FILE__,line) (hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); +} + +/* passing 0xFFFFFFFF as exp_tgt will return the retrieved target & not test it */ +#define getMonikerRef(h,t,l) r_getMonikerRef(__LINE__,h,t,l) +static IMoniker *r_getMonikerRef(unsigned line, IHlink *hlink, IMoniker *exp_tgt, const WCHAR *exp_loc) +{ + HRESULT hres; + IMoniker *fnd_tgt; + WCHAR *fnd_loc; + + hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); + ok_(__FILE__,line) (hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres); + + if(exp_loc) + ok_(__FILE__,line) (!lstrcmpW(fnd_loc, exp_loc), "Found string location should have been %s, was: %s\n", wine_dbgstr_w(exp_loc), wine_dbgstr_w(fnd_loc)); + else + ok_(__FILE__,line) (exp_loc == NULL, "Found string location should have been NULL, was: %s\n", wine_dbgstr_w(fnd_loc)); + + CoTaskMemFree(fnd_loc); + + if(exp_tgt == (IMoniker*)0xFFFFFFFF) + return fnd_tgt; + + ok_(__FILE__,line) (fnd_tgt == exp_tgt, "Found moniker target should have been %p, was: %p\n", exp_tgt, fnd_tgt); + + if(fnd_tgt) + IMoniker_Release(fnd_tgt); + + return NULL; +} + +static void test_HlinkMoniker(void) +{ + IHlink *hlink; + IMoniker *aMon, *file_mon; + static const WCHAR emptyW[] = {0}; + static const WCHAR wordsW[] = {'w','o','r','d','s',0}; + static const WCHAR aW[] = {'a',0}; + static const WCHAR bW[] = {'b',0}; + HRESULT hres; + + hres = HlinkCreateFromString(NULL, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (void**)&hlink); + ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08x\n", hres); + getStringRef(hlink, NULL, NULL); + getMonikerRef(hlink, NULL, NULL); + + /* setting a string target creates a moniker reference */ + setStringRef(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, aW, wordsW); + getStringRef(hlink, aW, wordsW); + aMon = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, wordsW); + ok(aMon != NULL, "Moniker from %s target should not be NULL\n", wine_dbgstr_w(aW)); + if(aMon) + IMoniker_Release(aMon); + + /* setting target & location to the empty string deletes the moniker + * reference */ + setStringRef(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, emptyW, emptyW); + getStringRef(hlink, NULL, NULL); + getMonikerRef(hlink, NULL, NULL); + + /* setting a moniker target also sets the target string to that moniker's + * display name */ + hres = CreateFileMoniker(bW, &file_mon); + ok(hres == S_OK, "CreateFileMoniker failed: 0x%08x\n", hres); + + setMonikerRef(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, file_mon, wordsW); + getStringRef(hlink, bW, wordsW); + getMonikerRef(hlink, file_mon, wordsW); + + IMoniker_Release(file_mon); + + IHlink_Release(hlink); +} + START_TEST(hlink) { CoInitialize(NULL); @@ -1133,6 +1356,8 @@ test_HlinkParseDisplayName(); test_HlinkResolveMonikerForData(); test_HlinkGetSetMonikerReference(); + test_HlinkGetSetStringReference(); + test_HlinkMoniker(); CoUninitialize(); } Modified: trunk/rostests/winetests/hlink/hlink.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/hlink/hlink.rbu…
============================================================================== --- trunk/rostests/winetests/hlink/hlink.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/hlink/hlink.rbuild [iso-8859-1] Wed Mar 3 20:44:02 2010 @@ -3,7 +3,8 @@ <group> <module name="hlink_winetest" type="win32cui" installbase="bin" installname="hlink_winetest.exe" allowwarnings="true"> <include base="hlink_winetest">.</include> - <define name="__ROS_LONG64__" /> + <define name="__ROS_LONG64__" /> + <file>browse_ctx.c</file> <file>hlink.c</file> <file>testlist.c</file> <library>wine</library> Modified: trunk/rostests/winetests/hlink/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/hlink/testlist.…
============================================================================== --- trunk/rostests/winetests/hlink/testlist.c [iso-8859-1] (original) +++ trunk/rostests/winetests/hlink/testlist.c [iso-8859-1] Wed Mar 3 20:44:02 2010 @@ -7,9 +7,11 @@ #include "wine/test.h" extern void func_hlink(void); +extern void func_browse_ctx(void); const struct test winetest_testlist[] = { + { "browse_ctx", func_browse_ctx }, { "hlink", func_hlink }, { 0, 0 } };
14 years, 9 months
1
0
0
0
[cwittich] 45798: [SHLWAPI_WINETEST] sync shlwapi_winetest to wine 1.1.39
by cwittich@svn.reactos.org
Author: cwittich Date: Wed Mar 3 20:40:55 2010 New Revision: 45798 URL:
http://svn.reactos.org/svn/reactos?rev=45798&view=rev
Log: [SHLWAPI_WINETEST] sync shlwapi_winetest to wine 1.1.39 Modified: trunk/rostests/winetests/shlwapi/assoc.c trunk/rostests/winetests/shlwapi/clist.c trunk/rostests/winetests/shlwapi/istream.c trunk/rostests/winetests/shlwapi/ordinal.c trunk/rostests/winetests/shlwapi/path.c trunk/rostests/winetests/shlwapi/shreg.c trunk/rostests/winetests/shlwapi/string.c trunk/rostests/winetests/shlwapi/url.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/rostests/winetests/shlwapi/assoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/assoc.c…
Modified: trunk/rostests/winetests/shlwapi/clist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/clist.c…
Modified: trunk/rostests/winetests/shlwapi/istream.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/istream…
Modified: trunk/rostests/winetests/shlwapi/ordinal.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/ordinal…
Modified: trunk/rostests/winetests/shlwapi/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/path.c?…
Modified: trunk/rostests/winetests/shlwapi/shreg.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/shreg.c…
Modified: trunk/rostests/winetests/shlwapi/string.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/string.…
Modified: trunk/rostests/winetests/shlwapi/url.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/url.c?r…
14 years, 9 months
1
0
0
0
← Newer
1
...
80
81
82
83
84
85
86
...
90
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200