Author: sir_richard Date: Sat Oct 2 01:12:53 2010 New Revision: 48958
URL: http://svn.reactos.org/svn/reactos?rev=48958&view=rev Log: [PSDK]: Add missing SEC_XXX definitions for Server 2003 (Vista ones still missing). [KERNEL32]: NtCreateSection should not be called with merely SEC_FILE: this says nothing about what kind of operation should be done (a commit, a reserve, etc?). Use SEC_COMMIT instead to specify correct operation. This works in ReactOS as of now, but would've failed after the NtSection* API rewrite. [KERNEL32]: CreateFileMappingW should also accept/allow SEC_LARGE_PAGES, even if we don't suppport it yet.
Modified: trunk/reactos/dll/win32/kernel32/mem/section.c trunk/reactos/dll/win32/kernel32/misc/nls.c trunk/reactos/include/psdk/winnt.h
Modified: trunk/reactos/dll/win32/kernel32/mem/section.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/mem/sect... ============================================================================== --- trunk/reactos/dll/win32/kernel32/mem/section.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/mem/section.c [iso-8859-1] Sat Oct 2 01:12:53 2010 @@ -87,7 +87,7 @@ DesiredAccess = STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ;
/* Get the attributes for the actual allocation and cleanup flProtect */ - Attributes = flProtect & (SEC_FILE | SEC_IMAGE | SEC_RESERVE | SEC_NOCACHE | SEC_COMMIT); + Attributes = flProtect & (SEC_FILE | SEC_IMAGE | SEC_RESERVE | SEC_NOCACHE | SEC_COMMIT | SEC_LARGE_PAGES); flProtect ^= Attributes;
/* If the caller didn't say anything, assume SEC_COMMIT */
Modified: trunk/reactos/dll/win32/kernel32/misc/nls.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/nls... ============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/nls.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/nls.c [iso-8859-1] Sat Oct 2 01:12:53 2010 @@ -282,7 +282,7 @@ &ObjectAttributes, NULL, PAGE_READONLY, - SEC_FILE, + SEC_COMMIT, FileHandle);
/* HACK: Check if another process was faster
Modified: trunk/reactos/include/psdk/winnt.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=48... ============================================================================== --- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Sat Oct 2 01:12:53 2010 @@ -1305,6 +1305,8 @@ #define SEC_RESERVE 0x04000000 #define SEC_COMMIT 0x08000000 #define SEC_NOCACHE 0x10000000 +#define SEC_WRITECOMBINE 0x40000000 +#define SEC_LARGE_PAGES 0x80000000 #define SECTION_EXTEND_SIZE 16 #define SECTION_MAP_READ 4 #define SECTION_MAP_WRITE 2