ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2010
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
19 participants
896 discussions
Start a n
N
ew thread
[cwittich] 46219: [ADVAPI32] sync RegpApplyRestrictions to wine 1.1.40
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Mar 16 10:29:28 2010 New Revision: 46219 URL:
http://svn.reactos.org/svn/reactos?rev=46219&view=rev
Log: [ADVAPI32] sync RegpApplyRestrictions to wine 1.1.40 Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg…
============================================================================== --- trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] Tue Mar 16 10:29:28 2010 @@ -1916,9 +1916,9 @@ { DWORD cbExpect = 0; - if ((dwFlags & RRF_RT_DWORD) == RRF_RT_DWORD) + if ((dwFlags & RRF_RT_ANY) == RRF_RT_DWORD) cbExpect = 4; - else if ((dwFlags & RRF_RT_QWORD) == RRF_RT_QWORD) + else if ((dwFlags & RRF_RT_ANY) == RRF_RT_QWORD) cbExpect = 8; if (cbExpect && cbData != cbExpect)
14 years, 9 months
1
0
0
0
[akhaldi] 46218: [NTDDK] - Group related definitions - Add several missing RTL related definitions
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Mar 16 00:41:04 2010 New Revision: 46218 URL:
http://svn.reactos.org/svn/reactos?rev=46218&view=rev
Log: [NTDDK] - Group related definitions - Add several missing RTL related definitions Modified: branches/header-work/include/ddk/ntddk.h Modified: branches/header-work/include/ddk/ntddk.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntddk.h…
============================================================================== --- branches/header-work/include/ddk/ntddk.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/ntddk.h [iso-8859-1] Tue Mar 16 00:41:04 2010 @@ -379,6 +379,10 @@ #define RTL_RUN_ONCE_CTX_RESERVED_BITS 2 +#define RTL_HASH_ALLOCATED_HEADER 0x00000001 + +#define RTL_HASH_RESERVED_SIGNATURE 0 + typedef union _RTL_RUN_ONCE { PVOID Ptr; } RTL_RUN_ONCE, *PRTL_RUN_ONCE; @@ -451,6 +455,130 @@ PVOID TableContext; } RTL_AVL_TABLE, *PRTL_AVL_TABLE; +#ifndef RTL_USE_AVL_TABLES + +struct _RTL_GENERIC_TABLE; + +typedef RTL_GENERIC_COMPARE_RESULTS +(NTAPI *PRTL_GENERIC_COMPARE_ROUTINE) ( + IN struct _RTL_GENERIC_TABLE *Table, + IN PVOID FirstStruct, + IN PVOID SecondStruct); + +typedef PVOID +(NTAPI *PRTL_GENERIC_ALLOCATE_ROUTINE) ( + IN struct _RTL_GENERIC_TABLE *Table, + IN CLONG ByteSize); + +typedef VOID +(NTAPI *PRTL_GENERIC_FREE_ROUTINE) ( + IN struct _RTL_GENERIC_TABLE *Table, + IN PVOID Buffer); + +typedef struct _RTL_GENERIC_TABLE { + PRTL_SPLAY_LINKS TableRoot; + LIST_ENTRY InsertOrderList; + PLIST_ENTRY OrderedPointer; + ULONG WhichOrderedElement; + ULONG NumberGenericTableElements; + PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine; + PRTL_GENERIC_ALLOCATE_ROUTINE AllocateRoutine; + PRTL_GENERIC_FREE_ROUTINE FreeRoutine; + PVOID TableContext; +} RTL_GENERIC_TABLE, *PRTL_GENERIC_TABLE; + +#if (NTDDI_VERSION >= NTDDI_WIN2K) + +NTSYSAPI +VOID +NTAPI +RtlInitializeGenericTable( + OUT PRTL_GENERIC_TABLE Table, + IN PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine, + IN PRTL_GENERIC_ALLOCATE_ROUTINE AllocateRoutine, + IN PRTL_GENERIC_FREE_ROUTINE FreeRoutine, + IN PVOID TableContext OPTIONAL); + +NTSYSAPI +PVOID +NTAPI +RtlInsertElementGenericTable( + IN PRTL_GENERIC_TABLE Table, + IN PVOID Buffer, + IN CLONG BufferSize, + OUT PBOOLEAN NewElement OPTIONAL); + +NTSYSAPI +PVOID +NTAPI +RtlInsertElementGenericTableFull( + IN PRTL_GENERIC_TABLE Table, + IN PVOID Buffer, + IN CLONG BufferSize, + OUT PBOOLEAN NewElement OPTIONAL, + IN PVOID NodeOrParent, + IN TABLE_SEARCH_RESULT SearchResult); + +NTSYSAPI +BOOLEAN +NTAPI +RtlDeleteElementGenericTable( + IN PRTL_GENERIC_TABLE Table, + IN PVOID Buffer); + +NTSYSAPI +PVOID +NTAPI +RtlLookupElementGenericTable( + IN PRTL_GENERIC_TABLE Table, + IN PVOID Buffer); + +NTSYSAPI +PVOID +NTAPI +RtlLookupElementGenericTableFull( + IN PRTL_GENERIC_TABLE Table, + IN PVOID Buffer, + OUT PVOID *NodeOrParent, + OUT TABLE_SEARCH_RESULT *SearchResult); + +NTSYSAPI +PVOID +NTAPI +RtlEnumerateGenericTable( + IN PRTL_GENERIC_TABLE Table, + IN BOOLEAN Restart); + +NTSYSAPI +PVOID +NTAPI +RtlEnumerateGenericTableWithoutSplaying( + IN PRTL_GENERIC_TABLE Table, + IN OUT PVOID *RestartKey); + +NTSYSAPI +PVOID +NTAPI +RtlGetElementGenericTable( + IN PRTL_GENERIC_TABLE Table, + IN ULONG I); + +NTSYSAPI +ULONG +NTAPI +RtlNumberGenericTableElements( + IN PRTL_GENERIC_TABLE Table); + +NTSYSAPI +BOOLEAN +NTAPI +RtlIsGenericTableEmpty( + IN PRTL_GENERIC_TABLE Table); + +#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */ + +#endif /* RTL_USE_AVL_TABLES */ + #ifdef RTL_USE_AVL_TABLES #undef PRTL_GENERIC_COMPARE_ROUTINE @@ -491,6 +619,37 @@ struct _RTL_SPLAY_LINKS *RightChild; } RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS; +typedef struct _RTL_DYNAMIC_HASH_TABLE_ENTRY { + LIST_ENTRY Linkage; + ULONG_PTR Signature; +} RTL_DYNAMIC_HASH_TABLE_ENTRY, *PRTL_DYNAMIC_HASH_TABLE_ENTRY; + +typedef struct _RTL_DYNAMIC_HASH_TABLE_CONTEXT { + PLIST_ENTRY ChainHead; + PLIST_ENTRY PrevLinkage; + ULONG_PTR Signature; +} RTL_DYNAMIC_HASH_TABLE_CONTEXT, *PRTL_DYNAMIC_HASH_TABLE_CONTEXT; + +typedef struct _RTL_DYNAMIC_HASH_TABLE_ENUMERATOR { + RTL_DYNAMIC_HASH_TABLE_ENTRY HashEntry; + PLIST_ENTRY ChainHead; + ULONG BucketIndex; +} RTL_DYNAMIC_HASH_TABLE_ENUMERATOR, *PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR; + +typedef struct _RTL_DYNAMIC_HASH_TABLE { + ULONG Flags; + ULONG Shift; + ULONG TableSize; + ULONG Pivot; + ULONG DivisorMask; + ULONG NumEntries; + ULONG NonEmptyBuckets; + ULONG NumEnumerators; + PVOID Directory; +} RTL_DYNAMIC_HASH_TABLE, *PRTL_DYNAMIC_HASH_TABLE; + +#define HASH_ENTRY_KEY(x) ((x)->Signature) + #define RtlInitializeSplayLinks(Links) { \ PRTL_SPLAY_LINKS _SplayLinks; \ _SplayLinks = (PRTL_SPLAY_LINKS)(Links); \ @@ -537,8 +696,24 @@ _SplayChild->Parent = _SplayParent; \ } - +#if (defined(_M_AMD64) || defined(_M_IA64)) && !defined(_REALLY_GET_CALLERS_CALLER_) +#define RtlGetCallersAddress(CallersAddress, CallersCaller) \ + *CallersAddress = (PVOID)_ReturnAddress(); \ + *CallersCaller = NULL; +#else #if (NTDDI_VERSION >= NTDDI_WIN2K) +NTSYSAPI +VOID +NTAPI +RtlGetCallersAddress( + OUT PVOID *CallersAddress, + OUT PVOID *CallersCaller); +#endif +#endif + +#if (NTDDI_VERSION >= NTDDI_WIN2K) + +#define RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT 8 NTSYSAPI PRTL_SPLAY_LINKS @@ -583,7 +758,103 @@ RtlRealPredecessor( IN PRTL_SPLAY_LINKS Links); -#endif +NTSYSAPI +BOOLEAN +NTAPI +RtlPrefixUnicodeString( + IN PCUNICODE_STRING String1, + IN PCUNICODE_STRING String2, + IN BOOLEAN CaseInSensitive); + +NTSYSAPI +VOID +NTAPI +RtlUpperString( + IN OUT PSTRING DestinationString, + IN const PSTRING SourceString); + +NTSYSAPI +NTSTATUS +NTAPI +RtlUpcaseUnicodeString( + IN OUT PUNICODE_STRING DestinationString, + IN PCUNICODE_STRING SourceString, + IN BOOLEAN AllocateDestinationString); + +NTSYSAPI +VOID +NTAPI +RtlMapGenericMask( + IN OUT PACCESS_MASK AccessMask, + IN PGENERIC_MAPPING GenericMapping); + +NTSYSAPI +NTSTATUS +NTAPI +RtlVolumeDeviceToDosName( + IN PVOID VolumeDeviceObject, + OUT PUNICODE_STRING DosName); + +NTSYSAPI +NTSTATUS +NTAPI +RtlGetVersion( + IN OUT PRTL_OSVERSIONINFOW lpVersionInformation); + +NTSYSAPI +NTSTATUS +NTAPI +RtlVerifyVersionInfo( + IN PRTL_OSVERSIONINFOEXW VersionInfo, + IN ULONG TypeMask, + IN ULONGLONG ConditionMask); + +NTSYSAPI +LONG +NTAPI +RtlCompareString( + IN const PSTRING String1, + IN const PSTRING String2, + IN BOOLEAN CaseInSensitive); + +NTSYSAPI +VOID +NTAPI +RtlCopyString( + OUT PSTRING DestinationString, + IN const PSTRING SourceString OPTIONAL); + +NTSYSAPI +BOOLEAN +NTAPI +RtlEqualString( + IN const PSTRING String1, + IN const PSTRING String2, + IN BOOLEAN CaseInSensitive); + +NTSYSAPI +NTSTATUS +NTAPI +RtlCharToInteger( + IN PCSZ String, + IN ULONG Base OPTIONAL, + OUT PULONG Value); + +NTSYSAPI +CHAR +NTAPI +RtlUpperChar( + IN CHAR Character); + +NTSYSAPI +ULONG +NTAPI +RtlWalkFrameChain( + OUT PVOID *Callers, + IN ULONG Count, + IN ULONG Flags); + +#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */ #if (NTDDI_VERSION >= NTDDI_WINXP) @@ -730,6 +1001,225 @@ IN PVOID Context OPTIONAL); #endif /* (NTDDI_VERSION >= NTDDI_WIN6) */ + +#if !defined(MIDL_PASS) && !defined(SORTPP_PASS) + +#if (NTDDI_VERSION >= NTDDI_WIN7) + +FORCEINLINE +VOID +NTAPI +RtlInitHashTableContext( + IN OUT PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context) +{ + Context->ChainHead = NULL; + Context->PrevLinkage = NULL; +} + +FORCEINLINE +VOID +NTAPI +RtlInitHashTableContextFromEnumerator( + IN OUT PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context, + IN PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator) +{ + Context->ChainHead = Enumerator->ChainHead; + Context->PrevLinkage = Enumerator->HashEntry.Linkage.Blink; +} + +FORCEINLINE +VOID +NTAPI +RtlReleaseHashTableContext( + IN OUT PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context) +{ + UNREFERENCED_PARAMETER(Context); + return; +} + +FORCEINLINE +ULONG +NTAPI +RtlTotalBucketsHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable) +{ + return HashTable->TableSize; +} + +FORCEINLINE +ULONG +NTAPI +RtlNonEmptyBucketsHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable) +{ + return HashTable->NonEmptyBuckets; +} + +FORCEINLINE +ULONG +NTAPI +RtlEmptyBucketsHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable) +{ + return HashTable->TableSize - HashTable->NonEmptyBuckets; +} + +FORCEINLINE +ULONG +NTAPI +RtlTotalEntriesHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable) +{ + return HashTable->NumEntries; +} + +FORCEINLINE +ULONG +NTAPI +RtlActiveEnumeratorsHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable) +{ + return HashTable->NumEnumerators; +} + +#endif /* (NTDDI_VERSION >= NTDDI_WIN7) */ + +#endif /* !defined(MIDL_PASS) && !defined(SORTPP_PASS) */ + +#if (NTDDI_VERSION >= NTDDI_WIN7) + +NTSYSAPI +BOOLEAN +NTAPI +RtlCreateHashTable( + IN OUT PRTL_DYNAMIC_HASH_TABLE *HashTable OPTIONAL, + IN ULONG Shift, + IN ULONG Flags); + +NTSYSAPI +VOID +NTAPI +RtlDeleteHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable); + +NTSYSAPI +BOOLEAN +NTAPI +RtlInsertEntryHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable, + IN PRTL_DYNAMIC_HASH_TABLE_ENTRY Entry, + IN ULONG_PTR Signature, + IN OUT PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context OPTIONAL); + +NTSYSAPI +BOOLEAN +NTAPI +RtlRemoveEntryHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable, + IN PRTL_DYNAMIC_HASH_TABLE_ENTRY Entry, + IN OUT PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context OPTIONAL); + +NTSYSAPI +PRTL_DYNAMIC_HASH_TABLE_ENTRY +NTAPI +RtlLookupEntryHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable, + IN ULONG_PTR Signature, + OUT PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context OPTIONAL); + +NTSYSAPI +PRTL_DYNAMIC_HASH_TABLE_ENTRY +NTAPI +RtlGetNextEntryHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable, + IN PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context); + +NTSYSAPI +BOOLEAN +NTAPI +RtlInitEnumerationHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable, + OUT PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator); + +NTSYSAPI +PRTL_DYNAMIC_HASH_TABLE_ENTRY +NTAPI +RtlEnumerateEntryHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable, + IN OUT PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator); + +NTSYSAPI +VOID +NTAPI +RtlEndEnumerationHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable, + IN OUT PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator); + +NTSYSAPI +BOOLEAN +NTAPI +RtlInitWeakEnumerationHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable, + OUT PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator); + +NTSYSAPI +PRTL_DYNAMIC_HASH_TABLE_ENTRY +NTAPI +RtlWeaklyEnumerateEntryHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable, + IN OUT PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator); + +NTSYSAPI +VOID +NTAPI +RtlEndWeakEnumerationHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable, + IN OUT PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator); + +NTSYSAPI +BOOLEAN +NTAPI +RtlExpandHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable); + +NTSYSAPI +BOOLEAN +NTAPI +RtlContractHashTable( + IN PRTL_DYNAMIC_HASH_TABLE HashTable); + +#endif /* (NTDDI_VERSION >= NTDDI_WIN7) */ + +#if defined(_AMD64_) || defined(_IA64_) +//DECLSPEC_DEPRECATED_DDK_WINXP +FORCEINLINE +LARGE_INTEGER +NTAPI_INLINE +RtlLargeIntegerDivide( + IN LARGE_INTEGER Dividend, + IN LARGE_INTEGER Divisor, + OUT PLARGE_INTEGER Remainder OPTIONAL) +{ + LARGE_INTEGER ret; + ret.QuadPart = Dividend.QuadPart / Divisor.QuadPart; + if (Remainder) + Remainder->QuadPart = Dividend.QuadPart % Divisor.QuadPart; + return ret; +} + +#else + +#if (NTDDI_VERSION >= NTDDI_WIN2K) +NTSYSAPI +LARGE_INTEGER +NTAPI +RtlLargeIntegerDivide( + IN LARGE_INTEGER Dividend, + IN LARGE_INTEGER Divisor, + OUT PLARGE_INTEGER Remainder OPTIONAL); +#endif + +#endif /* defined(_AMD64_) || defined(_IA64_) */ struct _LOADER_PARAMETER_BLOCK; struct _CREATE_DISK; @@ -3165,24 +3655,6 @@ /* RTL Functions */ -#if (defined(_M_AMD64) || defined(_M_IA64)) && !defined(_REALLY_GET_CALLERS_CALLER_) - -#define RtlGetCallersAddress(CallersAddress, CallersCaller) \ - *CallersAddress = (PVOID)_ReturnAddress(); \ - *CallersCaller = NULL; -#else - -#if (NTDDI_VERSION >= NTDDI_WIN2K) -NTSYSAPI -VOID -NTAPI -RtlGetCallersAddress( - OUT PVOID *CallersAddress, - OUT PVOID *CallersCaller); -#endif - -#endif - #if !defined(MIDL_PASS) FORCEINLINE @@ -3214,137 +3686,6 @@ } #endif - -#if defined(_AMD64_) || defined(_IA64_) -//DECLSPEC_DEPRECATED_DDK_WINXP -__inline -LARGE_INTEGER -NTAPI_INLINE -RtlLargeIntegerDivide( - IN LARGE_INTEGER Dividend, - IN LARGE_INTEGER Divisor, - OUT PLARGE_INTEGER Remainder OPTIONAL) -{ - LARGE_INTEGER ret; - ret.QuadPart = Dividend.QuadPart / Divisor.QuadPart; - if (Remainder) - Remainder->QuadPart = Dividend.QuadPart % Divisor.QuadPart; - return ret; -} - -#else - -#if (NTDDI_VERSION >= NTDDI_WIN2K) -NTSYSAPI -LARGE_INTEGER -NTAPI -RtlLargeIntegerDivide( - IN LARGE_INTEGER Dividend, - IN LARGE_INTEGER Divisor, - OUT PLARGE_INTEGER Remainder OPTIONAL); -#endif - -#endif /* defined(_AMD64_) || defined(_IA64_) */ - -#if (NTDDI_VERSION >= NTDDI_WIN2K) - -NTSYSAPI -BOOLEAN -NTAPI -RtlPrefixUnicodeString( - IN PCUNICODE_STRING String1, - IN PCUNICODE_STRING String2, - IN BOOLEAN CaseInSensitive); - -NTSYSAPI -VOID -NTAPI -RtlUpperString( - IN OUT PSTRING DestinationString, - IN const PSTRING SourceString); - -NTSYSAPI -NTSTATUS -NTAPI -RtlUpcaseUnicodeString( - IN OUT PUNICODE_STRING DestinationString, - IN PCUNICODE_STRING SourceString, - IN BOOLEAN AllocateDestinationString); - -NTSYSAPI -VOID -NTAPI -RtlMapGenericMask( - IN OUT PACCESS_MASK AccessMask, - IN PGENERIC_MAPPING GenericMapping); - -NTSYSAPI -NTSTATUS -NTAPI -RtlVolumeDeviceToDosName( - IN PVOID VolumeDeviceObject, - OUT PUNICODE_STRING DosName); - -NTSYSAPI -NTSTATUS -NTAPI -RtlGetVersion( - IN OUT PRTL_OSVERSIONINFOW lpVersionInformation); - -NTSYSAPI -NTSTATUS -NTAPI -RtlVerifyVersionInfo( - IN PRTL_OSVERSIONINFOEXW VersionInfo, - IN ULONG TypeMask, - IN ULONGLONG ConditionMask); - -NTSYSAPI -LONG -NTAPI -RtlCompareString( - IN const PSTRING String1, - IN const PSTRING String2, - BOOLEAN CaseInSensitive); - -NTSYSAPI -VOID -NTAPI -RtlCopyString( - OUT PSTRING DestinationString, - IN const PSTRING SourceString OPTIONAL); - -NTSYSAPI -BOOLEAN -NTAPI -RtlEqualString( - IN const PSTRING String1, - IN const PSTRING String2, - IN BOOLEAN CaseInSensitive); - -NTSYSAPI -NTSTATUS -NTAPI -RtlCharToInteger( - IN PCSZ String, - IN ULONG Base OPTIONAL, - OUT PULONG Value); - -NTSYSAPI -CHAR -NTAPI -RtlUpperChar( - IN CHAR Character); - -NTSYSAPI -ULONG -NTAPI -RtlWalkFrameChain( - OUT PVOID *Callers, - IN ULONG Count, - IN ULONG Flags); - -#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */ /* Security reference monitor routines */
14 years, 9 months
1
0
0
0
[dgorbachev] 46217: Link buslogic.sys against libcntpr. This should fix "undefined reference" errors reported on the forum.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Mon Mar 15 23:54:09 2010 New Revision: 46217 URL:
http://svn.reactos.org/svn/reactos?rev=46217&view=rev
Log: Link buslogic.sys against libcntpr. This should fix "undefined reference" errors reported on the forum. Modified: trunk/reactos/drivers/storage/port/buslogic/BusLogic958.c trunk/reactos/drivers/storage/port/buslogic/buslogic.rbuild Modified: trunk/reactos/drivers/storage/port/buslogic/BusLogic958.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/port/buslo…
============================================================================== --- trunk/reactos/drivers/storage/port/buslogic/BusLogic958.c [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/port/buslogic/BusLogic958.c [iso-8859-1] Mon Mar 15 23:54:09 2010 @@ -79,40 +79,6 @@ #include "BusLogic958.h" -int strcmp(const char* s1, const char* s2) -{ - while(*s1 == *s2) - { - if(*s1 == 0) return 0; - - s1 ++; - s2 ++; - } - - return *s1 - *s2; -} - -char * strcat(char * s, const char * append) -{ - char * save = s; - - for(; *s; ++s); - - while((*s++ = *append++)); - - return save; -} - -char * strcpy(char * to, const char * from) -{ - char *save = to; - - for (; (*to = *from); ++from, ++to); - - return save; -} - - ULONG NTAPI DriverEntry(IN PVOID DriverObject, Modified: trunk/reactos/drivers/storage/port/buslogic/buslogic.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/port/buslo…
============================================================================== --- trunk/reactos/drivers/storage/port/buslogic/buslogic.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/port/buslogic/buslogic.rbuild [iso-8859-1] Mon Mar 15 23:54:09 2010 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd"> -<module name="buslogic" type="kernelmodedriver" installbase="system32/drivers" installname="buslogic.sys"> +<module name="buslogic" type="kernelmodedriver" installbase="system32/drivers" installname="buslogic.sys" crt="libcntpr"> <bootstrap installbase="$(CDOUTPUT)" /> <include base="buslogic">.</include> <library>scsiport</library>
14 years, 9 months
1
0
0
0
[cwittich] 46216: [PSDK] fix callback definition
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Mar 15 23:21:34 2010 New Revision: 46216 URL:
http://svn.reactos.org/svn/reactos?rev=46216&view=rev
Log: [PSDK] fix callback definition Modified: trunk/reactos/include/psdk/winternl.h Modified: trunk/reactos/include/psdk/winternl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winternl.h?re…
============================================================================== --- trunk/reactos/include/psdk/winternl.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winternl.h [iso-8859-1] Mon Mar 15 23:21:34 2010 @@ -1554,7 +1554,7 @@ ULONG Type; } KEY_MULTIPLE_VALUE_INFORMATION, *PKEY_MULTIPLE_VALUE_INFORMATION; -typedef VOID (*PTIMER_APC_ROUTINE) ( PVOID, ULONG, LONG ); +typedef VOID (CALLBACK *PTIMER_APC_ROUTINE) ( PVOID, ULONG, LONG ); typedef enum _EVENT_TYPE { NotificationEvent,
14 years, 9 months
1
0
0
0
[cwittich] 46215: [NTDLL_WINETEST] sync ntdll_winetest to wine 1.1.40
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Mar 15 23:13:19 2010 New Revision: 46215 URL:
http://svn.reactos.org/svn/reactos?rev=46215&view=rev
Log: [NTDLL_WINETEST] sync ntdll_winetest to wine 1.1.40 Added: trunk/rostests/winetests/ntdll/directory.c (with props) Modified: trunk/rostests/winetests/ntdll/atom.c trunk/rostests/winetests/ntdll/change.c trunk/rostests/winetests/ntdll/error.c trunk/rostests/winetests/ntdll/exception.c trunk/rostests/winetests/ntdll/file.c trunk/rostests/winetests/ntdll/ntdll.rbuild trunk/rostests/winetests/ntdll/om.c trunk/rostests/winetests/ntdll/reg.c trunk/rostests/winetests/ntdll/rtl.c trunk/rostests/winetests/ntdll/string.c trunk/rostests/winetests/ntdll/testlist.c trunk/rostests/winetests/ntdll/time.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/rostests/winetests/ntdll/atom.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/atom.c?re…
Modified: trunk/rostests/winetests/ntdll/change.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/change.c?…
Added: trunk/rostests/winetests/ntdll/directory.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/directory…
Modified: trunk/rostests/winetests/ntdll/error.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/error.c?r…
Modified: trunk/rostests/winetests/ntdll/exception.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/exception…
Modified: trunk/rostests/winetests/ntdll/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/file.c?re…
Modified: trunk/rostests/winetests/ntdll/ntdll.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/ntdll.rbu…
Modified: trunk/rostests/winetests/ntdll/om.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/om.c?rev=…
Modified: trunk/rostests/winetests/ntdll/reg.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/reg.c?rev…
Modified: trunk/rostests/winetests/ntdll/rtl.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/rtl.c?rev…
Modified: trunk/rostests/winetests/ntdll/string.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/string.c?…
Modified: trunk/rostests/winetests/ntdll/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/testlist.…
Modified: trunk/rostests/winetests/ntdll/time.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/time.c?re…
14 years, 9 months
1
0
0
0
[cwittich] 46214: [KERNEL32] sync parameter validation for SearchPath with wine 1.1.40
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Mar 15 23:04:15 2010 New Revision: 46214 URL:
http://svn.reactos.org/svn/reactos?rev=46214&view=rev
Log: [KERNEL32] sync parameter validation for SearchPath with wine 1.1.40 Modified: trunk/reactos/dll/win32/kernel32/file/dir.c Modified: trunk/reactos/dll/win32/kernel32/file/dir.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/di…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/dir.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/file/dir.c [iso-8859-1] Mon Mar 15 23:04:15 2010 @@ -837,6 +837,12 @@ DWORD RetValue = 0; NTSTATUS Status = STATUS_SUCCESS; + if (!lpFileName) + { + SetLastError(ERROR_INVALID_PARAMETER); + return 0; + } + RtlInitAnsiString (&Path, (LPSTR)lpPath); RtlInitAnsiString (&FileName, @@ -985,6 +991,12 @@ { DWORD ret = 0; + if (!lpFileName || !lpFileName[0]) + { + SetLastError(ERROR_INVALID_PARAMETER); + return 0; + } + /* If the name contains an explicit path, ignore the path */ if (ContainsPath(lpFileName)) {
14 years, 9 months
1
0
0
0
[cwittich] 46213: [NTDLL_WINETEST] partial sync of ntdll_winetest to match newer structs in winternl
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Mar 15 18:59:46 2010 New Revision: 46213 URL:
http://svn.reactos.org/svn/reactos?rev=46213&view=rev
Log: [NTDLL_WINETEST] partial sync of ntdll_winetest to match newer structs in winternl Modified: trunk/rostests/winetests/ntdll/info.c Modified: trunk/rostests/winetests/ntdll/info.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/info.c?re…
============================================================================== --- trunk/rostests/winetests/ntdll/info.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ntdll/info.c [iso-8859-1] Mon Mar 15 18:59:46 2010 @@ -23,6 +23,9 @@ static NTSTATUS (WINAPI * pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG); static NTSTATUS (WINAPI * pNtQueryInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG); +static NTSTATUS (WINAPI * pNtQueryInformationThread)(HANDLE, THREADINFOCLASS, PVOID, ULONG, PULONG); +static NTSTATUS (WINAPI * pNtSetInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG); +static NTSTATUS (WINAPI * pNtSetInformationThread)(HANDLE, THREADINFOCLASS, PVOID, ULONG); static NTSTATUS (WINAPI * pNtReadVirtualMemory)(HANDLE, const void*, void*, SIZE_T, SIZE_T*); /* one_before_last_pid is used to be able to compare values of a still running process @@ -44,12 +47,15 @@ HMODULE hntdll = GetModuleHandle("ntdll"); if (!hntdll) { - skip("Not running on NT\n"); + win_skip("Not running on NT\n"); return FALSE; } NTDLL_GET_PROC(NtQuerySystemInformation); NTDLL_GET_PROC(NtQueryInformationProcess); + NTDLL_GET_PROC(NtQueryInformationThread); + NTDLL_GET_PROC(NtSetInformationProcess); + NTDLL_GET_PROC(NtSetInformationThread); NTDLL_GET_PROC(NtReadVirtualMemory); return TRUE; @@ -122,18 +128,22 @@ { NTSTATUS status; ULONG ReturnLength; - SYSTEM_PERFORMANCE_INFORMATION spi; - - status = pNtQuerySystemInformation(SystemPerformanceInformation, &spi, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - status = pNtQuerySystemInformation(SystemPerformanceInformation, &spi, sizeof(spi), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(spi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); - - status = pNtQuerySystemInformation(SystemPerformanceInformation, &spi, sizeof(spi) + 2, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(spi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); + ULONGLONG buffer[sizeof(SYSTEM_PERFORMANCE_INFORMATION)/sizeof(ULONGLONG) + 1]; + + status = pNtQuerySystemInformation(SystemPerformanceInformation, buffer, 0, &ReturnLength); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); + + status = pNtQuerySystemInformation(SystemPerformanceInformation, buffer, + sizeof(SYSTEM_PERFORMANCE_INFORMATION), &ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( ReturnLength == sizeof(SYSTEM_PERFORMANCE_INFORMATION), "Inconsistent length %d\n", ReturnLength); + + status = pNtQuerySystemInformation(SystemPerformanceInformation, buffer, + sizeof(SYSTEM_PERFORMANCE_INFORMATION) + 2, &ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( ReturnLength == sizeof(SYSTEM_PERFORMANCE_INFORMATION) || + ReturnLength == sizeof(SYSTEM_PERFORMANCE_INFORMATION) + 2, + "Inconsistent length %d\n", ReturnLength); /* Not return values yet, as struct members are unknown */ } @@ -227,7 +237,7 @@ /* Copy of our winternl.h structure turned into a private one */ typedef struct _SYSTEM_PROCESS_INFORMATION_PRIVATE { - DWORD dwOffset; + ULONG NextEntryOffset; DWORD dwThreadCount; DWORD dwUnknown1[6]; FILETIME ftCreationTime; @@ -235,9 +245,9 @@ FILETIME ftKernelTime; UNICODE_STRING ProcessName; DWORD dwBasePriority; - DWORD dwProcessID; - DWORD dwParentProcessID; - DWORD dwHandleCount; + HANDLE UniqueProcessId; + HANDLE ParentProcessId; + ULONG HandleCount; DWORD dwUnknown3; DWORD dwUnknown4; VM_COUNTERS vmCounters; @@ -261,15 +271,15 @@ ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); spi = spi_buf; - /* Get the first dwOffset, from this we can deduce the OS version we're running + /* Get the first NextEntryOffset, from this we can deduce the OS version we're running * * W2K/WinXP/W2K3: - * dwOffset for a process is 184 + (no. of threads) * sizeof(SYSTEM_THREAD_INFORMATION) + * NextEntryOffset for a process is 184 + (no. of threads) * sizeof(SYSTEM_THREAD_INFORMATION) * NT: - * dwOffset for a process is 136 + (no. of threads) * sizeof(SYSTEM_THREAD_INFORMATION) + * NextEntryOffset for a process is 136 + (no. of threads) * sizeof(SYSTEM_THREAD_INFORMATION) * Wine (with every windows version): - * dwOffset for a process is 0 if just this test is running - * dwOffset for a process is 184 + (no. of threads) * sizeof(SYSTEM_THREAD_INFORMATION) + + * NextEntryOffset for a process is 0 if just this test is running + * NextEntryOffset for a process is 184 + (no. of threads) * sizeof(SYSTEM_THREAD_INFORMATION) + * ProcessName.MaximumLength * if more wine processes are running * @@ -278,9 +288,9 @@ pNtQuerySystemInformation(SystemBasicInformation, &sbi, sizeof(sbi), &ReturnLength); - is_nt = ( spi->dwOffset - (sbi.NumberOfProcessors * sizeof(SYSTEM_THREAD_INFORMATION)) == 136); - - if (is_nt) skip("Windows version is NT, we will skip thread tests\n"); + is_nt = ( spi->NextEntryOffset - (sbi.NumberOfProcessors * sizeof(SYSTEM_THREAD_INFORMATION)) == 136); + + if (is_nt) win_skip("Windows version is NT, we will skip thread tests\n"); /* Check if we have some return values * @@ -294,7 +304,7 @@ { i++; - last_pid = spi->dwProcessID; + last_pid = (DWORD_PTR)spi->UniqueProcessId; ok( spi->dwThreadCount > 0, "Expected some threads for this process, got 0\n"); @@ -306,17 +316,17 @@ for ( j = 0; j < spi->dwThreadCount; j++) { k++; - ok ( spi->ti[j].dwOwningPID == spi->dwProcessID, - "The owning pid of the thread (%d) doesn't equal the pid (%d) of the process\n", - spi->ti[j].dwOwningPID, spi->dwProcessID); + ok ( spi->ti[j].ClientId.UniqueProcess == spi->UniqueProcessId, + "The owning pid of the thread (%p) doesn't equal the pid (%p) of the process\n", + spi->ti[j].ClientId.UniqueProcess, spi->UniqueProcessId); } } - if (!spi->dwOffset) break; + if (!spi->NextEntryOffset) break; one_before_last_pid = last_pid; - spi = (SYSTEM_PROCESS_INFORMATION_PRIVATE*)((char*)spi + spi->dwOffset); + spi = (SYSTEM_PROCESS_INFORMATION_PRIVATE*)((char*)spi + spi->NextEntryOffset); } trace("Total number of running processes : %d\n", i); if (!is_nt) trace("Total number of running threads : %d\n", k); @@ -545,12 +555,12 @@ ULONG ReturnLength; typedef struct _PROCESS_BASIC_INFORMATION_PRIVATE { - DWORD ExitStatus; - DWORD PebBaseAddress; - DWORD AffinityMask; - DWORD BasePriority; - ULONG UniqueProcessId; - ULONG InheritedFromUniqueProcessId; + DWORD_PTR ExitStatus; + PPEB PebBaseAddress; + DWORD_PTR AffinityMask; + DWORD_PTR BasePriority; + ULONG_PTR UniqueProcessId; + ULONG_PTR InheritedFromUniqueProcessId; } PROCESS_BASIC_INFORMATION_PRIVATE, *PPROCESS_BASIC_INFORMATION_PRIVATE; PROCESS_BASIC_INFORMATION_PRIVATE pbi; @@ -604,7 +614,7 @@ ok( sizeof(pbi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); /* Check if we have some return values */ - trace("ProcessID : %d\n", pbi.UniqueProcessId); + trace("ProcessID : %lx\n", pbi.UniqueProcessId); ok( pbi.UniqueProcessId > 0, "Expected a ProcessID > 0, got 0\n"); } @@ -613,30 +623,30 @@ NTSTATUS status; ULONG ReturnLength; VM_COUNTERS pvi; + ULONG old_size = FIELD_OFFSET(VM_COUNTERS,PrivatePageCount); status = pNtQueryInformationProcess(NULL, ProcessVmCounters, NULL, sizeof(pvi), NULL); ok( status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_HANDLE, "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n", status); - status = pNtQueryInformationProcess(NULL, ProcessVmCounters, &pvi, sizeof(pvi), NULL); + status = pNtQueryInformationProcess(NULL, ProcessVmCounters, &pvi, old_size, NULL); ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status); /* Windows XP and W2K3 will report success for a size of 44 AND 48 ! Windows W2K will only report success for 44. - For now we only care for 44, which is sizeof(VM_COUNTERS) - If an app depends on it, we have to implement this in ntdll/process.c + For now we only care for 44, which is FIELD_OFFSET(VM_COUNTERS,PrivatePageCount)) */ status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessVmCounters, &pvi, 24, &ReturnLength); ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessVmCounters, &pvi, sizeof(pvi), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(pvi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); + status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessVmCounters, &pvi, old_size, &ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( old_size == ReturnLength, "Inconsistent length %d\n", ReturnLength); status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessVmCounters, &pvi, 46, &ReturnLength); ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - ok( sizeof(pvi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); + ok( ReturnLength == old_size || ReturnLength == sizeof(pvi), "Inconsistent length %d\n", ReturnLength); /* Check if we have some return values */ trace("WorkingSetSize : %ld\n", pvi.WorkingSetSize); @@ -656,7 +666,7 @@ status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessIoCounters, &pii, sizeof(pii), &ReturnLength); if (status == STATUS_NOT_SUPPORTED) { - skip("ProcessIoCounters information class is not supported\n"); + win_skip("ProcessIoCounters information class is not supported\n"); return; } @@ -746,6 +756,7 @@ NTSTATUS status; ULONG ReturnLength; DWORD handlecount; + BYTE buffer[2 * sizeof(DWORD)]; HANDLE process; status = pNtQueryInformationProcess(NULL, ProcessHandleCount, NULL, sizeof(handlecount), NULL); @@ -773,8 +784,9 @@ ok( sizeof(handlecount) == ReturnLength, "Inconsistent length %d\n", ReturnLength); CloseHandle(process); - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessHandleCount, &handlecount, sizeof(handlecount) * 2, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); + status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessHandleCount, buffer, sizeof(buffer), &ReturnLength); + ok( status == STATUS_INFO_LENGTH_MISMATCH || status == STATUS_SUCCESS, + "Expected STATUS_INFO_LENGTH_MISMATCH or STATUS_SUCCESS, got %08x\n", status); ok( sizeof(handlecount) == ReturnLength, "Inconsistent length %d\n", ReturnLength); /* Check if we have some return values */ @@ -797,7 +809,7 @@ status = pNtQueryInformationProcess(NULL, ProcessImageFileName, &image_file_name, sizeof(image_file_name), NULL); if (status == STATUS_INVALID_INFO_CLASS) { - skip("ProcessImageFileName is not supported\n"); + win_skip("ProcessImageFileName is not supported\n"); return; } ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status); @@ -818,6 +830,7 @@ file_nameA[len] = '\0'; HeapFree(GetProcessHeap(), 0, buffer); trace("process image file name: %s\n", file_nameA); + todo_wine ok(strncmp(file_nameA, "\\Device\\", 8) == 0, "Process image name should be an NT path beginning with \\Device\\ (is %s)\n", file_nameA); HeapFree(GetProcessHeap(), 0, file_nameA); } @@ -865,16 +878,102 @@ ok( readcount == 12, "Expected to read 12 bytes, got %ld\n",readcount); ok( strcmp(teststring, buffer) == 0, "Expected read memory to be the same as original memory\n"); - /* this test currently crashes wine with "wine client error:<process id>: read: Bad address" - * because the reply from wine server is directly read into the buffer and that fails with EFAULT - */ /* illegal local address */ - /*status = pNtReadVirtualMemory(process, teststring, (void *)0x1234, 12, &readcount); - ok( status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", status); + status = pNtReadVirtualMemory(process, teststring, (void *)0x1234, 12, &readcount); + ok( status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got %08x\n", status); ok( readcount == 0, "Expected to read 0 bytes, got %ld\n",readcount); - */ CloseHandle(process); +} + +static void test_affinity(void) +{ + NTSTATUS status; + PROCESS_BASIC_INFORMATION pbi; + DWORD_PTR proc_affinity, thread_affinity; + THREAD_BASIC_INFORMATION tbi; + SYSTEM_INFO si; + + GetSystemInfo(&si); + status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessBasicInformation, &pbi, sizeof(pbi), NULL ); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + proc_affinity = (DWORD_PTR)pbi.Reserved2[0]; + ok( proc_affinity == (1 << si.dwNumberOfProcessors) - 1, "Unexpected process affinity\n" ); + proc_affinity = 1 << si.dwNumberOfProcessors; + status = pNtSetInformationProcess( GetCurrentProcess(), ProcessAffinityMask, &proc_affinity, sizeof(proc_affinity) ); + ok( status == STATUS_INVALID_PARAMETER, + "Expected STATUS_INVALID_PARAMETER, got %08x\n", status); + + proc_affinity = 0; + status = pNtSetInformationProcess( GetCurrentProcess(), ProcessAffinityMask, &proc_affinity, sizeof(proc_affinity) ); + ok( status == STATUS_INVALID_PARAMETER, + "Expected STATUS_INVALID_PARAMETER, got %08x\n", status); + + status = pNtQueryInformationThread( GetCurrentThread(), ThreadBasicInformation, &tbi, sizeof(tbi), NULL ); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( tbi.AffinityMask == (1 << si.dwNumberOfProcessors) - 1, "Unexpected thread affinity\n" ); + thread_affinity = 1 << si.dwNumberOfProcessors; + status = pNtSetInformationThread( GetCurrentThread(), ThreadAffinityMask, &thread_affinity, sizeof(thread_affinity) ); + ok( status == STATUS_INVALID_PARAMETER, + "Expected STATUS_INVALID_PARAMETER, got %08x\n", status); + thread_affinity = 0; + status = pNtSetInformationThread( GetCurrentThread(), ThreadAffinityMask, &thread_affinity, sizeof(thread_affinity) ); + ok( status == STATUS_INVALID_PARAMETER, + "Expected STATUS_INVALID_PARAMETER, got %08x\n", status); + + thread_affinity = 1; + status = pNtSetInformationThread( GetCurrentThread(), ThreadAffinityMask, &thread_affinity, sizeof(thread_affinity) ); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + status = pNtQueryInformationThread( GetCurrentThread(), ThreadBasicInformation, &tbi, sizeof(tbi), NULL ); + ok( tbi.AffinityMask == 1, "Unexpected thread affinity\n" ); + + /* NOTE: Pre-Vista does not recognize the "all processors" flag (all bits set) */ + thread_affinity = ~0UL; + status = pNtSetInformationThread( GetCurrentThread(), ThreadAffinityMask, &thread_affinity, sizeof(thread_affinity) ); + ok( broken(status == STATUS_INVALID_PARAMETER) || status == STATUS_SUCCESS, + "Expected STATUS_SUCCESS, got %08x\n", status); + + if (si.dwNumberOfProcessors <= 1) + { + skip("only one processor, skipping affinity testing\n"); + return; + } + + /* Test thread affinity mask resulting from "all processors" flag */ + if (status == STATUS_SUCCESS) + { + status = pNtQueryInformationThread( GetCurrentThread(), ThreadBasicInformation, &tbi, sizeof(tbi), NULL ); + ok( broken(tbi.AffinityMask == 1) || tbi.AffinityMask == (1 << si.dwNumberOfProcessors) - 1, + "Unexpected thread affinity\n" ); + } + else + skip("Cannot test thread affinity mask for 'all processors' flag\n"); + + proc_affinity = 2; + status = pNtSetInformationProcess( GetCurrentProcess(), ProcessAffinityMask, &proc_affinity, sizeof(proc_affinity) ); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessBasicInformation, &pbi, sizeof(pbi), NULL ); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + proc_affinity = (DWORD_PTR)pbi.Reserved2[0]; + ok( proc_affinity == 2, "Unexpected process affinity\n" ); + /* Setting the process affinity changes the thread affinity to match */ + status = pNtQueryInformationThread( GetCurrentThread(), ThreadBasicInformation, &tbi, sizeof(tbi), NULL ); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( tbi.AffinityMask == 2, "Unexpected thread affinity\n" ); + /* The thread affinity is restricted to the process affinity */ + thread_affinity = 1; + status = pNtSetInformationThread( GetCurrentThread(), ThreadAffinityMask, &thread_affinity, sizeof(thread_affinity) ); + ok( status == STATUS_INVALID_PARAMETER, + "Expected STATUS_INVALID_PARAMETER, got %08x\n", status); + + proc_affinity = (1 << si.dwNumberOfProcessors) - 1; + status = pNtSetInformationProcess( GetCurrentProcess(), ProcessAffinityMask, &proc_affinity, sizeof(proc_affinity) ); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + /* Resetting the process affinity also resets the thread affinity */ + status = pNtQueryInformationThread( GetCurrentThread(), ThreadBasicInformation, &tbi, sizeof(tbi), NULL ); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( tbi.AffinityMask == (1 << si.dwNumberOfProcessors) - 1, + "Unexpected thread affinity\n" ); } START_TEST(info) @@ -961,4 +1060,7 @@ /* belongs into it's own file */ trace("Starting test_readvirtualmemory()\n"); test_readvirtualmemory(); -} + + trace("Starting test_affinity()\n"); + test_affinity(); +}
14 years, 9 months
1
0
0
0
[cwittich] 46212: [DBGHELP] sync dbghelp with wine 1.1.40
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Mar 15 18:58:48 2010 New Revision: 46212 URL:
http://svn.reactos.org/svn/reactos?rev=46212&view=rev
Log: [DBGHELP] sync dbghelp with wine 1.1.40 Added: trunk/reactos/dll/win32/dbghelp/cpu_i386.c (with props) trunk/reactos/dll/win32/dbghelp/cpu_ppc.c (with props) trunk/reactos/dll/win32/dbghelp/cpu_x86_64.c (with props) trunk/reactos/dll/win32/dbghelp/crc32.c (with props) trunk/reactos/dll/win32/dbghelp/macho_module.c (with props) trunk/reactos/dll/win32/dbghelp/version.rc (with props) Modified: trunk/reactos/dll/win32/dbghelp/coff.c trunk/reactos/dll/win32/dbghelp/dbghelp.c trunk/reactos/dll/win32/dbghelp/dbghelp.rbuild trunk/reactos/dll/win32/dbghelp/dbghelp_private.h trunk/reactos/dll/win32/dbghelp/dwarf.c trunk/reactos/dll/win32/dbghelp/dwarf.h trunk/reactos/dll/win32/dbghelp/elf_module.c trunk/reactos/dll/win32/dbghelp/minidump.c trunk/reactos/dll/win32/dbghelp/module.c trunk/reactos/dll/win32/dbghelp/msc.c trunk/reactos/dll/win32/dbghelp/path.c trunk/reactos/dll/win32/dbghelp/pe_module.c trunk/reactos/dll/win32/dbghelp/rosstubs.c trunk/reactos/dll/win32/dbghelp/source.c trunk/reactos/dll/win32/dbghelp/stabs.c trunk/reactos/dll/win32/dbghelp/stack.c trunk/reactos/dll/win32/dbghelp/storage.c trunk/reactos/dll/win32/dbghelp/symbol.c trunk/reactos/dll/win32/dbghelp/type.c trunk/reactos/include/psdk/winternl.h trunk/reactos/include/reactos/wine/mscvpdb.h [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/dbghelp/coff.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/coff.c?r…
Added: trunk/reactos/dll/win32/dbghelp/cpu_i386.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/cpu_i386…
Added: trunk/reactos/dll/win32/dbghelp/cpu_ppc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/cpu_ppc.…
Added: trunk/reactos/dll/win32/dbghelp/cpu_x86_64.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/cpu_x86_…
Added: trunk/reactos/dll/win32/dbghelp/crc32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/crc32.c?…
Modified: trunk/reactos/dll/win32/dbghelp/dbghelp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dbghelp.…
Modified: trunk/reactos/dll/win32/dbghelp/dbghelp.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dbghelp.…
Modified: trunk/reactos/dll/win32/dbghelp/dbghelp_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dbghelp_…
Modified: trunk/reactos/dll/win32/dbghelp/dwarf.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dwarf.c?…
Modified: trunk/reactos/dll/win32/dbghelp/dwarf.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dwarf.h?…
Modified: trunk/reactos/dll/win32/dbghelp/elf_module.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/elf_modu…
Added: trunk/reactos/dll/win32/dbghelp/macho_module.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/macho_mo…
Modified: trunk/reactos/dll/win32/dbghelp/minidump.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/minidump…
Modified: trunk/reactos/dll/win32/dbghelp/module.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/module.c…
Modified: trunk/reactos/dll/win32/dbghelp/msc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/msc.c?re…
Modified: trunk/reactos/dll/win32/dbghelp/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/path.c?r…
Modified: trunk/reactos/dll/win32/dbghelp/pe_module.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/pe_modul…
Modified: trunk/reactos/dll/win32/dbghelp/rosstubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/rosstubs…
Modified: trunk/reactos/dll/win32/dbghelp/source.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/source.c…
Modified: trunk/reactos/dll/win32/dbghelp/stabs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/stabs.c?…
Modified: trunk/reactos/dll/win32/dbghelp/stack.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/stack.c?…
Modified: trunk/reactos/dll/win32/dbghelp/storage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/storage.…
Modified: trunk/reactos/dll/win32/dbghelp/symbol.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/symbol.c…
Modified: trunk/reactos/dll/win32/dbghelp/type.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/type.c?r…
Added: trunk/reactos/dll/win32/dbghelp/version.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/version.…
Modified: trunk/reactos/include/psdk/winternl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winternl.h?re…
Modified: trunk/reactos/include/reactos/wine/mscvpdb.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/mscvp…
14 years, 9 months
1
0
0
0
[dgorbachev] 46211: Update log2lines to ver. 2.2. Jan Roeloffzen, bug #4342.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Mon Mar 15 18:03:37 2010 New Revision: 46211 URL:
http://svn.reactos.org/svn/reactos?rev=46211&view=rev
Log: Update log2lines to ver. 2.2. Jan Roeloffzen, bug #4342. Added: trunk/reactos/tools/log2lines/match.c (with props) trunk/reactos/tools/log2lines/match.h (with props) Modified: trunk/reactos/tools/log2lines/cache.c trunk/reactos/tools/log2lines/cache.h trunk/reactos/tools/log2lines/cmd.c trunk/reactos/tools/log2lines/config.h trunk/reactos/tools/log2lines/help.c trunk/reactos/tools/log2lines/image.c trunk/reactos/tools/log2lines/list.c trunk/reactos/tools/log2lines/list.h trunk/reactos/tools/log2lines/log2lines.c trunk/reactos/tools/log2lines/log2lines.mak trunk/reactos/tools/log2lines/options.c trunk/reactos/tools/log2lines/options.h trunk/reactos/tools/log2lines/revision.c trunk/reactos/tools/log2lines/stat.c trunk/reactos/tools/log2lines/util.c trunk/reactos/tools/log2lines/util.h trunk/reactos/tools/log2lines/version.h Modified: trunk/reactos/tools/log2lines/cache.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/cache.c?re…
============================================================================== --- trunk/reactos/tools/log2lines/cache.c [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/cache.c [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -4,6 +4,7 @@ * * - Image directory caching */ + #include <stdio.h> #include <string.h> #include <stdlib.h> @@ -63,6 +64,14 @@ if (iso_copied) remove(iso_tmp); return res; +} + +int +cleanable(char *path) +{ + if (strcmp(basename(path),DEF_OPT_DIR) == 0) + return 1; + return 0; } int @@ -135,7 +144,10 @@ cache_name = malloc(MAX_PATH); tmp_name = malloc(MAX_PATH); strcpy(cache_name, opt_dir); - strcat(cache_name, PATH_STR CACHEFILE); + if (cleanable(opt_dir)) + strcat(cache_name, ALT_PATH_STR CACHEFILE); + else + strcat(cache_name, PATH_STR CACHEFILE); strcpy(tmp_name, cache_name); strcat(tmp_name, "~"); return 0; @@ -271,4 +283,4 @@ return 0; } - +/* EOF */ Modified: trunk/reactos/tools/log2lines/cache.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/cache.h?re…
============================================================================== --- trunk/reactos/tools/log2lines/cache.h [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/cache.h [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -10,5 +10,6 @@ int check_directory(int force); int read_cache(void); int create_cache(int force, int skipImageBase); +int cleanable(char *path); /* EOF */ Modified: trunk/reactos/tools/log2lines/cmd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/cmd.c?rev=…
============================================================================== --- trunk/reactos/tools/log2lines/cmd.c [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/cmd.c [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -4,6 +4,7 @@ * * - Cli for escape commands */ + #include <stdio.h> #include <string.h> #include <stdlib.h> @@ -17,7 +18,7 @@ /* When you edit the cmd line and/or use the history instead of just typing, * a bunch of editing BS and space characters * is inserted, so the string looks right on the console but still - * starts with the original string: + * contains the original string, plus other garbage: */ static char *backSpaceEdit(char *s) @@ -140,6 +141,39 @@ } return changed; +} + +static int +handle_address_cmd(FILE *outFile, char *arg) +{ + PLIST_MEMBER plm; + char Image[NAMESIZE]; + DWORD Offset; + int cnt; + char *s; + + if(( s = strchr(arg, ':') )) + { + *s = ' '; + if ( (cnt = sscanf(arg,"%20s %lx", Image, &Offset)) == 2) + { + if (( plm = entry_lookup(&cache, Image) )) + { + if (plm->RelBase != INVALID_BASE) + esclog(outFile, "Address: 0x%lx\n", plm->RelBase + Offset) + else + esclog(outFile, "Relocated base missing for '%s' ('mod' will update)\n", Image); + } + else + esclog(outFile, "Image '%s' not found\n", Image); + } + else + esclog(outFile, "usage: `a <Image>:<offset>\n"); + } + else + esclog(outFile, "':' expected\n"); + + return 1; } char @@ -177,12 +211,15 @@ opt_cli = 1; switch (cmd) { + case 'a': + handle_address_cmd(outFile, arg); + break; case 'h': usage(1); break; case 'b': if (handle_switch(outFile, &opt_buffered, arg, "-b Logfile buffering")) - set_LogFile(logFile); //re-open same logfile + set_LogFile(&logFile); //re-open same logfile break; case 'c': handle_switch(outFile, &opt_console, NULL, "-c Console option"); @@ -191,8 +228,18 @@ handle_switch_str(outFile, opt_dir, NULL, "-d Directory option"); break; case 'l': - if (handle_switch_str(outFile, opt_logFile, arg, "-l logfile")) - set_LogFile(logFile); //open new logfile + if (handle_switch_str(outFile, opt_logFile, arg, "-l logfile") || (strcmp(opt_mod,"a")!=0)) + { + opt_mod = "a"; + set_LogFile(&logFile); //open new logfile + } + break; + case 'L': + if (handle_switch_str(outFile, opt_logFile, arg, "-L logfile") || (strcmp(opt_mod,"w")!=0)) + { + opt_mod = "w"; + set_LogFile(&logFile); //open new logfile + } break; case 'm': handle_switch(outFile, &opt_Mark, arg, "-m mark (*)"); @@ -212,8 +259,10 @@ break; case 'R': changed = handle_switch_pstr(outFile, &opt_Revision, arg, NULL); + opt_Revision_check = 0; if (opt_Revision) { + opt_Revision_check = 1; if (strstr(opt_Revision, "check") == opt_Revision) { esclog(outFile, "-R is \"%s\" (%s)\n", opt_Revision, changed ? "changed":"unchanged"); @@ -253,6 +302,7 @@ { handle_switch(outFile, &opt_undo, "1", "-u Undo"); handle_switch(outFile, &opt_redo, "1", "-U Undo and reprocess"); + opt_Revision_check = 1; } esclog(outFile, "-S Sources option is %d+%d,\"%s\"\n", opt_Source, opt_SrcPlus, opt_SourcesPath); esclog(outFile, "(Setting source tree not implemented)\n"); @@ -289,3 +339,5 @@ return KDBG_ESC_CHAR; //handled escaped command } + +/* EOF */ Modified: trunk/reactos/tools/log2lines/config.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/config.h?r…
============================================================================== --- trunk/reactos/tools/log2lines/config.h [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/config.h [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -26,6 +26,11 @@ "%s x -y -r %s" PATH_STR "reactos" PATH_STR "reactos.cab -o%s" \ PATH_STR "reactos" PATH_STR "reactos > " DEV_NULL +/* When we can't use a normal path, because it gets cleaned, + * fallback to name mangling: + */ +#define ALT_PATH_STR "#" + #define LINESIZE 1024 #define NAMESIZE 80 Modified: trunk/reactos/tools/log2lines/help.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/help.c?rev…
============================================================================== --- trunk/reactos/tools/log2lines/help.c [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/help.c [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -4,6 +4,7 @@ * * - Help text and functions */ + #include <stdio.h> #include "version.h" @@ -50,6 +51,9 @@ " -h This text.\n\n" " -l <logFile>\n" " <logFile>: Append copy to specified logFile.\n" +" Default: no logFile\n\n" +" -L <logFile>\n" +" <logFile>: (Over)write copy to specified logFile.\n" " Default: no logFile\n\n" " -m Prefix (mark) each translated line with '* '.\n\n" " -M Prefix (mark) each NOT translated line with '? '.\n" @@ -112,7 +116,7 @@ " For a reliable result, these sources should be up to date with\n" " the tested revision (or try '-R check').\n" " Can be combined with -tTR.\n" -" Implies -U (For retrieving source info).\n\n" +" Implies -U (For retrieving source info) and -R check.\n\n" " -t Translate twice. The address itself and for (address-1).\n" " Show extra filename, func and linenumber between [..] if they differ\n" " So if only the linenumbers differ, then only show the extra\n" @@ -139,7 +143,10 @@ " Options accepting a string as argument can be cleared by the value '" KDBG_ESC_OFF "'.\n" " Some ClI commands are read only or not (entirely) implemented.\n" " If no value is provided, the current one is printed.\n" -" There are only a few extra ClI commands or with different behaviour:\n" +" There are a few extra ClI commands or with different behaviour:\n" +" - `a <module>:<reladdress>:\n" +" - Outputs absolute address e.g. for setting breakpoints.\n" +" - Do a 'mod' first to retrieve relocation info.\n" " - `h : shows this helptext (without exiting)\n" " - `q : quits log2lines\n" " - `R regscan : the output is printed immediately (do a 'bt' first)\n" @@ -233,7 +240,14 @@ " | L2L- -l logfile is \"new.log\" (changed)\n" " kdb:> `l off\n" " | L2L- -l logfile is "" (changed)\n" -" kdb:>\n" +" kdb:>\n\n" +" Set a breakpoint with help of 'mod' and '`a':\n" +" <msi.dll:2e35d (dll/win32/msi/msiquery.c:189 (MSI_IterateRecords))>\n" +" kdb:> mod (for kernel tracing usually only needed once)\n" +" -- mod output with reloc info\n" +" kdb:> `a msi.dll:2e35d\n" +" | L2L- Address: 0x00096ca0\n" +" kdb:> bpx 0x00096ca0\n\n" "\n"; void @@ -246,3 +260,5 @@ else fprintf(stderr, "Try log2lines -h\n"); } + +/* EOF */ Modified: trunk/reactos/tools/log2lines/image.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/image.c?re…
============================================================================== --- trunk/reactos/tools/log2lines/image.c [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/image.c [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -4,11 +4,12 @@ * * - Image functions for symbol info */ -#include <sys/stat.h> + #include <errno.h> #include <string.h> #include <rsym.h> +#include "compat.h" #include "util.h" #include "options.h" #include "log2lines.h" @@ -163,3 +164,5 @@ fclose(fr); return 0; } + +/* EOF */ Modified: trunk/reactos/tools/log2lines/list.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/list.c?rev…
============================================================================== --- trunk/reactos/tools/log2lines/list.c [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/list.c [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -9,6 +9,7 @@ #include <string.h> #include <stdlib.h> +#include "config.h" #include "compat.h" #include "list.h" #include "util.h" @@ -162,6 +163,8 @@ l2l_dbg(1, "ImageBase field missing\n"); return entry_delete(pentry); } + pentry->RelBase = INVALID_BASE; + pentry->Size = 0; return pentry; } @@ -212,3 +215,5 @@ return pentry; } + +/* EOF */ Modified: trunk/reactos/tools/log2lines/list.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/list.h?rev…
============================================================================== --- trunk/reactos/tools/log2lines/list.h [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/list.h [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -6,14 +6,16 @@ char *name; char *path; size_t ImageBase; + size_t RelBase; + size_t Size; struct entry_struct *pnext; -} LIST_MEMBER,*PLIST_MEMBER; +} LIST_MEMBER, *PLIST_MEMBER; typedef struct list_struct { PLIST_MEMBER phead; PLIST_MEMBER ptail; -} LIST,*PLIST; +} LIST, *PLIST; PLIST_MEMBER entry_lookup(PLIST list, char *name); PLIST_MEMBER entry_delete(PLIST_MEMBER pentry); Modified: trunk/reactos/tools/log2lines/log2lines.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/log2lines.…
============================================================================== --- trunk/reactos/tools/log2lines/log2lines.c [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/log2lines.c [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -19,10 +19,13 @@ #include "log2lines.h" #include "help.h" #include "cmd.h" - - -static FILE *stdIn = NULL; -static FILE *stdOut = NULL; +#include "match.h" + + +static FILE *dbgIn = NULL; +static FILE *dbgOut = NULL; +static FILE *conIn = NULL; +static FILE *conOut = NULL; static const char *kdbg_prompt = KDBG_PROMPT; static const char *kdbg_cont = KDBG_CONT; @@ -443,15 +446,18 @@ { if (p == p_eos) { - //kdbg prompt, so already echoed char by char + // kdbg prompt, so already echoed char by char memset(Line, '\0', LINESIZE); translate_char(c, outFile); } else { - translate_line(outFile, Line, path, LineOut); - translate_char(c, outFile); - report(outFile); + if (match_line(outFile, Line)) + { + translate_line(outFile, Line, path, LineOut); + translate_char(c, outFile); + report(outFile); + } } } } @@ -562,8 +568,10 @@ int res = 0; int optCount = 0; - stdIn = stdin; - stdOut = stdout; + dbgIn = stdin; + conOut = stdout; + (void)conIn; + (void)dbgOut; memset(&cache, 0, sizeof(LIST)); memset(&sources, 0, sizeof(LIST)); @@ -596,7 +604,7 @@ read_cache(); l2l_dbg(4, "Cache read complete\n"); - if (set_LogFile(logFile)) + if (set_LogFile(&logFile)) return 2; l2l_dbg(4, "opt_logFile processed\n"); @@ -604,9 +612,9 @@ { l2l_dbg(3, "Command line: \"%s\"\n",opt_Pipe); - if (!(stdIn = POPEN(opt_Pipe, "r"))) - { - stdIn = stdin; //restore + if (!(dbgIn = POPEN(opt_Pipe, "r"))) + { + dbgIn = stdin; //restore l2l_dbg(0, "Could not popen '%s' (%s)\n", opt_Pipe, strerror(errno)); free(opt_Pipe); opt_Pipe = NULL; } @@ -631,7 +639,7 @@ l2l_dbg(2, "translating %s %s\n", exefile, offset); translate_file(exefile, my_atoi(offset), Line); printf("%s\n", Line); - report(stdOut); + report(conOut); } else { @@ -649,14 +657,16 @@ } else { // translate logging from stdin - translate_files(stdIn, stdOut); + translate_files(dbgIn, conOut); } if (logFile) fclose(logFile); if (opt_Pipe) - PCLOSE(stdIn); + PCLOSE(dbgIn); return res; } + +/* EOF */ Modified: trunk/reactos/tools/log2lines/log2lines.mak URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/log2lines.…
============================================================================== --- trunk/reactos/tools/log2lines/log2lines.mak [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/log2lines.mak [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -31,6 +31,7 @@ $(LOG2LINES_BASE_)stat.c \ $(LOG2LINES_BASE_)revision.c \ $(LOG2LINES_BASE_)cmd.c \ + $(LOG2LINES_BASE_)match.c \ $(LOG2LINES_BASE_)log2lines.c \ $(RSYM_BASE_)rsym_common.c @@ -88,6 +89,10 @@ $(ECHO_HOSTCC) ${host_gcc} $(LOG2LINES_HOST_CFLAGS) -c $< -o $@ +$(LOG2LINES_INT_)match.o: $(LOG2LINES_BASE_)match.c | $(LOG2LINES_INT) + $(ECHO_HOSTCC) + ${host_gcc} $(LOG2LINES_HOST_CFLAGS) -c $< -o $@ + .PHONY: log2lines_clean log2lines_clean: -@$(rm) $(LOG2LINES_TARGET) $(LOG2LINES_OBJECTS) 2>$(NUL) Added: trunk/reactos/tools/log2lines/match.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/match.c?re…
============================================================================== --- trunk/reactos/tools/log2lines/match.c (added) +++ trunk/reactos/tools/log2lines/match.c [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -1,0 +1,91 @@ +/* + * ReactOS log2lines + * Written by Jan Roeloffzen + * + * - Custom match routines + */ + +#include <string.h> + +#include "config.h" +#include "log2lines.h" +#include "match.h" + +// break pattern: show source+line +static int match_break(FILE *outFile, char *Line, int processed) +{ + static int state = 0; + + if ( processed ) return processed; + switch (state) + { + case 1: + state = 0; + break; + default: + state = 0; + } + return 1; +} +// "mod" command: update relocated addresses +static int match_mod(FILE *outFile, char *Line, int processed) +{ + static int state = 0; + char Image[NAMESIZE]; + DWORD Base; + DWORD Size; + PLIST_MEMBER plm; + + int cnt; + + if ( processed ) return processed; + if ( (cnt = sscanf(Line," Base Size %5s", Image)) == 1 ) + { + l2l_dbg(1, "Module relocate list:\n"); + state = 1; + return 0; + } + switch (state) + { + case 1: + if ( (cnt = sscanf(Line,"%lx %lx %20s", &Base, &Size, Image)) == 3 ) + { + if (( plm = entry_lookup(&cache, Image) )) + { + plm->RelBase = Base; + plm->Size = Size; + l2l_dbg(1, "Relocated: %s %08x -> %08x\n", Image, plm->ImageBase, plm->RelBase); + } + return 0; + } + else + { + state = 0; + } + break; + default: + state = 0; + } + return 1; +} + +int match_line(FILE *outFile, char *Line) +{ + int processed = 1; + + if ( *Line == '\n' || *Line == '\0' ) + return 1; + if ( strncmp(Line, KDBG_CONT, sizeof(KDBG_CONT)-1 ) == 0 ) + return 1; + + processed = match_mod(outFile, Line, processed); + processed = match_break(outFile, Line, processed); + /* more to be appended here: + * processed = match_xxx(outFile, Line, processed ); + * ... + */ + + return (int)(Line[0]); +} + +/* EOF */ Propchange: trunk/reactos/tools/log2lines/match.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/tools/log2lines/match.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/match.h?re…
============================================================================== --- trunk/reactos/tools/log2lines/match.h (added) +++ trunk/reactos/tools/log2lines/match.h [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -1,0 +1,5 @@ +#include "util.h" + +int match_line(FILE *outFile, char *Line); + +/* EOF */ Propchange: trunk/reactos/tools/log2lines/match.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/tools/log2lines/options.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/options.c?…
============================================================================== --- trunk/reactos/tools/log2lines/options.c [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/options.c [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -4,6 +4,7 @@ * * - Option init and parsing */ + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -16,7 +17,7 @@ #include "log2lines.h" #include "options.h" -char *optchars = "bcd:fFhl:mMP:rR:sS:tTuUvz:"; +char *optchars = "bcd:fFhl:L:mMP:rR:sS:tTuUvz:"; int opt_buffered = 0; // -b int opt_help = 0; // -h int opt_force = 0; // -f @@ -37,8 +38,10 @@ int opt_undo = 0; // -u int opt_redo = 0; // -U char *opt_Revision = NULL; // -R +int opt_Revision_check = 0; // -R check char opt_dir[MAX_PATH]; // -d <opt_dir> -char opt_logFile[MAX_PATH]; // -l <opt_logFile> +char opt_logFile[MAX_PATH]; // -l|L <opt_logFile> +char *opt_mod = NULL; // -mod for opt_logFile char opt_7z[MAX_PATH]; // -z <opt_7z> char opt_scanned[LINESIZE]; // all scanned options char opt_SourcesPath[LINESIZE]; //sources path @@ -48,6 +51,7 @@ int i; char *s; + opt_mod = "a"; strcpy(opt_dir, ""); strcpy(opt_logFile, ""); strcpy(opt_7z, CMD_7Z); @@ -70,6 +74,9 @@ case 'd': strcpy(opt_dir, argv[i+1]); break; + case 'L': + opt_mod = "w"; + //fall through case 'l': strcpy(opt_logFile, argv[i+1]); break; @@ -146,6 +153,8 @@ free(opt_Revision); opt_Revision = malloc(LINESIZE); sscanf(optarg, "%s", opt_Revision); + if (strcmp(opt_Revision, "check") == 0) + opt_Revision_check ++; break; case 's': opt_stats++; @@ -161,6 +170,7 @@ /* need to retranslate for source info: */ opt_undo++; opt_redo++; + opt_Revision_check ++; } break; case 't': @@ -208,3 +218,5 @@ return optCount; } + +/* EOF */ Modified: trunk/reactos/tools/log2lines/options.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/options.h?…
============================================================================== --- trunk/reactos/tools/log2lines/options.h [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/options.h [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -28,8 +28,10 @@ extern int opt_undo ; // -u extern int opt_redo ; // -U extern char *opt_Revision; // -R +extern int opt_Revision_check; // -R check extern char opt_dir[]; // -d <opt_dir> extern char opt_logFile[]; // -l <opt_logFile> +extern char *opt_mod; // mod for opt_logFile extern char opt_7z[]; // -z <opt_7z> extern char opt_scanned[]; // all scanned options Modified: trunk/reactos/tools/log2lines/revision.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/revision.c…
============================================================================== --- trunk/reactos/tools/log2lines/revision.c [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/revision.c [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -29,7 +29,7 @@ if (revinfo.opt_verbose) log(outFile, "| R--- %s Last Changed Rev: %d\n", s, rev); - if (rev && opt_Revision) + if (rev && opt_Revision_check) { if (revinfo.rev < revinfo.buildrev) { @@ -128,9 +128,7 @@ void reportRevision(FILE *outFile) { - if (!opt_Revision) - return; - if (strcmp(opt_Revision, "check") == 0) + if (opt_Revision_check) { if (lastLine.valid) logRevCheck(outFile); @@ -297,3 +295,5 @@ return res; } + +/* EOF */ Modified: trunk/reactos/tools/log2lines/stat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/stat.c?rev…
============================================================================== --- trunk/reactos/tools/log2lines/stat.c [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/stat.c [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -42,3 +42,5 @@ { memset(psumm, 0, sizeof(SUMM)); } + +/* EOF */ Modified: trunk/reactos/tools/log2lines/util.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/util.c?rev…
============================================================================== --- trunk/reactos/tools/log2lines/util.c [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/util.c [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -16,25 +16,25 @@ #include "options.h" int -set_LogFile(FILE *logFile) +set_LogFile(FILE **plogFile) { if (*opt_logFile) { - if (logFile) - fclose(logFile); - logFile = NULL; + if (*plogFile) + fclose(*plogFile); + *plogFile = NULL; if (strcmp(opt_logFile,"none") == 0) return 0; //just close - logFile = fopen(opt_logFile, "a"); - if (logFile) + *plogFile = fopen(opt_logFile, opt_mod ? opt_mod : "a"); + if (*plogFile) { // disable buffering so fflush is not needed if (!opt_buffered) { l2l_dbg(1, "Disabling log buffering on %s\n", opt_logFile); - setbuf(logFile, NULL); + setbuf(*plogFile, NULL); } else l2l_dbg(1, "Enabling log buffering on %s\n", opt_logFile); @@ -186,3 +186,5 @@ } return 0; } + +/* EOF */ Modified: trunk/reactos/tools/log2lines/util.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/util.h?rev…
============================================================================== --- trunk/reactos/tools/log2lines/util.h [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/util.h [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -10,6 +10,7 @@ #include <stdio.h> #include "cmd.h" +#include "options.h" #define log(outFile, fmt, ...) \ { \ @@ -44,6 +45,6 @@ long my_atoi(const char *a); int isOffset(const char *a); int copy_file(char *src, char *dst); -int set_LogFile(FILE *logFile); +int set_LogFile(FILE **plogFile); /* EOF */ Modified: trunk/reactos/tools/log2lines/version.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/version.h?…
============================================================================== --- trunk/reactos/tools/log2lines/version.h [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/version.h [iso-8859-1] Mon Mar 15 18:03:37 2010 @@ -7,6 +7,6 @@ #pragma once -#define LOG2LINES_VERSION "2.1" +#define LOG2LINES_VERSION "2.2" /* EOF */
14 years, 9 months
1
0
0
0
[akhaldi] 46210: [NTIFS] - Move some definition to ntddk.h [NTDDK] - Add several missing Rtl* definitions
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Mar 15 17:32:59 2010 New Revision: 46210 URL:
http://svn.reactos.org/svn/reactos?rev=46210&view=rev
Log: [NTIFS] - Move some definition to ntddk.h [NTDDK] - Add several missing Rtl* definitions Modified: branches/header-work/include/ddk/ntddk.h branches/header-work/include/ddk/ntifs.h Modified: branches/header-work/include/ddk/ntddk.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntddk.h…
============================================================================== --- branches/header-work/include/ddk/ntddk.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/ntddk.h [iso-8859-1] Mon Mar 15 17:32:59 2010 @@ -451,7 +451,142 @@ PVOID TableContext; } RTL_AVL_TABLE, *PRTL_AVL_TABLE; +#ifdef RTL_USE_AVL_TABLES + +#undef PRTL_GENERIC_COMPARE_ROUTINE +#undef RTL_GENERIC_COMPARE_ROUTINE +#undef PRTL_GENERIC_ALLOCATE_ROUTINE +#undef RTL_GENERIC_ALLOCATE_ROUTINE +#undef PRTL_GENERIC_FREE_ROUTINE +#undef RTL_GENERIC_FREE_ROUTINE +#undef RTL_GENERIC_TABLE +#undef PRTL_GENERIC_TABLE + +#define PRTL_GENERIC_COMPARE_ROUTINE PRTL_AVL_COMPARE_ROUTINE +#define RTL_GENERIC_COMPARE_ROUTINE RTL_AVL_COMPARE_ROUTINE +#define PRTL_GENERIC_ALLOCATE_ROUTINE PRTL_AVL_ALLOCATE_ROUTINE +#define RTL_GENERIC_ALLOCATE_ROUTINE RTL_AVL_ALLOCATE_ROUTINE +#define PRTL_GENERIC_FREE_ROUTINE PRTL_AVL_FREE_ROUTINE +#define RTL_GENERIC_FREE_ROUTINE RTL_AVL_FREE_ROUTINE +#define RTL_GENERIC_TABLE RTL_AVL_TABLE +#define PRTL_GENERIC_TABLE PRTL_AVL_TABLE + +#define RtlInitializeGenericTable RtlInitializeGenericTableAvl +#define RtlInsertElementGenericTable RtlInsertElementGenericTableAvl +#define RtlInsertElementGenericTableFull RtlInsertElementGenericTableFullAvl +#define RtlDeleteElementGenericTable RtlDeleteElementGenericTableAvl +#define RtlLookupElementGenericTable RtlLookupElementGenericTableAvl +#define RtlLookupElementGenericTableFull RtlLookupElementGenericTableFullAvl +#define RtlEnumerateGenericTable RtlEnumerateGenericTableAvl +#define RtlEnumerateGenericTableWithoutSplaying RtlEnumerateGenericTableWithoutSplayingAvl +#define RtlGetElementGenericTable RtlGetElementGenericTableAvl +#define RtlNumberGenericTableElements RtlNumberGenericTableElementsAvl +#define RtlIsGenericTableEmpty RtlIsGenericTableEmptyAvl + +#endif /* RTL_USE_AVL_TABLES */ + +typedef struct _RTL_SPLAY_LINKS { + struct _RTL_SPLAY_LINKS *Parent; + struct _RTL_SPLAY_LINKS *LeftChild; + struct _RTL_SPLAY_LINKS *RightChild; +} RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS; + +#define RtlInitializeSplayLinks(Links) { \ + PRTL_SPLAY_LINKS _SplayLinks; \ + _SplayLinks = (PRTL_SPLAY_LINKS)(Links); \ + _SplayLinks->Parent = _SplayLinks; \ + _SplayLinks->LeftChild = NULL; \ + _SplayLinks->RightChild = NULL; \ +} + +#define RtlIsLeftChild(Links) \ + (RtlLeftChild(RtlParent(Links)) == (PRTL_SPLAY_LINKS)(Links)) + +#define RtlIsRightChild(Links) \ + (RtlRightChild(RtlParent(Links)) == (PRTL_SPLAY_LINKS)(Links)) + +#define RtlRightChild(Links) \ + ((PRTL_SPLAY_LINKS)(Links))->RightChild + +#define RtlIsRoot(Links) \ + (RtlParent(Links) == (PRTL_SPLAY_LINKS)(Links)) + +#define RtlLeftChild(Links) \ + ((PRTL_SPLAY_LINKS)(Links))->LeftChild + +#define RtlParent(Links) \ + ((PRTL_SPLAY_LINKS)(Links))->Parent + +#define RtlInsertAsLeftChild(ParentLinks,ChildLinks) \ + { \ + PRTL_SPLAY_LINKS _SplayParent; \ + PRTL_SPLAY_LINKS _SplayChild; \ + _SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks); \ + _SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks); \ + _SplayParent->LeftChild = _SplayChild; \ + _SplayChild->Parent = _SplayParent; \ + } + +#define RtlInsertAsRightChild(ParentLinks,ChildLinks) \ + { \ + PRTL_SPLAY_LINKS _SplayParent; \ + PRTL_SPLAY_LINKS _SplayChild; \ + _SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks); \ + _SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks); \ + _SplayParent->RightChild = _SplayChild; \ + _SplayChild->Parent = _SplayParent; \ + } + + +#if (NTDDI_VERSION >= NTDDI_WIN2K) + +NTSYSAPI +PRTL_SPLAY_LINKS +NTAPI +RtlSplay( + IN OUT PRTL_SPLAY_LINKS Links); + +NTSYSAPI +PRTL_SPLAY_LINKS +NTAPI +RtlDelete( + IN PRTL_SPLAY_LINKS Links); + +NTSYSAPI +VOID +NTAPI +RtlDeleteNoSplay( + IN PRTL_SPLAY_LINKS Links, + IN OUT PRTL_SPLAY_LINKS *Root); + +NTSYSAPI +PRTL_SPLAY_LINKS +NTAPI +RtlSubtreeSuccessor( + IN PRTL_SPLAY_LINKS Links); + +NTSYSAPI +PRTL_SPLAY_LINKS +NTAPI +RtlSubtreePredecessor( + IN PRTL_SPLAY_LINKS Links); + +NTSYSAPI +PRTL_SPLAY_LINKS +NTAPI +RtlRealSuccessor( + IN PRTL_SPLAY_LINKS Links); + +NTSYSAPI +PRTL_SPLAY_LINKS +NTAPI +RtlRealPredecessor( + IN PRTL_SPLAY_LINKS Links); + +#endif + #if (NTDDI_VERSION >= NTDDI_WINXP) + NTSYSAPI VOID NTAPI @@ -461,6 +596,104 @@ IN PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine, IN PRTL_AVL_FREE_ROUTINE FreeRoutine, IN PVOID TableContext OPTIONAL); + +NTSYSAPI +PVOID +NTAPI +RtlInsertElementGenericTableAvl( + IN PRTL_AVL_TABLE Table, + IN PVOID Buffer, + IN CLONG BufferSize, + OUT PBOOLEAN NewElement OPTIONAL); + +NTSYSAPI +PVOID +NTAPI +RtlInsertElementGenericTableFullAvl( + IN PRTL_AVL_TABLE Table, + IN PVOID Buffer, + IN CLONG BufferSize, + OUT PBOOLEAN NewElement OPTIONAL, + IN PVOID NodeOrParent, + IN TABLE_SEARCH_RESULT SearchResult); + +NTSYSAPI +BOOLEAN +NTAPI +RtlDeleteElementGenericTableAvl( + IN PRTL_AVL_TABLE Table, + IN PVOID Buffer); + +NTSYSAPI +PVOID +NTAPI +RtlLookupElementGenericTableAvl( + IN PRTL_AVL_TABLE Table, + IN PVOID Buffer); + +NTSYSAPI +PVOID +NTAPI +RtlLookupElementGenericTableFullAvl( + IN PRTL_AVL_TABLE Table, + IN PVOID Buffer, + OUT PVOID *NodeOrParent, + OUT TABLE_SEARCH_RESULT *SearchResult); + +NTSYSAPI +PVOID +NTAPI +RtlEnumerateGenericTableAvl( + IN PRTL_AVL_TABLE Table, + IN BOOLEAN Restart); + +NTSYSAPI +PVOID +NTAPI +RtlEnumerateGenericTableWithoutSplayingAvl( + IN PRTL_AVL_TABLE Table, + IN OUT PVOID *RestartKey); + +NTSYSAPI +PVOID +NTAPI +RtlLookupFirstMatchingElementGenericTableAvl( + IN PRTL_AVL_TABLE Table, + IN PVOID Buffer, + OUT PVOID *RestartKey); + +NTSYSAPI +PVOID +NTAPI +RtlEnumerateGenericTableLikeADirectory( + IN PRTL_AVL_TABLE Table, + IN PRTL_AVL_MATCH_FUNCTION MatchFunction OPTIONAL, + IN PVOID MatchData OPTIONAL, + IN ULONG NextFlag, + IN OUT PVOID *RestartKey, + IN OUT PULONG DeleteCount, + IN PVOID Buffer); + +NTSYSAPI +PVOID +NTAPI +RtlGetElementGenericTableAvl( + IN PRTL_AVL_TABLE Table, + IN ULONG I); + +NTSYSAPI +ULONG +NTAPI +RtlNumberGenericTableElementsAvl( + IN PRTL_AVL_TABLE Table); + +NTSYSAPI +BOOLEAN +NTAPI +RtlIsGenericTableEmptyAvl( + IN PRTL_AVL_TABLE Table); + + #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */ #if (NTDDI_VERSION >= NTDDI_WIN6) @@ -2930,14 +3163,6 @@ extern NTKERNELAPI PEPROCESS PsInitialSystemProcess; -/* RTL Types */ - -typedef struct _RTL_SPLAY_LINKS { - struct _RTL_SPLAY_LINKS *Parent; - struct _RTL_SPLAY_LINKS *LeftChild; - struct _RTL_SPLAY_LINKS *RightChild; -} RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS; - /* RTL Functions */ #if (defined(_M_AMD64) || defined(_M_IA64)) && !defined(_REALLY_GET_CALLERS_CALLER_) @@ -3179,6 +3404,70 @@ #endif +NTSYSAPI +NTSTATUS +NTAPI +ZwDisplayString ( + IN PUNICODE_STRING String +); + +#if (VER_PRODUCTBUILD >= 2195) + +NTSYSAPI +NTSTATUS +NTAPI +ZwPowerInformation ( + IN POWER_INFORMATION_LEVEL PowerInformationLevel, + IN PVOID InputBuffer OPTIONAL, + IN ULONG InputBufferLength, + OUT PVOID OutputBuffer OPTIONAL, + IN ULONG OutputBufferLength +); + +#endif /* (VER_PRODUCTBUILD >= 2195) */ + +NTSYSAPI +NTSTATUS +NTAPI +ZwTerminateProcess ( + IN HANDLE ProcessHandle OPTIONAL, + IN NTSTATUS ExitStatus +); + +NTSYSAPI +NTSTATUS +NTAPI +ZwOpenProcess ( + OUT PHANDLE ProcessHandle, + IN ACCESS_MASK DesiredAccess, + IN POBJECT_ATTRIBUTES ObjectAttributes, + IN PCLIENT_ID ClientId OPTIONAL +); + +NTSYSAPI +NTSTATUS +NTAPI +ZwQueryVolumeInformationFile( + IN HANDLE FileHandle, + OUT PIO_STATUS_BLOCK IoStatusBlock, + OUT PVOID FsInformation, + IN ULONG Length, + IN FS_INFORMATION_CLASS FsInformationClass); + +NTSYSAPI +NTSTATUS +NTAPI +ZwDeviceIoControlFile( + IN HANDLE FileHandle, + IN HANDLE Event OPTIONAL, + IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, + IN PVOID ApcContext OPTIONAL, + OUT PIO_STATUS_BLOCK IoStatusBlock, + IN ULONG IoControlCode, + IN PVOID InputBuffer OPTIONAL, + IN ULONG InputBufferLength, + OUT PVOID OutputBuffer OPTIONAL, + IN ULONG OutputBufferLength); #ifdef __cplusplus } Modified: branches/header-work/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntifs.h…
============================================================================== --- branches/header-work/include/ddk/ntifs.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/ntifs.h [iso-8859-1] Mon Mar 15 17:32:59 2010 @@ -8644,21 +8644,6 @@ NTSYSAPI NTSTATUS NTAPI -ZwDeviceIoControlFile( - IN HANDLE FileHandle, - IN HANDLE Event OPTIONAL, - IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, - IN PVOID ApcContext OPTIONAL, - OUT PIO_STATUS_BLOCK IoStatusBlock, - IN ULONG IoControlCode, - IN PVOID InputBuffer OPTIONAL, - IN ULONG InputBufferLength, - OUT PVOID OutputBuffer OPTIONAL, - IN ULONG OutputBufferLength); - -NTSYSAPI -NTSTATUS -NTAPI ZwQueryDirectoryFile( IN HANDLE FileHandle, IN HANDLE Event OPTIONAL, @@ -8671,16 +8656,6 @@ IN BOOLEAN ReturnSingleEntry, IN PUNICODE_STRING FileName OPTIONAL, IN BOOLEAN RestartScan); - -NTSYSAPI -NTSTATUS -NTAPI -ZwQueryVolumeInformationFile( - IN HANDLE FileHandle, - OUT PIO_STATUS_BLOCK IoStatusBlock, - OUT PVOID FsInformation, - IN ULONG Length, - IN FS_INFORMATION_CLASS FsInformationClass); NTSYSAPI NTSTATUS @@ -9806,92 +9781,6 @@ IN BOOLEAN AllocateDestinationString ); -/* RTL Splay Tree Functions */ -NTSYSAPI -PRTL_SPLAY_LINKS -NTAPI -RtlSplay(PRTL_SPLAY_LINKS Links); - -NTSYSAPI -PRTL_SPLAY_LINKS -NTAPI -RtlDelete(PRTL_SPLAY_LINKS Links); - -NTSYSAPI -VOID -NTAPI -RtlDeleteNoSplay( - PRTL_SPLAY_LINKS Links, - PRTL_SPLAY_LINKS *Root -); - -NTSYSAPI -PRTL_SPLAY_LINKS -NTAPI -RtlSubtreeSuccessor(PRTL_SPLAY_LINKS Links); - -NTSYSAPI -PRTL_SPLAY_LINKS -NTAPI -RtlSubtreePredecessor(PRTL_SPLAY_LINKS Links); - -NTSYSAPI -PRTL_SPLAY_LINKS -NTAPI -RtlRealSuccessor(PRTL_SPLAY_LINKS Links); - -NTSYSAPI -PRTL_SPLAY_LINKS -NTAPI -RtlRealPredecessor(PRTL_SPLAY_LINKS Links); - -#define RtlIsLeftChild(Links) \ - (RtlLeftChild(RtlParent(Links)) == (PRTL_SPLAY_LINKS)(Links)) - -#define RtlIsRightChild(Links) \ - (RtlRightChild(RtlParent(Links)) == (PRTL_SPLAY_LINKS)(Links)) - -#define RtlRightChild(Links) \ - ((PRTL_SPLAY_LINKS)(Links))->RightChild - -#define RtlIsRoot(Links) \ - (RtlParent(Links) == (PRTL_SPLAY_LINKS)(Links)) - -#define RtlLeftChild(Links) \ - ((PRTL_SPLAY_LINKS)(Links))->LeftChild - -#define RtlParent(Links) \ - ((PRTL_SPLAY_LINKS)(Links))->Parent - -#define RtlInitializeSplayLinks(Links) \ - { \ - PRTL_SPLAY_LINKS _SplayLinks; \ - _SplayLinks = (PRTL_SPLAY_LINKS)(Links); \ - _SplayLinks->Parent = _SplayLinks; \ - _SplayLinks->LeftChild = NULL; \ - _SplayLinks->RightChild = NULL; \ - } - -#define RtlInsertAsLeftChild(ParentLinks,ChildLinks) \ - { \ - PRTL_SPLAY_LINKS _SplayParent; \ - PRTL_SPLAY_LINKS _SplayChild; \ - _SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks); \ - _SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks); \ - _SplayParent->LeftChild = _SplayChild; \ - _SplayChild->Parent = _SplayParent; \ - } - -#define RtlInsertAsRightChild(ParentLinks,ChildLinks) \ - { \ - PRTL_SPLAY_LINKS _SplayParent; \ - PRTL_SPLAY_LINKS _SplayChild; \ - _SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks); \ - _SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks); \ - _SplayParent->RightChild = _SplayChild; \ - _SplayChild->Parent = _SplayParent; \ - } - // // RTL time functions // @@ -9979,13 +9868,6 @@ NTSYSAPI NTSTATUS NTAPI -ZwDisplayString ( - IN PUNICODE_STRING String -); - -NTSYSAPI -NTSTATUS -NTAPI ZwFlushInstructionCache ( IN HANDLE ProcessHandle, IN PVOID BaseAddress OPTIONAL, @@ -10025,16 +9907,6 @@ NTSYSAPI NTSTATUS NTAPI -ZwOpenProcess ( - OUT PHANDLE ProcessHandle, - IN ACCESS_MASK DesiredAccess, - IN POBJECT_ATTRIBUTES ObjectAttributes, - IN PCLIENT_ID ClientId OPTIONAL -); - -NTSYSAPI -NTSTATUS -NTAPI ZwOpenProcessToken ( IN HANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, @@ -10060,21 +9932,6 @@ IN BOOLEAN OpenAsSelf, OUT PHANDLE TokenHandle ); - -#if (VER_PRODUCTBUILD >= 2195) - -NTSYSAPI -NTSTATUS -NTAPI -ZwPowerInformation ( - IN POWER_INFORMATION_LEVEL PowerInformationLevel, - IN PVOID InputBuffer OPTIONAL, - IN ULONG InputBufferLength, - OUT PVOID OutputBuffer OPTIONAL, - IN ULONG OutputBufferLength -); - -#endif /* (VER_PRODUCTBUILD >= 2195) */ NTSYSAPI NTSTATUS @@ -10198,14 +10055,6 @@ NTSYSAPI NTSTATUS NTAPI -ZwTerminateProcess ( - IN HANDLE ProcessHandle OPTIONAL, - IN NTSTATUS ExitStatus -); - -NTSYSAPI -NTSTATUS -NTAPI ZwUnloadKey ( IN POBJECT_ATTRIBUTES KeyObjectAttributes );
14 years, 9 months
1
0
0
0
← Newer
1
...
39
40
41
42
43
44
45
...
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