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
June 2013
----- 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
14 participants
274 discussions
Start a n
N
ew thread
[tkreuzer] 59194: [NDK] - Add NUMBER_POOL_LOOKASIDE_LISTS constant - Add PAT MSR constants for amd64 - Add missing extern "C" [NTOSKRNL] - Fix pool lookaside list usage for 64 bit
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Jun 9 08:54:33 2013 New Revision: 59194 URL:
http://svn.reactos.org/svn/reactos?rev=59194&view=rev
Log: [NDK] - Add NUMBER_POOL_LOOKASIDE_LISTS constant - Add PAT MSR constants for amd64 - Add missing extern "C" [NTOSKRNL] - Fix pool lookaside list usage for 64 bit Modified: trunk/reactos/include/ndk/amd64/ketypes.h trunk/reactos/include/ndk/amd64/mmtypes.h trunk/reactos/include/ndk/arm/ketypes.h trunk/reactos/include/ndk/arm/mmtypes.h trunk/reactos/include/ndk/extypes.h trunk/reactos/include/ndk/i386/ketypes.h trunk/reactos/include/ndk/i386/mmtypes.h trunk/reactos/include/ndk/pstypes.h trunk/reactos/include/ndk/rtltypes.h trunk/reactos/ntoskrnl/mm/ARM3/expool.c Modified: trunk/reactos/include/ndk/amd64/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/amd64/ketypes.…
============================================================================== --- trunk/reactos/include/ndk/amd64/ketypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/amd64/ketypes.h [iso-8859-1] Sun Jun 9 08:54:33 2013 @@ -125,6 +125,16 @@ #define MSR_GS_SWAP 0xC0000102 // +// Caching values for the PAT MSR +// +#define PAT_UC 0ULL +#define PAT_WC 1ULL +#define PAT_WT 4ULL +#define PAT_WP 5ULL +#define PAT_WB 6ULL +#define PAT_UCM 7ULL + +// // Flags in MSR_EFER // #define MSR_LMA 0x0400 @@ -187,6 +197,11 @@ #define SYNCH_LEVEL 12 #define NMI_STACK_SIZE 0x2000 + +// +// Number of pool lookaside lists per pool in the PRCB +// +#define NUMBER_POOL_LOOKASIDE_LISTS 32 // // Trap Frame Definition @@ -527,8 +542,8 @@ #endif KSPIN_LOCK_QUEUE LockQueue[LockQueueMaximumLock]; // 2003: 33, vista:49 PP_LOOKASIDE_LIST PPLookasideList[16]; - GENERAL_LOOKASIDE_POOL PPNPagedLookasideList[32]; - GENERAL_LOOKASIDE_POOL PPPagedLookasideList[32]; + GENERAL_LOOKASIDE_POOL PPNPagedLookasideList[NUMBER_POOL_LOOKASIDE_LISTS]; + GENERAL_LOOKASIDE_POOL PPPagedLookasideList[NUMBER_POOL_LOOKASIDE_LISTS]; UINT64 PacketBarrier; SINGLE_LIST_ENTRY DeferredReadyListHead; LONG MmPageFaultCount; Modified: trunk/reactos/include/ndk/amd64/mmtypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/amd64/mmtypes.…
============================================================================== --- trunk/reactos/include/ndk/amd64/mmtypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/amd64/mmtypes.h [iso-8859-1] Sun Jun 9 08:54:33 2013 @@ -19,6 +19,10 @@ #ifndef _AMD64_MMTYPES_H #define _AMD64_MMTYPES_H + +#ifdef __cplusplus +extern "C" { +#endif // // Dependencies @@ -198,5 +202,8 @@ #endif } MMPTE_HARDWARE_LARGEPAGE, *PMMPTE_HARDWARE_LARGEPAGE; +#ifdef __cplusplus +}; // extern "C" +#endif #endif // !AMD64_MMTYPES_H Modified: trunk/reactos/include/ndk/arm/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/arm/ketypes.h?…
============================================================================== --- trunk/reactos/include/ndk/arm/ketypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/arm/ketypes.h [iso-8859-1] Sun Jun 9 08:54:33 2013 @@ -18,6 +18,10 @@ #ifndef _ARM_KETYPES_H #define _ARM_KETYPES_H + +#ifdef __cplusplus +extern "C" { +#endif // // Dependencies @@ -105,7 +109,7 @@ // ULONG R0; // ULONG R1; // ULONG R2; -// ULONG R3; +// ULONG R3; ULONG R4; ULONG R5; ULONG R6; @@ -134,7 +138,7 @@ typedef union _ARM_STATUS_REGISTER { - + struct { ULONG Mode:5; @@ -239,7 +243,7 @@ ULONG DMultipler:1; ULONG DAssociativty:3; ULONG DSize:4; - ULONG DReserved:2; + ULONG DReserved:2; ULONG Separate:1; ULONG CType:4; ULONG Reserved:3; @@ -478,7 +482,7 @@ ULONG VdmAlert; ULONG KernelReserved[14]; ULONG SecondLevelCacheSize; - ULONG HalReserved[16]; + ULONG HalReserved[16]; // arm part UCHAR IrqlMask[32]; ULONG IrqlTable[32]; @@ -525,5 +529,10 @@ #define KeGetPreviousMode() _KeGetPreviousMode() #define KeGetDcacheFillSize() PCR->DcacheFillSize +#endif // !NTOS_MODE_USER + +#ifdef __cplusplus +}; // extern "C" #endif -#endif + +#endif // !_ARM_KETYPES_H Modified: trunk/reactos/include/ndk/arm/mmtypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/arm/mmtypes.h?…
============================================================================== --- trunk/reactos/include/ndk/arm/mmtypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/arm/mmtypes.h [iso-8859-1] Sun Jun 9 08:54:33 2013 @@ -18,6 +18,10 @@ #ifndef _ARM_MMTYPES_H #define _ARM_MMTYPES_H + +#ifdef __cplusplus +extern "C" { +#endif // // Dependencies @@ -178,7 +182,7 @@ typedef struct _MMPDE { - union + union { MMPDE_HARDWARE Hard; ULONG Long; @@ -191,4 +195,8 @@ #define HARDWARE_PTE HARDWARE_PTE_ARMV6 #define PHARDWARE_PTE PHARDWARE_PTE_ARMV6 -#endif +#ifdef __cplusplus +}; // extern "C" +#endif + +#endif Modified: trunk/reactos/include/ndk/extypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/extypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/extypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/extypes.h [iso-8859-1] Sun Jun 9 08:54:33 2013 @@ -33,6 +33,10 @@ #include <lpctypes.h> #ifdef NTOS_MODE_USER #include <obtypes.h> +#endif + +#ifdef __cplusplus +extern "C" { #endif // @@ -1462,5 +1466,10 @@ SIZE_T ModifiedPageCountPageFile; } SYSTEM_MEMORY_LIST_INFORMATION, *PSYSTEM_MEMORY_LIST_INFORMATION; +#endif // !NTOS_MODE_USER + +#ifdef __cplusplus +}; // extern "C" #endif -#endif + +#endif // !_EXTYPES_H Modified: trunk/reactos/include/ndk/i386/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/i386/ketypes.h…
============================================================================== --- trunk/reactos/include/ndk/i386/ketypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/i386/ketypes.h [iso-8859-1] Sun Jun 9 08:54:33 2013 @@ -185,6 +185,11 @@ #define SYNCH_LEVEL (IPI_LEVEL - 2) #endif #endif + +// +// Number of pool lookaside lists per pool in the PRCB +// +#define NUMBER_POOL_LOOKASIDE_LISTS 32 // // Trap Frame Definition @@ -558,8 +563,8 @@ ULONG SpareCounter1[8]; #endif PP_LOOKASIDE_LIST PPLookasideList[16]; - PP_LOOKASIDE_LIST PPNPagedLookasideList[32]; - PP_LOOKASIDE_LIST PPPagedLookasideList[32]; + PP_LOOKASIDE_LIST PPNPagedLookasideList[NUMBER_POOL_LOOKASIDE_LISTS]; + PP_LOOKASIDE_LIST PPPagedLookasideList[NUMBER_POOL_LOOKASIDE_LISTS]; volatile ULONG PacketBarrier; volatile ULONG ReverseStall; PVOID IpiFrame; Modified: trunk/reactos/include/ndk/i386/mmtypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/i386/mmtypes.h…
============================================================================== --- trunk/reactos/include/ndk/i386/mmtypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/i386/mmtypes.h [iso-8859-1] Sun Jun 9 08:54:33 2013 @@ -18,6 +18,10 @@ #ifndef _I386_MMTYPES_H #define _I386_MMTYPES_H + +#ifdef __cplusplus +extern "C" { +#endif // // Dependencies @@ -171,4 +175,8 @@ #define HARDWARE_PTE HARDWARE_PTE_X86 #define PHARDWARE_PTE PHARDWARE_PTE_X86 +#ifdef __cplusplus +}; // extern "C" #endif + +#endif Modified: trunk/reactos/include/ndk/pstypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/pstypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/pstypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/pstypes.h [iso-8859-1] Sun Jun 9 08:54:33 2013 @@ -30,6 +30,10 @@ #ifndef NTOS_MODE_USER #include <extypes.h> #include <setypes.h> +#endif + +#ifdef __cplusplus +extern "C" { #endif #ifndef NTOS_MODE_USER @@ -1422,4 +1426,8 @@ #endif // !NTOS_MODE_USER +#ifdef __cplusplus +}; // extern "C" +#endif + #endif // _PSTYPES_H Modified: trunk/reactos/include/ndk/rtltypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtltypes.h?rev…
============================================================================== --- trunk/reactos/include/ndk/rtltypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/rtltypes.h [iso-8859-1] Sun Jun 9 08:54:33 2013 @@ -25,6 +25,10 @@ #include <umtypes.h> #include <mmtypes.h> #include <ldrtypes.h> + +#ifdef __cplusplus +extern "C" { +#endif // // Maximum Atom Length @@ -1521,4 +1525,9 @@ } MESSAGE_RESOURCE_DATA, *PMESSAGE_RESOURCE_DATA; #endif /* !NTOS_MODE_USER */ + +#ifdef __cplusplus +} +#endif + #endif /* !_RTLTYPES_H */ Modified: trunk/reactos/ntoskrnl/mm/ARM3/expool.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/expool.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] Sun Jun 9 08:54:33 2013 @@ -1675,7 +1675,7 @@ // // Handle lookaside list optimization for both paged and nonpaged pool // - if (i <= MAXIMUM_PROCESSORS) + if (i <= NUMBER_POOL_LOOKASIDE_LISTS) { // // Try popping it from the per-CPU lookaside list @@ -2258,7 +2258,7 @@ // // Is this allocation small enough to have come from a lookaside list? // - if (BlockSize <= MAXIMUM_PROCESSORS) + if (BlockSize <= NUMBER_POOL_LOOKASIDE_LISTS) { // // Try pushing it into the per-CPU lookaside list
11 years, 6 months
1
0
0
0
[hbelusca] 59193: [KERNEL32] - Fix IN/OUT declaration of parameters for GetFullPathNameA/W - Fix a bad usage of GetFullPathNameW in the GetTempPathW API, where the source and destination buffer for...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sat Jun 8 14:48:33 2013 New Revision: 59193 URL:
http://svn.reactos.org/svn/reactos?rev=59193&view=rev
Log: [KERNEL32] - Fix IN/OUT declaration of parameters for GetFullPathNameA/W - Fix a bad usage of GetFullPathNameW in the GetTempPathW API, where the source and destination buffer for GetFullPathNameW was the same (Yet another Wineism :(( ). On Windows, using the same buffer fills it with a garbled string. Avoid this behaviour on ReactOS too, because internally GetFullPathNameW calls RtlGetFullPathName_U, the latter zeroing-out the destination buffer before usage. [RTL:PATH] See comments of revision r59183 (and in particular, fix some ntdll:RtlDos* path functions). Modified: trunk/reactos/dll/win32/kernel32/client/path.c trunk/reactos/lib/rtl/path.c Modified: trunk/reactos/dll/win32/kernel32/client/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/client/path.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/path.c [iso-8859-1] Sat Jun 8 14:48:33 2013 @@ -986,8 +986,8 @@ WINAPI GetFullPathNameA(IN LPCSTR lpFileName, IN DWORD nBufferLength, - IN LPSTR lpBuffer, - IN LPSTR *lpFilePart) + OUT LPSTR lpBuffer, + OUT LPSTR *lpFilePart) { NTSTATUS Status; PWCHAR Buffer; @@ -1099,11 +1099,11 @@ WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, - IN LPWSTR lpBuffer, + OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart) { /* Call Rtl to do the work */ - return RtlGetFullPathName_U((LPWSTR)lpFileName, + return RtlGetFullPathName_U(lpFileName, nBufferLength * sizeof(WCHAR), lpBuffer, lpFilePart) / sizeof(WCHAR); @@ -2079,6 +2079,7 @@ static const WCHAR temp[] = { 'T', 'E', 'M', 'P', 0 }; static const WCHAR userprofile[] = { 'U','S','E','R','P','R','O','F','I','L','E',0 }; WCHAR tmp_path[MAX_PATH]; + WCHAR full_tmp_path[MAX_PATH]; UINT ret; DPRINT("%u,%p\n", count, path); @@ -2087,42 +2088,44 @@ !(ret = GetEnvironmentVariableW( temp, tmp_path, MAX_PATH )) && !(ret = GetEnvironmentVariableW( userprofile, tmp_path, MAX_PATH )) && !(ret = GetWindowsDirectoryW( tmp_path, MAX_PATH ))) + { return 0; - - if (ret > MAX_PATH) - { - SetLastError(ERROR_FILENAME_EXCED_RANGE); - return 0; - } - - ret = GetFullPathNameW(tmp_path, MAX_PATH, tmp_path, NULL); - if (!ret) return 0; - - if (ret > MAX_PATH - 2) - { - SetLastError(ERROR_FILENAME_EXCED_RANGE); - return 0; - } - - if (tmp_path[ret-1] != '\\') - { - tmp_path[ret++] = '\\'; - tmp_path[ret] = '\0'; - } - - ret++; /* add space for terminating 0 */ - - if (count) - { - lstrcpynW(path, tmp_path, count); - if (count >= ret) - ret--; /* return length without 0 */ - else if (count < 4) - path[0] = 0; /* avoid returning ambiguous "X:" */ - } - - DPRINT("GetTempPathW returning %u, %S\n", ret, path); - return ret; + } + + if (ret > MAX_PATH) + { + SetLastError(ERROR_FILENAME_EXCED_RANGE); + return 0; + } + + ret = GetFullPathNameW(tmp_path, MAX_PATH, full_tmp_path, NULL); + if (!ret) return 0; + + if (ret > MAX_PATH - 2) + { + SetLastError(ERROR_FILENAME_EXCED_RANGE); + return 0; + } + + if (full_tmp_path[ret-1] != '\\') + { + full_tmp_path[ret++] = '\\'; + full_tmp_path[ret] = '\0'; + } + + ret++; /* add space for terminating 0 */ + + if (count) + { + lstrcpynW(path, full_tmp_path, count); + if (count >= ret) + ret--; /* return length without 0 */ + else if (count < 4) + path[0] = 0; /* avoid returning ambiguous "X:" */ + } + + DPRINT("GetTempPathW returning %u, %S\n", ret, path); + return ret; } /* Modified: trunk/reactos/lib/rtl/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/path.c?rev=59193&r…
============================================================================== --- trunk/reactos/lib/rtl/path.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/path.c [iso-8859-1] Sat Jun 8 14:48:33 2013 @@ -160,7 +160,7 @@ { /* Check if the character is a path or drive separator */ c = *End; - if ((c == '\\') || (c == '/') || ((c == ':') && (End == PathCopy.Buffer + 1))) + if (IS_PATH_SEPARATOR(c) || ((c == ':') && (End == PathCopy.Buffer + 1))) { /* Get the next lower case character */ End++; @@ -422,30 +422,33 @@ if (PartName) { /* Loop from the back until we find a path separator */ - p = &NewBuffer[(DosLength - 1) / sizeof (WCHAR)]; - while (p > NewBuffer) if (*p-- == '\\') break; - - /* Was one found? */ - if (p > NewBuffer) - { - /* Move past it -- anything left? */ - p++; - if (!*p) + p = &NewBuffer[DosLength / sizeof(WCHAR)]; + while (--p > NewBuffer) + { + /* We found a path separator, move past it */ + if (*p == OBJ_NAME_PATH_SEPARATOR) { - /* The path ends with a path separator, no part name */ - *PartName = NULL; + ++p; + break; } - else - { - /* What follows the path separator is the part name */ - *PartName = p; - } + } + + /* Check whether a separator was found and if something remains */ + if ((p > NewBuffer) && *p) + { + /* What follows the path separator is the partial name */ + *PartName = p; + } + else + { + /* The path ends with a path separator, no partial name */ + *PartName = NULL; } } /* Build the final NT path string */ + NtPath->Buffer = NewBuffer; NtPath->Length = (USHORT)DosLength; - NtPath->Buffer = NewBuffer; NtPath->MaximumLength = (USHORT)DosLength + sizeof(UNICODE_NULL); return STATUS_SUCCESS; } @@ -574,7 +577,6 @@ /* Nothing else is expected */ default: ASSERT(FALSE); - } /* Now copy the prefix and the buffer */ @@ -592,7 +594,7 @@ NtName->Length = (USHORT)Length; NtName->MaximumLength = (USHORT)MaxLength; NewBuffer[LengthChars] = UNICODE_NULL; - DPRINT("new buffer: %S\n", NewBuffer); + DPRINT("New buffer: %S\n", NewBuffer); DPRINT("NT Name: %wZ\n", NtName); /* Check if a partial name was requested */ @@ -651,7 +653,7 @@ RelativeName->RelativeName.Buffer = (PWSTR)((ULONG_PTR)NewBuffer + PrefixLength + FullPath.Length - PrefixCut * sizeof(WCHAR)); RelativeName->RelativeName.Length = (USHORT)(PathLength - FullPath.Length); /* If relative name starts with \, skip it */ - if (RelativeName->RelativeName.Buffer[0] == L'\\') + if (RelativeName->RelativeName.Buffer[0] == OBJ_NAME_PATH_SEPARATOR) { RelativeName->RelativeName.Buffer++; RelativeName->RelativeName.Length -= sizeof(WCHAR); @@ -1121,7 +1123,7 @@ FullPath.Length = (USHORT)FullPathLength; /* If full path isn't \ terminated, do it */ - if (FullPath.Buffer[CharLength - 1] != L'\\') + if (FullPath.Buffer[CharLength - 1] != OBJ_NAME_PATH_SEPARATOR) { if ((CharLength + 1) * sizeof(WCHAR) > SavedLength) { @@ -1129,7 +1131,7 @@ goto Leave; } - FullPath.Buffer[CharLength] = L'\\'; + FullPath.Buffer[CharLength] = OBJ_NAME_PATH_SEPARATOR; FullPath.Buffer[CharLength + 1] = UNICODE_NULL; FullPath.Length += sizeof(WCHAR); } @@ -1500,6 +1502,9 @@ if (!name || !*name) return 0; + /* Zero out the destination buffer (implies that "name" should be different from "buffer" to get this function well-behaving) */ + RtlZeroMemory(buffer, size); + if (file_part) *file_part = NULL; /* check for DOS device name */ @@ -1733,9 +1738,9 @@ } /* Add a terminating slash if needed */ - if ((BufferStart != NewBuffer) && (BufferStart[-1] != '\\')) - { - *BufferStart++ = '\\'; + if ((BufferStart != NewBuffer) && (BufferStart[-1] != OBJ_NAME_PATH_SEPARATOR)) + { + *BufferStart++ = OBJ_NAME_PATH_SEPARATOR; } /* Bail out if we reached the end */ @@ -2051,6 +2056,7 @@ /* Initialize optional arguments */ if (FullNameOut) *FullNameOut = NULL; if (FilePartSize) *FilePartSize = 0; + if (LengthNeeded) *LengthNeeded = 0; if (DynamicString) { DynamicString->Length = DynamicString->MaximumLength = 0; @@ -2322,7 +2328,7 @@ &StaticCandidateString, Status); } - DPRINT("STatus: %lx BUFFER: %S\n", Status, CallerBuffer->Buffer); + DPRINT("Status: %lx BUFFER: %S\n", Status, CallerBuffer->Buffer); goto Quickie; } else
11 years, 6 months
1
0
0
0
[ekohl] 59192: [NETAPI32] Implement NetLocalGroupDelMember and NetLocalGroupDelMembers (level 0 only).
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Jun 8 14:41:56 2013 New Revision: 59192 URL:
http://svn.reactos.org/svn/reactos?rev=59192&view=rev
Log: [NETAPI32] Implement NetLocalGroupDelMember and NetLocalGroupDelMembers (level 0 only). Modified: trunk/reactos/dll/win32/netapi32/local_group.c Modified: trunk/reactos/dll/win32/netapi32/local_group.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/local_g…
============================================================================== --- trunk/reactos/dll/win32/netapi32/local_group.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/local_group.c [iso-8859-1] Sat Jun 8 14:41:56 2013 @@ -648,29 +648,159 @@ /************************************************************ * NetLocalGroupDelMember (NETAPI32.@) */ -NET_API_STATUS WINAPI NetLocalGroupDelMember( +NET_API_STATUS +WINAPI +NetLocalGroupDelMember( LPCWSTR servername, LPCWSTR groupname, PSID membersid) { - FIXME("(%s %s %p) stub!\n", debugstr_w(servername), + LOCALGROUP_MEMBERS_INFO_0 Member; + + TRACE("(%s %s %p)\n", debugstr_w(servername), debugstr_w(groupname), membersid); - return NERR_Success; + + Member.lgrmi0_sid = membersid; + + return NetLocalGroupDelMembers(servername, + groupname, + 0, + (LPBYTE)&Member, + 1); } + /************************************************************ * NetLocalGroupDelMembers (NETAPI32.@) */ -NET_API_STATUS WINAPI NetLocalGroupDelMembers( +NET_API_STATUS +WINAPI +NetLocalGroupDelMembers( LPCWSTR servername, LPCWSTR groupname, DWORD level, LPBYTE buf, DWORD totalentries) { - FIXME("(%s %s %d %p %d) stub!\n", debugstr_w(servername), + UNICODE_STRING ServerName; + UNICODE_STRING AliasName; + SAM_HANDLE ServerHandle = NULL; + SAM_HANDLE DomainHandle = NULL; + SAM_HANDLE AliasHandle = NULL; + PLOCALGROUP_MEMBERS_INFO_0 MemberList = NULL; + ULONG i; + NET_API_STATUS ApiStatus = NERR_Success; + NTSTATUS Status = STATUS_SUCCESS; + + TRACE("(%s %s %d %p %d)\n", debugstr_w(servername), debugstr_w(groupname), level, buf, totalentries); - return NERR_Success; + + if (servername != NULL) + RtlInitUnicodeString(&ServerName, servername); + + RtlInitUnicodeString(&AliasName, groupname); + + switch (level) + { + case 0: + MemberList = (PLOCALGROUP_MEMBERS_INFO_0)buf; + break; + + case 3: + default: + ApiStatus = ERROR_INVALID_LEVEL; + goto done; + } + + /* Connect to the SAM Server */ + Status = SamConnect((servername != NULL) ? &ServerName : NULL, + &ServerHandle, + SAM_SERVER_CONNECT | SAM_SERVER_LOOKUP_DOMAIN, + NULL); + if (!NT_SUCCESS(Status)) + { + ERR("SamConnect failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Open the Builtin Domain */ + Status = OpenBuiltinDomain(ServerHandle, + DOMAIN_LOOKUP, + &DomainHandle); + if (!NT_SUCCESS(Status)) + { + ERR("OpenBuiltinDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Open the alias account in the builtin domain */ + ApiStatus = OpenAliasByName(DomainHandle, + &AliasName, + ALIAS_REMOVE_MEMBER, + &AliasHandle); + if (ApiStatus != NERR_Success && ApiStatus != ERROR_NONE_MAPPED) + { + ERR("OpenAliasByName failed (ApiStatus %lu)\n", ApiStatus); + goto done; + } + + if (AliasHandle == NULL) + { + if (DomainHandle != NULL) + SamCloseHandle(DomainHandle); + + /* Open the Acount Domain */ + Status = OpenAccountDomain(ServerHandle, + (servername != NULL) ? &ServerName : NULL, + DOMAIN_LOOKUP, + &DomainHandle); + if (!NT_SUCCESS(Status)) + { + ERR("OpenAccountDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Open the alias account in the account domain */ + ApiStatus = OpenAliasByName(DomainHandle, + &AliasName, + ALIAS_REMOVE_MEMBER, + &AliasHandle); + if (ApiStatus != NERR_Success) + { + ERR("OpenAliasByName failed (ApiStatus %lu)\n", ApiStatus); + if (ApiStatus == ERROR_NONE_MAPPED) + ApiStatus = NERR_GroupNotFound; + goto done; + } + } + + /* Remove members from the alias */ + for (i = 0; i < totalentries; i++) + { + Status = SamRemoveMemberFromAlias(AliasHandle, + MemberList[i].lgrmi0_sid); + if (!NT_SUCCESS(Status)) + { + ERR("SamAddMemberToAlias failed (Status %lu)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + } + +done: + if (AliasHandle != NULL) + SamCloseHandle(AliasHandle); + + if (DomainHandle != NULL) + SamCloseHandle(DomainHandle); + + if (ServerHandle != NULL) + SamCloseHandle(ServerHandle); + + return ApiStatus; }
11 years, 6 months
1
0
0
0
[ekohl] 59191: [NETAPI32] Implement NetLocalGroupAddMember and NetLocalGroupAddMember (level 0 only).
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Jun 8 13:47:34 2013 New Revision: 59191 URL:
http://svn.reactos.org/svn/reactos?rev=59191&view=rev
Log: [NETAPI32] Implement NetLocalGroupAddMember and NetLocalGroupAddMember (level 0 only). Modified: trunk/reactos/dll/win32/netapi32/local_group.c Modified: trunk/reactos/dll/win32/netapi32/local_group.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/local_g…
============================================================================== --- trunk/reactos/dll/win32/netapi32/local_group.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/local_group.c [iso-8859-1] Sat Jun 8 13:47:34 2013 @@ -374,29 +374,159 @@ /************************************************************ * NetLocalGroupAddMember (NETAPI32.@) */ -NET_API_STATUS WINAPI NetLocalGroupAddMember( +NET_API_STATUS +WINAPI +NetLocalGroupAddMember( LPCWSTR servername, LPCWSTR groupname, PSID membersid) { - FIXME("(%s %s %p) stub!\n", debugstr_w(servername), + LOCALGROUP_MEMBERS_INFO_0 Member; + + TRACE("(%s %s %p)\n", debugstr_w(servername), debugstr_w(groupname), membersid); - return NERR_Success; + + Member.lgrmi0_sid = membersid; + + return NetLocalGroupAddMembers(servername, + groupname, + 0, + (LPBYTE)&Member, + 1); } + /************************************************************ * NetLocalGroupAddMembers (NETAPI32.@) */ -NET_API_STATUS WINAPI NetLocalGroupAddMembers( +NET_API_STATUS +WINAPI +NetLocalGroupAddMembers( LPCWSTR servername, LPCWSTR groupname, DWORD level, LPBYTE buf, DWORD totalentries) { - FIXME("(%s %s %d %p %d) stub!\n", debugstr_w(servername), + UNICODE_STRING ServerName; + UNICODE_STRING AliasName; + SAM_HANDLE ServerHandle = NULL; + SAM_HANDLE DomainHandle = NULL; + SAM_HANDLE AliasHandle = NULL; + PLOCALGROUP_MEMBERS_INFO_0 MemberList = NULL; + ULONG i; + NET_API_STATUS ApiStatus = NERR_Success; + NTSTATUS Status = STATUS_SUCCESS; + + TRACE("(%s %s %d %p %d)\n", debugstr_w(servername), debugstr_w(groupname), level, buf, totalentries); - return NERR_Success; + + if (servername != NULL) + RtlInitUnicodeString(&ServerName, servername); + + RtlInitUnicodeString(&AliasName, groupname); + + switch (level) + { + case 0: + MemberList = (PLOCALGROUP_MEMBERS_INFO_0)buf; + break; + + case 3: + default: + ApiStatus = ERROR_INVALID_LEVEL; + goto done; + } + + /* Connect to the SAM Server */ + Status = SamConnect((servername != NULL) ? &ServerName : NULL, + &ServerHandle, + SAM_SERVER_CONNECT | SAM_SERVER_LOOKUP_DOMAIN, + NULL); + if (!NT_SUCCESS(Status)) + { + ERR("SamConnect failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Open the Builtin Domain */ + Status = OpenBuiltinDomain(ServerHandle, + DOMAIN_LOOKUP, + &DomainHandle); + if (!NT_SUCCESS(Status)) + { + ERR("OpenBuiltinDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Open the alias account in the builtin domain */ + ApiStatus = OpenAliasByName(DomainHandle, + &AliasName, + ALIAS_ADD_MEMBER, + &AliasHandle); + if (ApiStatus != NERR_Success && ApiStatus != ERROR_NONE_MAPPED) + { + ERR("OpenAliasByName failed (ApiStatus %lu)\n", ApiStatus); + goto done; + } + + if (AliasHandle == NULL) + { + if (DomainHandle != NULL) + SamCloseHandle(DomainHandle); + + /* Open the Acount Domain */ + Status = OpenAccountDomain(ServerHandle, + (servername != NULL) ? &ServerName : NULL, + DOMAIN_LOOKUP, + &DomainHandle); + if (!NT_SUCCESS(Status)) + { + ERR("OpenAccountDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Open the alias account in the account domain */ + ApiStatus = OpenAliasByName(DomainHandle, + &AliasName, + ALIAS_ADD_MEMBER, + &AliasHandle); + if (ApiStatus != NERR_Success) + { + ERR("OpenAliasByName failed (ApiStatus %lu)\n", ApiStatus); + if (ApiStatus == ERROR_NONE_MAPPED) + ApiStatus = NERR_GroupNotFound; + goto done; + } + } + + /* Add new members to the alias */ + for (i = 0; i < totalentries; i++) + { + Status = SamAddMemberToAlias(AliasHandle, + MemberList[i].lgrmi0_sid); + if (!NT_SUCCESS(Status)) + { + ERR("SamAddMemberToAlias failed (Status %lu)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + } + +done: + if (AliasHandle != NULL) + SamCloseHandle(AliasHandle); + + if (DomainHandle != NULL) + SamCloseHandle(DomainHandle); + + if (ServerHandle != NULL) + SamCloseHandle(ServerHandle); + + return ApiStatus; }
11 years, 6 months
1
0
0
0
[ekohl] 59190: [NETAPI32] NetLocalGroupGetMembers: Implement levels 2 and 3. Fixes netapi32:access winetest failures.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Jun 8 11:04:18 2013 New Revision: 59190 URL:
http://svn.reactos.org/svn/reactos?rev=59190&view=rev
Log: [NETAPI32] NetLocalGroupGetMembers: Implement levels 2 and 3. Fixes netapi32:access winetest failures. Modified: trunk/reactos/dll/win32/netapi32/local_group.c Modified: trunk/reactos/dll/win32/netapi32/local_group.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/local_g…
============================================================================== --- trunk/reactos/dll/win32/netapi32/local_group.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/local_group.c [iso-8859-1] Sat Jun 8 11:04:18 2013 @@ -946,6 +946,8 @@ LPVOID Buffer = NULL; PLOCALGROUP_MEMBERS_INFO_0 MembersInfo0; PLOCALGROUP_MEMBERS_INFO_1 MembersInfo1; + PLOCALGROUP_MEMBERS_INFO_2 MembersInfo2; + PLOCALGROUP_MEMBERS_INFO_3 MembersInfo3; LPWSTR Ptr; ULONG Size = 0; ULONG SidLength; @@ -1060,7 +1062,7 @@ goto done; } - + /* Get name and domain information for all members */ if (level != 0) { InitializeObjectAttributes(&ObjectAttributes, @@ -1108,6 +1110,19 @@ EnumContext->Names[i].Name.Length + sizeof(WCHAR); break; + case 2: + Size = sizeof(LOCALGROUP_MEMBERS_INFO_2) + + RtlLengthSid(EnumContext->Sids[i]) + + EnumContext->Names[i].Name.Length + sizeof(WCHAR) + + EnumContext->Domains->Domains[EnumContext->Names[i].DomainIndex].Name.Length + sizeof(WCHAR); + break; + + case 3: + Size = sizeof(LOCALGROUP_MEMBERS_INFO_3) + + EnumContext->Names[i].Name.Length + sizeof(WCHAR) + + EnumContext->Domains->Domains[EnumContext->Names[i].DomainIndex].Name.Length + sizeof(WCHAR); + break; + default: ApiStatus = ERROR_INVALID_LEVEL; goto done; @@ -1132,6 +1147,16 @@ case 1: MembersInfo1 = (PLOCALGROUP_MEMBERS_INFO_1)Buffer; Ptr = (PVOID)((ULONG_PTR)Buffer + sizeof(LOCALGROUP_MEMBERS_INFO_1) * EnumContext->Count); + break; + + case 2: + MembersInfo2 = (PLOCALGROUP_MEMBERS_INFO_2)Buffer; + Ptr = (PVOID)((ULONG_PTR)Buffer + sizeof(LOCALGROUP_MEMBERS_INFO_2) * EnumContext->Count); + break; + + case 3: + MembersInfo3 = (PLOCALGROUP_MEMBERS_INFO_3)Buffer; + Ptr = (PVOID)((ULONG_PTR)Buffer + sizeof(LOCALGROUP_MEMBERS_INFO_3) * EnumContext->Count); break; } @@ -1166,6 +1191,51 @@ MembersInfo1->lgrmi1_name = (LPWSTR)Ptr; memcpy(MembersInfo1->lgrmi1_name, + EnumContext->Names[i].Name.Buffer, + EnumContext->Names[i].Name.Length); + break; + + case 2: + MembersInfo2->lgrmi2_sid = (PSID)Ptr; + + SidLength = RtlLengthSid(EnumContext->Sids[i]); + memcpy(MembersInfo2->lgrmi2_sid, + EnumContext->Sids[i], + SidLength); + + Ptr = (PVOID)((ULONG_PTR)Ptr + SidLength); + + MembersInfo2->lgrmi2_sidusage = EnumContext->Names[i].Use; + + MembersInfo2->lgrmi2_domainandname = (LPWSTR)Ptr; + memcpy(MembersInfo2->lgrmi2_domainandname, + EnumContext->Domains->Domains[EnumContext->Names[i].DomainIndex].Name.Buffer, + EnumContext->Domains->Domains[EnumContext->Names[i].DomainIndex].Name.Length); + + Ptr = (PVOID)((ULONG_PTR)Ptr + EnumContext->Domains->Domains[EnumContext->Names[i].DomainIndex].Name.Length); + + *((LPWSTR)Ptr) = L'\\'; + + Ptr = (PVOID)((ULONG_PTR)Ptr + sizeof(WCHAR)); + + memcpy(Ptr, + EnumContext->Names[i].Name.Buffer, + EnumContext->Names[i].Name.Length); + break; + + case 3: + MembersInfo3->lgrmi3_domainandname = (PSID)Ptr; + memcpy(MembersInfo2->lgrmi2_domainandname, + EnumContext->Domains->Domains[EnumContext->Names[i].DomainIndex].Name.Buffer, + EnumContext->Domains->Domains[EnumContext->Names[i].DomainIndex].Name.Length); + + Ptr = (PVOID)((ULONG_PTR)Ptr + EnumContext->Domains->Domains[EnumContext->Names[i].DomainIndex].Name.Length); + + *((LPWSTR)Ptr) = L'\\'; + + Ptr = (PVOID)((ULONG_PTR)Ptr + sizeof(WCHAR)); + + memcpy(Ptr, EnumContext->Names[i].Name.Buffer, EnumContext->Names[i].Name.Length); break;
11 years, 6 months
1
0
0
0
[fireball] 59189: [KMTEST] - Fix variable declaration placement.
by fireball@svn.reactos.org
Author: fireball Date: Sat Jun 8 10:31:39 2013 New Revision: 59189 URL:
http://svn.reactos.org/svn/reactos?rev=59189&view=rev
Log: [KMTEST] - Fix variable declaration placement. Modified: trunk/rostests/kmtests/ntos_ke/KeDevQueue.c Modified: trunk/rostests/kmtests/ntos_ke/KeDevQueue.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_ke/KeDevQueu…
============================================================================== --- trunk/rostests/kmtests/ntos_ke/KeDevQueue.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/ntos_ke/KeDevQueue.c [iso-8859-1] Sat Jun 8 10:31:39 2013 @@ -75,6 +75,7 @@ PKDEVICE_QUEUE_ENTRY element; KIRQL OldIrql; PKDEVICE_QUEUE_ENTRY* elem_array; + PKDEVICE_QUEUE_ENTRY return_value; PLIST_ENTRY next; ULONG key; @@ -125,8 +126,6 @@ /* Test deletion */ trace("******* Testing KeRemoveDeviceQueue **************** \n"); DPRINT1("\nStart KeRemoveDeviceQueue test\n"); - - PKDEVICE_QUEUE_ENTRY return_value; DPRINT1("Start deleting elements from queue\n"); for (i = 0; i < INSERT_COUNT; i++) {
11 years, 6 months
1
0
0
0
[fireball] 59188: [KMTEST] - Implement simple KeDeviceQueue test by Moscow State Technical University students. Improvements are welcome.
by fireball@svn.reactos.org
Author: fireball Date: Sat Jun 8 10:19:26 2013 New Revision: 59188 URL:
http://svn.reactos.org/svn/reactos?rev=59188&view=rev
Log: [KMTEST] - Implement simple KeDeviceQueue test by Moscow State Technical University students. Improvements are welcome. Added: trunk/rostests/kmtests/ntos_ke/KeDevQueue.c (with props) Modified: trunk/rostests/kmtests/CMakeLists.txt trunk/rostests/kmtests/kmtest_drv/testlist.c Modified: trunk/rostests/kmtests/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/CMakeLists.txt?re…
============================================================================== --- trunk/rostests/kmtests/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/kmtests/CMakeLists.txt [iso-8859-1] Sat Jun 8 10:19:26 2013 @@ -44,6 +44,7 @@ ntos_io/IoIrp.c ntos_io/IoMdl.c ntos_ke/KeApc.c + ntos_ke/KeDevQueue.c ntos_ke/KeDpc.c ntos_ke/KeEvent.c ntos_ke/KeGuardedMutex.c Modified: trunk/rostests/kmtests/kmtest_drv/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/kmtest_drv/testli…
============================================================================== --- trunk/rostests/kmtests/kmtest_drv/testlist.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/kmtest_drv/testlist.c [iso-8859-1] Sat Jun 8 10:19:26 2013 @@ -28,6 +28,7 @@ KMT_TESTFUNC Test_IoIrp; KMT_TESTFUNC Test_IoMdl; KMT_TESTFUNC Test_KeApc; +KMT_TESTFUNC Test_KeDeviceQueue; KMT_TESTFUNC Test_KeDpc; KMT_TESTFUNC Test_KeEvent; KMT_TESTFUNC Test_KeGuardedMutex; @@ -76,6 +77,7 @@ { "IoIrp", Test_IoIrp }, { "IoMdl", Test_IoMdl }, { "KeApc", Test_KeApc }, + { "KeDeviceQueue", Test_KeDeviceQueue }, { "KeDpc", Test_KeDpc }, { "KeEvent", Test_KeEvent }, { "KeGuardedMutex", Test_KeGuardedMutex }, Added: trunk/rostests/kmtests/ntos_ke/KeDevQueue.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_ke/KeDevQueu…
============================================================================== --- trunk/rostests/kmtests/ntos_ke/KeDevQueue.c (added) +++ trunk/rostests/kmtests/ntos_ke/KeDevQueue.c [iso-8859-1] Sat Jun 8 10:19:26 2013 @@ -0,0 +1,200 @@ +/* + * PROJECT: ReactOS kernel-mode tests + * LICENSE: GPLv2+ - See COPYING in the top level directory + * PURPOSE: Kernel-Mode Test Suite for Device Queues + * PROGRAMMERS: Pavel Batusov, Moscow State Technical University + * Denis Volhonsky, Moscow State Technical University + * Alexandra Safonova, Moscow State Technical University + */ + +#include <kmt_test.h> + +#define NDEBUG +#include <debug.h> + +#define NUMBER 255 +#define INSERT_COUNT 5 + +int Check_mem(void* a, int n, int size) +{ + int i; + for (i = 0; i < size; i++) { + if (*((unsigned char*)a + i) != n) { + return 0; + } + } + return 1; +} + +void Test_Initialize() +{ + PKDEVICE_QUEUE testing_queue; + void* double_queue; + + trace("******* Testing KeInitializeDeviceQueue ************\n"); + DPRINT1("\nStart test for KeInitializeDeviceQueue function\n"); + + testing_queue = ExAllocatePool(NonPagedPool, sizeof(KDEVICE_QUEUE)); + + testing_queue->Busy = TRUE; + testing_queue->Size = 0; + + KeInitializeDeviceQueue(testing_queue); + + /* Check for properly setting up fields */ + ok(!testing_queue->Busy, "(Initialize testing) Test 1:\tExpected 'not busy' status\n"); + DPRINT1("1 test complete\n"); + + ok(testing_queue->Size == sizeof(KDEVICE_QUEUE), "(Initialize testing) Test 2:\tExpected another size for KDEVICE_QUEUE\n"); + DPRINT1("2 test complete\n"); + + ok(testing_queue->Type == DeviceQueueObject, "(Initialize testing) Test 3:\tExpected type == DeviceQueueObject\n"); + DPRINT1("3 test complete\n"); + + /* Make sure it does not write outside allocated buffer */ + double_queue = ExAllocatePool(NonPagedPool, sizeof(KDEVICE_QUEUE) * 2); + + memset(double_queue, NUMBER, sizeof(KDEVICE_QUEUE) * 2); + KeInitializeDeviceQueue(double_queue); + + ok(Check_mem((void*)((char*)double_queue + sizeof(KDEVICE_QUEUE)), NUMBER, sizeof(KDEVICE_QUEUE)), "(Initialize testing) Test 4:\tFunction uses someone else's memory \n"); + DPRINT1("4 test complete\n"); + +//==================================================================== + + ExFreePool(testing_queue); + ExFreePool(double_queue); + + DPRINT1("KeInitializeDeviceQueue test finished\n"); +} + +void Tests_Insert_And_Delete() +{ + ULONG i, j; + PKDEVICE_QUEUE testing_queue; + PKDEVICE_QUEUE_ENTRY element; + KIRQL OldIrql; + PKDEVICE_QUEUE_ENTRY* elem_array; + PLIST_ENTRY next; + ULONG key; + + trace("******* Testing KeInsertDeviceQueue **************** \n"); + DPRINT1("\nStart KeInsertDeviceQueue test\n"); + + testing_queue = ExAllocatePool(NonPagedPool, sizeof(KDEVICE_QUEUE)); + KeInitializeDeviceQueue(testing_queue); + + element = ExAllocatePool(NonPagedPool, sizeof(KDEVICE_QUEUE_ENTRY)); + + /* Raise to dispatch level */ + KeRaiseIrql(DISPATCH_LEVEL, &OldIrql); + + KeInsertDeviceQueue(testing_queue, element); + ok(!element->Inserted, "Wrong 'Inserted' status\n"); + DPRINT1("1 test complete\n"); + + /* Fill the queue*/ + elem_array = ExAllocatePool(NonPagedPool, sizeof(PKDEVICE_QUEUE_ENTRY) * INSERT_COUNT); + + DPRINT1("Arrow of tests starting\n"); + for (i = 0; i < INSERT_COUNT; i++) { + elem_array[i] = ExAllocatePool(NonPagedPool, sizeof(KDEVICE_QUEUE_ENTRY)); + elem_array[i]->Inserted = FALSE; + elem_array[i]->SortKey = i; + KeInsertDeviceQueue(testing_queue, elem_array[i]); + ok(elem_array[i]->Inserted, "Element was not inserted\n"); + } + DPRINT1("Arrow of tests complete\n"); + + ok(testing_queue->Size == sizeof(KDEVICE_QUEUE), "Wrong size of queue\n"); + + /* Check how the queue was filled */ + next = &testing_queue->DeviceListHead; + + DPRINT1("Arrow of tests starting\n"); + for (i = 0; i < INSERT_COUNT; i++) { + next = next->Flink; + key = CONTAINING_RECORD(next, KDEVICE_QUEUE_ENTRY, DeviceListEntry)->SortKey; + ok(key == i, "Sort key was changed\n"); + } + DPRINT1("Arrow of tests complete\n"); + + trace("****************************************************\n\n"); + DPRINT1("KeInsertDeviceQueue test finish\n"); + + /* Test deletion */ + trace("******* Testing KeRemoveDeviceQueue **************** \n"); + DPRINT1("\nStart KeRemoveDeviceQueue test\n"); + + PKDEVICE_QUEUE_ENTRY return_value; + + DPRINT1("Start deleting elements from queue\n"); + for (i = 0; i < INSERT_COUNT; i++) { + return_value = KeRemoveDeviceQueue(testing_queue); + ok(return_value == elem_array[i], "Returning element != head element\n"); + ok(return_value->Inserted == FALSE, "Returning element is still in queue\n"); + next = &testing_queue->DeviceListHead; + for (j = i + 1; j < INSERT_COUNT; j++) { + next = next->Flink; + ok(CONTAINING_RECORD(next, KDEVICE_QUEUE_ENTRY, DeviceListEntry)->SortKey == j, "Queue was damaged\n"); + } + } + DPRINT1("Deleting finish. Queue must be empty\n"); + + ok(KeRemoveDeviceQueue(testing_queue) == NULL, "Queue is not empty\n"); + ok(testing_queue->Busy == FALSE, "Queue is busy\n"); + + trace("****************************************************\n\n"); + DPRINT1("Finish KeRemoveDeviceQueue test\n"); + +//==================================================================== + trace("******* Testing KeRemoveEntryDeviceQueue *********** \n"); + DPRINT1("\nStart KeRemoveEntryDeviceQueue test\n"); + + DPRINT1("Filling queue\n"); + for (i = 0; i < INSERT_COUNT; i++) { + elem_array[i]->SortKey = i; + elem_array[i]->Inserted = FALSE; + KeInsertDeviceQueue(testing_queue, elem_array[i]); + } + + //Delete half elements + DPRINT1("Deleting elements\n"); + for (i = 0; i < INSERT_COUNT / 2; i++) { + ok(KeRemoveEntryDeviceQueue(testing_queue, elem_array[i * 2 + 1]), "Element is not deleted\n"); + } + + //Checking queue + DPRINT1("Checking\n"); + next = &testing_queue->DeviceListHead; + for (i = 0; i < INSERT_COUNT / 2 + 1; i++) { + ok(CONTAINING_RECORD(next, KDEVICE_QUEUE_ENTRY, DeviceListEntry)->SortKey == i * 2, "Queue was damaged\n"); + next = next->Flink; + } + + //Trying delete elements, which are not in this queue + DPRINT1("Trying delete nonexistent elements\n"); + for (i = 0; i < INSERT_COUNT / 2; i++) { + ok(!KeRemoveEntryDeviceQueue(testing_queue, elem_array[i * 2 + 1]), "Wrong remove operation\n"); + } + + trace("****************************************************\n\n"); +//Îñâîáîæäåíåè ïàìÿòè +//==================================================================== + for (i = 0; i < INSERT_COUNT; i++) { + ExFreePool(elem_array[i]); + } + + /* Return back to previous IRQL */ + KeLowerIrql(OldIrql); + + ExFreePool(testing_queue); + ExFreePool(element); +} + +START_TEST(KeDeviceQueue) +{ + Test_Initialize(); + Tests_Insert_And_Delete(); +} + Propchange: trunk/rostests/kmtests/ntos_ke/KeDevQueue.c ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/rostests/kmtests/ntos_ke/KeDevQueue.c ------------------------------------------------------------------------------ svn:mime-type = text/plain
11 years, 6 months
1
0
0
0
[hbelusca] 59187: Fix code indentation
by hbelusca@svn.reactos.org
Author: hbelusca Date: Fri Jun 7 23:50:44 2013 New Revision: 59187 URL:
http://svn.reactos.org/svn/reactos?rev=59187&view=rev
Log: Fix code indentation Modified: trunk/reactos/dll/win32/kernel32/client/file/filename.c Modified: trunk/reactos/dll/win32/kernel32/client/file/filename.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/client/file/filename.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/file/filename.c [iso-8859-1] Fri Jun 7 23:50:44 2013 @@ -233,53 +233,53 @@ BOOL WINAPI SetFileShortNameW( - HANDLE hFile, - LPCWSTR lpShortName) -{ - NTSTATUS Status; - ULONG NeededSize; - UNICODE_STRING ShortName; - IO_STATUS_BLOCK IoStatusBlock; - PFILE_NAME_INFORMATION FileNameInfo; - - if(IsConsoleHandle(hFile)) - { - SetLastError(ERROR_INVALID_HANDLE); - return FALSE; - } - - if(!lpShortName) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - RtlInitUnicodeString(&ShortName, lpShortName); - - NeededSize = sizeof(FILE_NAME_INFORMATION) + ShortName.Length + sizeof(WCHAR); - if(!(FileNameInfo = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, NeededSize))) - { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; - } - - FileNameInfo->FileNameLength = ShortName.Length; - RtlCopyMemory(FileNameInfo->FileName, ShortName.Buffer, ShortName.Length); - - Status = NtSetInformationFile(hFile, - &IoStatusBlock, //out - FileNameInfo, - NeededSize, - FileShortNameInformation); - - RtlFreeHeap(RtlGetProcessHeap(), 0, FileNameInfo); - if(!NT_SUCCESS(Status)) - { - BaseSetLastNTError(Status); - return FALSE; - } - - return TRUE; + HANDLE hFile, + LPCWSTR lpShortName) +{ + NTSTATUS Status; + ULONG NeededSize; + UNICODE_STRING ShortName; + IO_STATUS_BLOCK IoStatusBlock; + PFILE_NAME_INFORMATION FileNameInfo; + + if(IsConsoleHandle(hFile)) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + + if(!lpShortName) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + RtlInitUnicodeString(&ShortName, lpShortName); + + NeededSize = sizeof(FILE_NAME_INFORMATION) + ShortName.Length + sizeof(WCHAR); + if(!(FileNameInfo = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, NeededSize))) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + + FileNameInfo->FileNameLength = ShortName.Length; + RtlCopyMemory(FileNameInfo->FileName, ShortName.Buffer, ShortName.Length); + + Status = NtSetInformationFile(hFile, + &IoStatusBlock, //out + FileNameInfo, + NeededSize, + FileShortNameInformation); + + RtlFreeHeap(RtlGetProcessHeap(), 0, FileNameInfo); + if(!NT_SUCCESS(Status)) + { + BaseSetLastNTError(Status); + return FALSE; + } + + return TRUE; } @@ -290,27 +290,26 @@ WINAPI SetFileShortNameA( HANDLE hFile, - LPCSTR lpShortName - ) -{ - PWCHAR ShortNameW; - - if(IsConsoleHandle(hFile)) - { - SetLastError(ERROR_INVALID_HANDLE); - return FALSE; - } - - if(!lpShortName) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - if (!(ShortNameW = FilenameA2W(lpShortName, FALSE))) - return FALSE; - - return SetFileShortNameW(hFile, ShortNameW); + LPCSTR lpShortName) +{ + PWCHAR ShortNameW; + + if(IsConsoleHandle(hFile)) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + + if(!lpShortName) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + if (!(ShortNameW = FilenameA2W(lpShortName, FALSE))) + return FALSE; + + return SetFileShortNameW(hFile, ShortNameW); }
11 years, 6 months
1
0
0
0
[ekohl] 59186: [NETAPI32] Fix NetLocalGroupGetMembers and implement level 1. The netapi32:access winetest does not crash any more and group members appear in the user manager control panel.
by ekohl@svn.reactos.org
Author: ekohl Date: Fri Jun 7 22:36:49 2013 New Revision: 59186 URL:
http://svn.reactos.org/svn/reactos?rev=59186&view=rev
Log: [NETAPI32] Fix NetLocalGroupGetMembers and implement level 1. The netapi32:access winetest does not crash any more and group members appear in the user manager control panel. Modified: trunk/reactos/dll/win32/netapi32/local_group.c Modified: trunk/reactos/dll/win32/netapi32/local_group.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/local_g…
============================================================================== --- trunk/reactos/dll/win32/netapi32/local_group.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/local_group.c [iso-8859-1] Fri Jun 7 22:36:49 2013 @@ -50,10 +50,13 @@ SAM_HANDLE ServerHandle; SAM_HANDLE DomainHandle; SAM_HANDLE AliasHandle; + LSA_HANDLE LsaHandle; PSID *Sids; ULONG Count; - ULONG Index; + PLSA_REFERENCED_DOMAIN_LIST Domains; + PLSA_TRANSLATED_NAME Names; + } MEMBER_ENUM_CONTEXT, *PMEMBER_ENUM_CONTEXT; @@ -157,66 +160,6 @@ SamFreeMemory(AliasInfo->AdminComment.Buffer); SamFreeMemory(AliasInfo); -} - - -static -NET_API_STATUS -BuildAliasMemberBuffer(PSID MemberSid, - DWORD level, - LPVOID *Buffer) -{ - LPVOID LocalBuffer = NULL; - PLOCALGROUP_MEMBERS_INFO_0 MembersInfo0; - PVOID Ptr; - ULONG Size = 0; - NET_API_STATUS ApiStatus = NERR_Success; - - switch (level) - { - case 0: - Size = sizeof(LOCALGROUP_MEMBERS_INFO_0) + - RtlLengthSid(MemberSid); - break; - - default: - ApiStatus = ERROR_INVALID_LEVEL; - goto done; - } - - - ApiStatus = NetApiBufferAllocate(Size, &LocalBuffer); - if (ApiStatus != NERR_Success) - goto done; - - ZeroMemory(LocalBuffer, Size); - - switch (level) - { - case 0: - MembersInfo0 = (PLOCALGROUP_MEMBERS_INFO_0)LocalBuffer; - - Ptr = (PVOID)MembersInfo0++; - MembersInfo0->lgrmi0_sid = (PSID)Ptr; - - memcpy(MembersInfo0->lgrmi0_sid, - MemberSid, - RtlLengthSid(MemberSid)); - break; - } - -done: - if (ApiStatus == NERR_Success) - { - *Buffer = LocalBuffer; - } - else - { - if (LocalBuffer != NULL) - NetApiBufferFree(LocalBuffer); - } - - return ApiStatus; } @@ -996,14 +939,21 @@ LPDWORD totalentries, PDWORD_PTR resumehandle) { + OBJECT_ATTRIBUTES ObjectAttributes; UNICODE_STRING ServerName; UNICODE_STRING AliasName; PMEMBER_ENUM_CONTEXT EnumContext = NULL; LPVOID Buffer = NULL; + PLOCALGROUP_MEMBERS_INFO_0 MembersInfo0; + PLOCALGROUP_MEMBERS_INFO_1 MembersInfo1; + LPWSTR Ptr; + ULONG Size = 0; + ULONG SidLength; + ULONG i; NET_API_STATUS ApiStatus = NERR_Success; NTSTATUS Status = STATUS_SUCCESS; - TRACE("(%s %s %d %p %d, %p %p %p) stub!\n", debugstr_w(servername), + TRACE("(%s %s %d %p %d, %p %p %p)\n", debugstr_w(servername), debugstr_w(localgroupname), level, bufptr, prefmaxlen, entriesread, totalentries, resumehandle); @@ -1109,30 +1059,135 @@ ApiStatus = NERR_Success; goto done; } - } - - /* Build the member information buffer */ - ApiStatus = BuildAliasMemberBuffer(EnumContext->Sids[EnumContext->Index], - level, - &Buffer); + + + if (level != 0) + { + InitializeObjectAttributes(&ObjectAttributes, + NULL, + 0, + 0, + NULL); + + Status = LsaOpenPolicy((servername != NULL) ? &ServerName : NULL, + (PLSA_OBJECT_ATTRIBUTES)&ObjectAttributes, + POLICY_EXECUTE, + &EnumContext->LsaHandle); + if (!NT_SUCCESS(Status)) + { + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + Status = LsaLookupSids(EnumContext->LsaHandle, + EnumContext->Count, + EnumContext->Sids, + &EnumContext->Domains, + &EnumContext->Names); + if (!NT_SUCCESS(Status)) + { + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + } + } + + /* Calculate the required buffer size */ + for (i = 0; i < EnumContext->Count; i++) + { + switch (level) + { + case 0: + Size = sizeof(LOCALGROUP_MEMBERS_INFO_0) + + RtlLengthSid(EnumContext->Sids[i]); + break; + + case 1: + Size = sizeof(LOCALGROUP_MEMBERS_INFO_1) + + RtlLengthSid(EnumContext->Sids[i]) + + EnumContext->Names[i].Name.Length + sizeof(WCHAR); + break; + + default: + ApiStatus = ERROR_INVALID_LEVEL; + goto done; + } + } + + /* Allocate the member buffer */ + ApiStatus = NetApiBufferAllocate(Size, &Buffer); if (ApiStatus != NERR_Success) goto done; - EnumContext->Index++; - (*entriesread)++; + ZeroMemory(Buffer, Size); + + /* Fill the member buffer */ + switch (level) + { + case 0: + MembersInfo0 = (PLOCALGROUP_MEMBERS_INFO_0)Buffer; + Ptr = (PVOID)((ULONG_PTR)Buffer + sizeof(LOCALGROUP_MEMBERS_INFO_0) * EnumContext->Count); + break; + + case 1: + MembersInfo1 = (PLOCALGROUP_MEMBERS_INFO_1)Buffer; + Ptr = (PVOID)((ULONG_PTR)Buffer + sizeof(LOCALGROUP_MEMBERS_INFO_1) * EnumContext->Count); + break; + } + + for (i = 0; i < EnumContext->Count; i++) + { + switch (level) + { + case 0: + MembersInfo0->lgrmi0_sid = (PSID)Ptr; + + SidLength = RtlLengthSid(EnumContext->Sids[i]); + memcpy(MembersInfo0->lgrmi0_sid, + EnumContext->Sids[i], + SidLength); + Ptr = (PVOID)((ULONG_PTR)Ptr + SidLength); + break; + + case 1: + MembersInfo1->lgrmi1_sid = (PSID)Ptr; + + SidLength = RtlLengthSid(EnumContext->Sids[i]); + memcpy(MembersInfo1->lgrmi1_sid, + EnumContext->Sids[i], + SidLength); + + Ptr = (PVOID)((ULONG_PTR)Ptr + SidLength); + + MembersInfo1->lgrmi1_sidusage = EnumContext->Names[i].Use; + + TRACE("Name: %S\n", EnumContext->Names[i].Name.Buffer); + + MembersInfo1->lgrmi1_name = (LPWSTR)Ptr; + + memcpy(MembersInfo1->lgrmi1_name, + EnumContext->Names[i].Name.Buffer, + EnumContext->Names[i].Name.Length); + break; + } + } + + *entriesread = EnumContext->Count; + + *bufptr = (LPBYTE)Buffer; done: - if (ApiStatus == NERR_Success && EnumContext->Index < EnumContext->Count) - ApiStatus = ERROR_MORE_DATA; - if (EnumContext != NULL) - *totalentries = EnumContext->Count - EnumContext->Index; + *totalentries = EnumContext->Count; if (resumehandle == NULL || ApiStatus != ERROR_MORE_DATA) { /* Release the enumeration context */ if (EnumContext != NULL) { + if (EnumContext->LsaHandle != NULL) + LsaClose(EnumContext->LsaHandle); + if (EnumContext->AliasHandle != NULL) SamCloseHandle(EnumContext->AliasHandle); @@ -1144,6 +1199,12 @@ if (EnumContext->Sids != NULL) SamFreeMemory(EnumContext->Sids); + + if (EnumContext->Domains != NULL) + LsaFreeMemory(EnumContext->Domains); + + if (EnumContext->Names != NULL) + LsaFreeMemory(EnumContext->Names); NetApiBufferFree(EnumContext); EnumContext = NULL;
11 years, 6 months
1
0
0
0
[hbelusca] 59185: [KERNEL32-RTL] Fix return type and usage of RtlDetermineDosPathNameType_U, and use the declaration of RTL_PATH_TYPE in winternl.h instead of the wineism DOS_PATHNAME_TYPE. See r59...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Fri Jun 7 20:40:34 2013 New Revision: 59185 URL:
http://svn.reactos.org/svn/reactos?rev=59185&view=rev
Log: [KERNEL32-RTL] Fix return type and usage of RtlDetermineDosPathNameType_U, and use the declaration of RTL_PATH_TYPE in winternl.h instead of the wineism DOS_PATHNAME_TYPE. See r59183 and 59184 for more information. Modified: trunk/reactos/dll/win32/kernel32/wine/profile.c trunk/reactos/include/ndk/rtlfuncs.h trunk/reactos/include/psdk/winternl.h trunk/reactos/lib/rtl/path.c Modified: trunk/reactos/dll/win32/kernel32/wine/profile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/wine/pr…
============================================================================== --- trunk/reactos/dll/win32/kernel32/wine/profile.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/wine/profile.c [iso-8859-1] Fri Jun 7 20:40:34 2013 @@ -762,7 +762,7 @@ if (!filename) filename = wininiW; - if ((RtlDetermineDosPathNameType_U(filename) == RELATIVE_PATH) && + if ((RtlDetermineDosPathNameType_U(filename) == RtlPathTypeRelative) && !strchrW(filename, '\\') && !strchrW(filename, '/')) { static const WCHAR wszSeparator[] = {'\\', 0}; Modified: trunk/reactos/include/ndk/rtlfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtlfuncs.h?rev…
============================================================================== --- trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] Fri Jun 7 20:40:34 2013 @@ -2617,7 +2617,7 @@ ); NTSYSAPI -ULONG +RTL_PATH_TYPE NTAPI RtlDetermineDosPathNameType_U( _In_ PCWSTR Path 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] Fri Jun 7 20:40:34 2013 @@ -861,18 +861,18 @@ } TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION; -/* return type of RtlDetermineDosPathNameType_U (FIXME: not the correct names) */ -typedef enum -{ - INVALID_PATH = 0, - UNC_PATH, /* "//foo" */ - ABSOLUTE_DRIVE_PATH, /* "c:/foo" */ - RELATIVE_DRIVE_PATH, /* "c:foo" */ - ABSOLUTE_PATH, /* "/foo" */ - RELATIVE_PATH, /* "foo" */ - DEVICE_PATH, /* "//./foo" */ - UNC_DOT_PATH /* "//." */ -} DOS_PATHNAME_TYPE; +/* Return type of RtlDetermineDosPathNameType_U */ +typedef enum _RTL_PATH_TYPE +{ + RtlPathTypeUnknown, + RtlPathTypeUncAbsolute, + RtlPathTypeDriveAbsolute, + RtlPathTypeDriveRelative, + RtlPathTypeRooted, + RtlPathTypeRelative, + RtlPathTypeLocalDevice, + RtlPathTypeRootLocalDevice, +} RTL_PATH_TYPE; /*********************************************************************** * IA64 specific types and data structures @@ -2130,7 +2130,7 @@ HANDLE WINAPI RtlDestroyHeap(HANDLE); void WINAPI RtlDestroyProcessParameters(RTL_USER_PROCESS_PARAMETERS*); NTSTATUS WINAPI RtlDestroyQueryDebugBuffer(PDEBUG_BUFFER); -DOS_PATHNAME_TYPE WINAPI RtlDetermineDosPathNameType_U(PCWSTR); +RTL_PATH_TYPE WINAPI RtlDetermineDosPathNameType_U(PCWSTR); BOOLEAN WINAPI RtlDoesFileExists_U(LPCWSTR); BOOLEAN WINAPI RtlDosPathNameToNtPathName_U(PCWSTR,PUNICODE_STRING,PCWSTR*,CURDIR*); ULONG WINAPI RtlDosSearchPath_U(LPCWSTR, LPCWSTR, LPCWSTR, ULONG, LPWSTR, LPWSTR*); Modified: trunk/reactos/lib/rtl/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/path.c?rev=59185&r…
============================================================================== --- trunk/reactos/lib/rtl/path.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/path.c [iso-8859-1] Fri Jun 7 20:40:34 2013 @@ -867,7 +867,7 @@ /* * @implemented */ -ULONG +RTL_PATH_TYPE NTAPI RtlDetermineDosPathNameType_U(IN PCWSTR Path) {
11 years, 6 months
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
28
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
Results per page:
10
25
50
100
200