ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 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
11 participants
185 discussions
Start a n
N
ew thread
[hbelusca] 58097: [KERNEL32/BASESRV] Remove now unneeded bInheritHandles member / parameter.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Jan 1 23:41:42 2013 New Revision: 58097 URL:
http://svn.reactos.org/svn/reactos?rev=58097&view=rev
Log: [KERNEL32/BASESRV] Remove now unneeded bInheritHandles member / parameter. Modified: branches/ros-csrss/dll/win32/kernel32/client/proc.c branches/ros-csrss/include/reactos/subsys/win/basemsg.h Modified: branches/ros-csrss/dll/win32/kernel32/client/proc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cl…
============================================================================== --- branches/ros-csrss/dll/win32/kernel32/client/proc.c [iso-8859-1] (original) +++ branches/ros-csrss/dll/win32/kernel32/client/proc.c [iso-8859-1] Tue Jan 1 23:41:42 2013 @@ -528,7 +528,6 @@ LPSECURITY_ATTRIBUTES lpThreadAttributes, PSECTION_IMAGE_INFORMATION SectionImageInfo, PCLIENT_ID ClientId, - BOOLEAN InheritHandles, DWORD dwCreationFlags) { NTSTATUS Status; @@ -579,7 +578,6 @@ CreateProcessRequest->ProcessHandle = ProcessHandle; CreateProcessRequest->ThreadHandle = hThread; CreateProcessRequest->CreationFlags = dwCreationFlags; - CreateProcessRequest->bInheritHandles = InheritHandles; /* * For GUI applications we turn on the 2nd bit. This also allows @@ -3251,7 +3249,6 @@ lpThreadAttributes, &SectionImageInfo, &ClientId, - bInheritHandles, dwCreationFlags); if (hThread == NULL) Modified: branches/ros-csrss/include/reactos/subsys/win/basemsg.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/include/reactos/subsy…
============================================================================== --- branches/ros-csrss/include/reactos/subsys/win/basemsg.h [iso-8859-1] (original) +++ branches/ros-csrss/include/reactos/subsys/win/basemsg.h [iso-8859-1] Tue Jan 1 23:41:42 2013 @@ -82,11 +82,6 @@ PVOID PebAddressNative; ULONG PebAddressWow64; USHORT ProcessorArchitecture; - - // - // ReactOS Data - // - BOOL bInheritHandles; } BASE_CREATE_PROCESS, *PBASE_CREATE_PROCESS; typedef struct
11 years, 11 months
1
0
0
0
[hbelusca] 58096: [KERNEL32/BASESRV/CONSRV] - Fix console apps initialization. - Introduce a helper function InitConsoleCtrlHandling for initializing console control handling. - We now initialize t...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Jan 1 23:36:19 2013 New Revision: 58096 URL:
http://svn.reactos.org/svn/reactos?rev=58096&view=rev
Log: [KERNEL32/BASESRV/CONSRV] - Fix console apps initialization. - Introduce a helper function InitConsoleCtrlHandling for initializing console control handling. - We now initialize the new created console when connecting the client (kernel32) to the server (consrv) by calling CsrClientConnectToServer with real parameters (not dummy ones). - Add/activate some debug prints (will be removed when all things work). Part 1/2 Modified: branches/ros-csrss/dll/win32/kernel32/client/console/console.c branches/ros-csrss/dll/win32/kernel32/client/dllmain.c branches/ros-csrss/dll/win32/kernel32/client/proc.c branches/ros-csrss/dll/win32/kernel32/include/kernel32.h branches/ros-csrss/include/reactos/subsys/win/conmsg.h branches/ros-csrss/subsystems/win/basesrv/server.c Modified: branches/ros-csrss/dll/win32/kernel32/client/console/console.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cl…
============================================================================== --- branches/ros-csrss/dll/win32/kernel32/client/console/console.c [iso-8859-1] (original) +++ branches/ros-csrss/dll/win32/kernel32/client/console/console.c [iso-8859-1] Tue Jan 1 23:36:19 2013 @@ -29,6 +29,8 @@ ULONG NrCtrlHandlers; ULONG NrAllocatedHandlers; +HANDLE InputWaitHandle = INVALID_HANDLE_VALUE; + #define INPUTEXENAME_BUFLEN 256 static WCHAR InputExeName[INPUTEXENAME_BUFLEN]; @@ -76,7 +78,7 @@ UINT i; EXCEPTION_RECORD erException; - DPRINT("Console Dispatcher Active: %lx %lx\n", CodeAndFlag, nCode); + DPRINT1("Console Dispatcher Active: %lx %lx\n", CodeAndFlag, nCode); SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST); switch(nCode) @@ -174,6 +176,16 @@ return STATUS_SUCCESS; } +VOID +WINAPI +InitConsoleCtrlHandling(VOID) +{ + /* Initialize Console Ctrl Handler */ + NrAllocatedHandlers = NrCtrlHandlers = 1; + CtrlHandlers = InitialHandler; + CtrlHandlers[0] = DefaultConsoleCtrlHandler; +} + /* FUNCTIONS ******************************************************************/ @@ -321,10 +333,6 @@ WINAPI GetConsoleInputWaitHandle(VOID) { -/// HACK !!!!!!!!!!!!! - ASSERT(FALSE); - return NULL; - #if 0 NTSTATUS Status; CONSOLE_API_MESSAGE ApiMessage; @@ -341,6 +349,8 @@ return ApiMessage.Data.GetConsoleInputWaitHandle.InputWaitHandle; #endif + + return InputWaitHandle; } @@ -786,8 +796,9 @@ NTSTATUS Status; CONSOLE_API_MESSAGE ApiMessage; PCSRSS_ALLOC_CONSOLE AllocConsoleRequest = &ApiMessage.Data.AllocConsoleRequest; - HANDLE hStdError; STARTUPINFO si; + + DPRINT1("AllocConsole called !!!!\n"); if (NtCurrentPeb()->ProcessParameters->ConsoleHandle) { @@ -798,9 +809,9 @@ GetStartupInfo(&si); + AllocConsoleRequest->ShowCmd = si.wShowWindow; + AllocConsoleRequest->Console = NULL; AllocConsoleRequest->CtrlDispatcher = ConsoleControlDispatcher; - AllocConsoleRequest->ConsoleNeeded = TRUE; - AllocConsoleRequest->ShowCmd = si.wShowWindow; Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, NULL, @@ -814,15 +825,15 @@ NtCurrentPeb()->ProcessParameters->ConsoleHandle = AllocConsoleRequest->Console; - SetStdHandle(STD_INPUT_HANDLE, AllocConsoleRequest->InputHandle); + SetStdHandle(STD_INPUT_HANDLE , AllocConsoleRequest->InputHandle ); SetStdHandle(STD_OUTPUT_HANDLE, AllocConsoleRequest->OutputHandle); - - hStdError = DuplicateConsoleHandle(AllocConsoleRequest->OutputHandle, - 0, - TRUE, - DUPLICATE_SAME_ACCESS); - - SetStdHandle(STD_ERROR_HANDLE, hStdError); + SetStdHandle(STD_ERROR_HANDLE , AllocConsoleRequest->ErrorHandle ); + + /* Initialize Console Ctrl Handler */ + InitConsoleCtrlHandling(); + + InputWaitHandle = AllocConsoleRequest->InputWaitHandle; + return TRUE; } @@ -853,6 +864,10 @@ } NtCurrentPeb()->ProcessParameters->ConsoleHandle = NULL; + + CloseHandle(InputWaitHandle); + InputWaitHandle = INVALID_HANDLE_VALUE; + return TRUE; } Modified: branches/ros-csrss/dll/win32/kernel32/client/dllmain.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cl…
============================================================================== --- branches/ros-csrss/dll/win32/kernel32/client/dllmain.c [iso-8859-1] (original) +++ branches/ros-csrss/dll/win32/kernel32/client/dllmain.c [iso-8859-1] Tue Jan 1 23:36:19 2013 @@ -36,12 +36,9 @@ RTL_CRITICAL_SECTION BaseDllDirectoryLock; RTL_CRITICAL_SECTION ConsoleLock; -extern BOOL WINAPI DefaultConsoleCtrlHandler(DWORD Event); extern DWORD WINAPI ConsoleControlDispatcher(IN LPVOID lpThreadParameter); -extern PHANDLER_ROUTINE InitialHandler[1]; -extern PHANDLER_ROUTINE* CtrlHandlers; -extern ULONG NrCtrlHandlers; -extern ULONG NrAllocatedHandlers; +extern HANDLE InputWaitHandle; + extern BOOL FASTCALL NlsInit(VOID); extern VOID FASTCALL NlsUninit(VOID); @@ -55,9 +52,6 @@ BasepInitConsole(VOID) { NTSTATUS Status; - CONSOLE_API_MESSAGE ApiMessage; - PCSRSS_ALLOC_CONSOLE AllocConsoleRequest = &ApiMessage.Data.AllocConsoleRequest; - BOOLEAN NotConsole = FALSE; PRTL_USER_PROCESS_PARAMETERS Parameters = NtCurrentPeb()->ProcessParameters; LPCWSTR ExeName; STARTUPINFO si; @@ -65,12 +59,8 @@ ULONG SessionId = NtCurrentPeb()->SessionId; BOOLEAN InServer; - // HACK - /* - CSR_CONNECTION_INFO CsrConnectionInfo; - ULONG ConnectionSize = sizeof(CsrConnectionInfo); - */ - // END HACK + CONSOLE_CONNECTION_INFO ConnectInfo; + ULONG ConnectInfoSize = sizeof(ConnectInfo); WCHAR lpTest[MAX_PATH]; GetModuleFileNameW(NULL, lpTest, MAX_PATH); @@ -79,28 +69,33 @@ Parameters->ConsoleHandle, Parameters->StandardInput, Parameters->StandardOutput, Parameters->StandardError); + /* Initialize our global console DLL lock */ + Status = RtlInitializeCriticalSection(&ConsoleLock); + if (!NT_SUCCESS(Status)) return FALSE; + ConsoleInitialized = TRUE; + /* We have nothing to do if this isn't a console app... */ if (RtlImageNtHeader(GetModuleHandle(NULL))->OptionalHeader.Subsystem != IMAGE_SUBSYSTEM_WINDOWS_CUI) { DPRINT("Image is not a console application\n"); Parameters->ConsoleHandle = NULL; - AllocConsoleRequest->ConsoleNeeded = FALSE; + ConnectInfo.ConsoleNeeded = FALSE; // ConsoleNeeded is used for knowing whether or not this is a CUI app. } else { /* Assume one is needed */ GetStartupInfo(&si); - AllocConsoleRequest->ConsoleNeeded = TRUE; - AllocConsoleRequest->ShowCmd = si.wShowWindow; - - /* Handle the special flags given to us by BasepInitializeEnvironment */ + ConnectInfo.ConsoleNeeded = TRUE; + ConnectInfo.ShowCmd = si.wShowWindow; + + /* Handle the special flags given to us by BasePushProcessParameters */ if (Parameters->ConsoleHandle == HANDLE_DETACHED_PROCESS) { /* No console to create */ DPRINT("No console to create\n"); Parameters->ConsoleHandle = NULL; - AllocConsoleRequest->ConsoleNeeded = FALSE; + ConnectInfo.ConsoleNeeded = FALSE; } else if (Parameters->ConsoleHandle == HANDLE_CREATE_NEW_CONSOLE) { @@ -113,33 +108,29 @@ /* We'll get the real one soon */ DPRINT("Creating new invisible console\n"); Parameters->ConsoleHandle = NULL; - AllocConsoleRequest->ShowCmd = SW_HIDE; + ConnectInfo.ShowCmd = SW_HIDE; } else { if (Parameters->ConsoleHandle == INVALID_HANDLE_VALUE) { - Parameters->ConsoleHandle = 0; + Parameters->ConsoleHandle = NULL; } DPRINT("Using existing console: %x\n", Parameters->ConsoleHandle); } } + /* Now use the proper console handle */ + ConnectInfo.Console = Parameters->ConsoleHandle; + /* Initialize Console Ctrl Handler and input EXE name */ - ConsoleInitialized = TRUE; - RtlInitializeCriticalSection(&ConsoleLock); - NrAllocatedHandlers = 1; - NrCtrlHandlers = 1; - CtrlHandlers = InitialHandler; - CtrlHandlers[0] = DefaultConsoleCtrlHandler; + InitConsoleCtrlHandling(); + ConnectInfo.CtrlDispatcher = ConsoleControlDispatcher; ExeName = wcsrchr(Parameters->ImagePathName.Buffer, L'\\'); if (ExeName) SetConsoleInputExeNameW(ExeName + 1); - /* Now use the proper console handle */ - AllocConsoleRequest->Console = Parameters->ConsoleHandle; - /* Setup the right Object Directory path */ if (!SessionId) { @@ -156,60 +147,44 @@ WIN_OBJ_DIR); } - /* Connect to the base server */ - DPRINT("Connecting to CSR in BasepInitConsole...\n"); + /* Connect to the Console Server */ + DPRINT("Connecting to the Console Server in BasepInitConsole...\n"); Status = CsrClientConnectToServer(SessionDir, CONSRV_SERVERDLL_INDEX, - /* &CsrConnectionInfo, */ NULL, // TODO: Give it a console connection info - /* &ConnectionSize, */ NULL, // TODO: Give it a console connection info + &ConnectInfo, + &ConnectInfoSize, &InServer); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to connect to CSR (Status %lx)\n", Status); + DPRINT1("Failed to connect to the Console Server (Status %lx)\n", Status); return FALSE; } /* Nothing to do for server-to-server */ if (InServer) return TRUE; - /* - * Normally, we should be connecting to the Console CSR Server... - * but we don't have one yet, so we will instead simply send a create - * console message to the Base Server. When we finally have a Console - * Server, this code should be changed to send connection data instead. - */ - AllocConsoleRequest->CtrlDispatcher = ConsoleControlDispatcher; - Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, - NULL, - CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepAlloc), - sizeof(CSRSS_ALLOC_CONSOLE)); - if(!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status)) - { - DPRINT1("CSR Failed to give us a console\n"); - /* We're lying here, so at least the process can load... */ - return TRUE; - } - /* Nothing to do if not a console app */ - if (NotConsole) return TRUE; + if (!ConnectInfo.ConsoleNeeded) return TRUE; /* We got the handles, let's set them */ - if ((Parameters->ConsoleHandle = AllocConsoleRequest->Console)) + if ((Parameters->ConsoleHandle = ConnectInfo.Console)) { /* If we already had some, don't use the new ones */ if (!Parameters->StandardInput) { - Parameters->StandardInput = AllocConsoleRequest->InputHandle; + Parameters->StandardInput = ConnectInfo.InputHandle; } if (!Parameters->StandardOutput) { - Parameters->StandardOutput = AllocConsoleRequest->OutputHandle; + Parameters->StandardOutput = ConnectInfo.OutputHandle; } if (!Parameters->StandardError) { - Parameters->StandardError = AllocConsoleRequest->OutputHandle; - } - } + Parameters->StandardError = ConnectInfo.ErrorHandle; + } + } + + InputWaitHandle = ConnectInfo.InputWaitHandle; DPRINT("Console setup: %lx, %lx, %lx, %lx\n", Parameters->ConsoleHandle, @@ -403,9 +378,9 @@ if (ConsoleInitialized == TRUE) { ConsoleInitialized = FALSE; - RtlDeleteCriticalSection (&ConsoleLock); + RtlDeleteCriticalSection(&ConsoleLock); } - RtlDeleteCriticalSection (&BaseDllDirectoryLock); + RtlDeleteCriticalSection(&BaseDllDirectoryLock); } break; Modified: branches/ros-csrss/dll/win32/kernel32/client/proc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cl…
============================================================================== --- branches/ros-csrss/dll/win32/kernel32/client/proc.c [iso-8859-1] (original) +++ branches/ros-csrss/dll/win32/kernel32/client/proc.c [iso-8859-1] Tue Jan 1 23:36:19 2013 @@ -581,6 +581,16 @@ CreateProcessRequest->CreationFlags = dwCreationFlags; CreateProcessRequest->bInheritHandles = InheritHandles; + /* + * For GUI applications we turn on the 2nd bit. This also allows + * us to know whether or not the application is a GUI or CUI app. + */ + if (IMAGE_SUBSYSTEM_WINDOWS_GUI == SectionImageInfo->SubSystemType) + { + CreateProcessRequest->ProcessHandle = (HANDLE) + ((ULONG_PTR)CreateProcessRequest->ProcessHandle | 2); + } + /* Call CSR */ DPRINT1("Calling CsrClientCallServer from BasepCreateFirstThread...\n"); Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, @@ -937,18 +947,18 @@ ProcessParameters->StandardError = StartupInfo->hStdError; } - /* Use Special Flags for ConDllInitialize in Kernel32 */ + /* Use Special Flags for BasepInitConsole in Kernel32 */ if (CreationFlags & DETACHED_PROCESS) { ProcessParameters->ConsoleHandle = HANDLE_DETACHED_PROCESS; } + else if (CreationFlags & CREATE_NEW_CONSOLE) + { + ProcessParameters->ConsoleHandle = HANDLE_CREATE_NEW_CONSOLE; + } else if (CreationFlags & CREATE_NO_WINDOW) { ProcessParameters->ConsoleHandle = HANDLE_CREATE_NO_WINDOW; - } - else if (CreationFlags & CREATE_NEW_CONSOLE) - { - ProcessParameters->ConsoleHandle = HANDLE_CREATE_NEW_CONSOLE; } else { Modified: branches/ros-csrss/dll/win32/kernel32/include/kernel32.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/in…
============================================================================== --- branches/ros-csrss/dll/win32/kernel32/include/kernel32.h [iso-8859-1] (original) +++ branches/ros-csrss/dll/win32/kernel32/include/kernel32.h [iso-8859-1] Tue Jan 1 23:36:19 2013 @@ -186,6 +186,8 @@ NTAPI BaseDllInitializeMemoryManager(VOID); +VOID WINAPI InitConsoleCtrlHandling(VOID); + BOOL WINAPI VerifyConsoleIoHandle(HANDLE Handle); BOOL WINAPI CloseConsoleHandle(HANDLE Handle); Modified: branches/ros-csrss/include/reactos/subsys/win/conmsg.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/include/reactos/subsy…
============================================================================== --- branches/ros-csrss/include/reactos/subsys/win/conmsg.h [iso-8859-1] (original) +++ branches/ros-csrss/include/reactos/subsys/win/conmsg.h [iso-8859-1] Tue Jan 1 23:36:19 2013 @@ -114,7 +114,16 @@ typedef struct _CONSOLE_CONNECTION_INFO { - ULONG Dummy; + BOOL ConsoleNeeded; // Used for GUI apps only. + + /* Copied from CSRSS_ALLOC_CONSOLE */ + INT ShowCmd; + HANDLE Console; // ConsoleHandle // In fact, it is a PCSRSS_CONSOLE <-- correct that !! + HANDLE InputHandle; + HANDLE OutputHandle; + HANDLE ErrorHandle; + HANDLE InputWaitHandle; + LPTHREAD_START_ROUTINE CtrlDispatcher; } CONSOLE_CONNECTION_INFO, *PCONSOLE_CONNECTION_INFO; @@ -157,12 +166,13 @@ typedef struct { - LPTHREAD_START_ROUTINE CtrlDispatcher; - BOOL ConsoleNeeded; INT ShowCmd; - HANDLE Console; + HANDLE Console; // ConsoleHandle // In fact, it is a PCSRSS_CONSOLE <-- correct that !! HANDLE InputHandle; HANDLE OutputHandle; + HANDLE ErrorHandle; + HANDLE InputWaitHandle; + LPTHREAD_START_ROUTINE CtrlDispatcher; } CSRSS_ALLOC_CONSOLE, *PCSRSS_ALLOC_CONSOLE; typedef struct Modified: branches/ros-csrss/subsystems/win/basesrv/server.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/subsystems/win/basesr…
============================================================================== --- branches/ros-csrss/subsystems/win/basesrv/server.c [iso-8859-1] (original) +++ branches/ros-csrss/subsystems/win/basesrv/server.c [iso-8859-1] Tue Jan 1 23:36:19 2013 @@ -80,6 +80,11 @@ if (CreateProcessRequest->CreationFlags & CREATE_NEW_PROCESS_GROUP) { DebugFlags |= CsrProcessCreateNewGroup; + } + if ((Flags & 2) == 0) + { + DPRINT1("BaseSrvCreateProcess - Launching a Console process\n"); + DebugFlags |= CsrProcessIsConsoleApp; } /* FIXME: SxS Stuff */ @@ -129,8 +134,8 @@ if (!CurrentThread) { DPRINT1("Server Thread TID: [%lx.%lx]\n", - CreateThreadRequest->ClientId.UniqueProcess, - CreateThreadRequest->ClientId.UniqueThread); + CreateThreadRequest->ClientId.UniqueProcess, + CreateThreadRequest->ClientId.UniqueThread); return STATUS_SUCCESS; // server-to-server }
11 years, 11 months
1
0
0
0
[ekohl] 58095: [NETAPI32] NetUserGetLocalGroups: Replace the simulation by a working implementation.
by ekohl@svn.reactos.org
Author: ekohl Date: Tue Jan 1 22:54:39 2013 New Revision: 58095 URL:
http://svn.reactos.org/svn/reactos?rev=58095&view=rev
Log: [NETAPI32] NetUserGetLocalGroups: Replace the simulation by a working implementation. Modified: trunk/reactos/dll/win32/netapi32/user.c Modified: trunk/reactos/dll/win32/netapi32/user.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/user.c?…
============================================================================== --- trunk/reactos/dll/win32/netapi32/user.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/user.c [iso-8859-1] Tue Jan 1 22:54:39 2013 @@ -18,6 +18,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +/* + * TODO: + * Implement NetUserChangePassword + * Implement NetUserDel + * Implement NetUserGetGroups + * Implement NetUserSetGroups + * Implement NetUserSetInfo + * NetUserGetLocalGroups does not support LG_INCLUDE_INDIRECT yet. + * Add missing information levels. + * ... + */ + #include "netapi32.h" WINE_DEFAULT_DEBUG_CHANNEL(netapi32); @@ -104,6 +116,46 @@ return user; } return NULL; +} + + +static PSID +CreateSidFromSidAndRid(PSID SrcSid, + ULONG RelativeId) +{ + UCHAR RidCount; + PSID DstSid; + ULONG i; + ULONG DstSidSize; + PULONG p, q; + + RidCount = *RtlSubAuthorityCountSid(SrcSid); + if (RidCount >= 8) + return NULL; + + DstSidSize = RtlLengthRequiredSid(RidCount + 1); + + DstSid = RtlAllocateHeap(RtlGetProcessHeap(), + 0, + DstSidSize); + if (DstSid == NULL) + return NULL; + + RtlInitializeSid(DstSid, + RtlIdentifierAuthoritySid(SrcSid), + RidCount + 1); + + for (i = 0; i < (ULONG)RidCount; i++) + { + p = RtlSubAuthoritySid(SrcSid, i); + q = RtlSubAuthoritySid(DstSid, i); + *q = *p; + } + + q = RtlSubAuthoritySid(DstSid, (ULONG)RidCount); + *q = RelativeId; + + return DstSid; } @@ -544,7 +596,7 @@ NET_API_STATUS ApiStatus = NERR_Success; NTSTATUS Status = STATUS_SUCCESS; - FIXME("(%s, %d, %p, %p)\n", debugstr_w(servername), level, bufptr, parm_err); + TRACE("(%s, %d, %p, %p)\n", debugstr_w(servername), level, bufptr, parm_err); /* Check the info level */ if (level < 1 || level > 4) @@ -1097,53 +1149,298 @@ LPDWORD entriesread, LPDWORD totalentries) { - NET_API_STATUS status; - const WCHAR admins[] = {'A','d','m','i','n','i','s','t','r','a','t','o','r','s',0}; - LPWSTR currentuser; - LOCALGROUP_USERS_INFO_0* info; - DWORD size; - - FIXME("(%s, %s, %d, %08x, %p %d, %p, %p) stub!\n", + UNICODE_STRING ServerName; + UNICODE_STRING UserName; + SAM_HANDLE ServerHandle = NULL; + SAM_HANDLE BuiltinDomainHandle = NULL; + SAM_HANDLE AccountDomainHandle = NULL; + PSID AccountDomainSid = NULL; + PSID UserSid = NULL; + PULONG RelativeIds = NULL; + PSID_NAME_USE Use = NULL; + ULONG BuiltinMemberCount = 0; + ULONG AccountMemberCount = 0; + PULONG BuiltinAliases = NULL; + PULONG AccountAliases = NULL; + PUNICODE_STRING BuiltinNames = NULL; + PUNICODE_STRING AccountNames = NULL; + PLOCALGROUP_USERS_INFO_0 Buffer = NULL; + ULONG Size; + ULONG Count = 0; + ULONG Index; + ULONG i; + LPWSTR StrPtr; + NET_API_STATUS ApiStatus = NERR_Success; + NTSTATUS Status = STATUS_SUCCESS; + + TRACE("(%s, %s, %d, %08x, %p %d, %p, %p) stub!\n", debugstr_w(servername), debugstr_w(username), level, flags, bufptr, prefmaxlen, entriesread, totalentries); - status = NETAPI_ValidateServername(servername); - if (status != NERR_Success) - return status; - - size = UNLEN + 1; - NetApiBufferAllocate(size * sizeof(WCHAR), (LPVOID*)¤tuser); - GetUserNameW(currentuser, &size); - - if (lstrcmpiW(username, currentuser) && NETAPI_FindUser(username)) - { - NetApiBufferFree(currentuser); - return NERR_UserNotFound; - } - - NetApiBufferFree(currentuser); - *totalentries = 1; - size = sizeof(*info) + sizeof(admins); - - if(prefmaxlen < size) - status = ERROR_MORE_DATA; + if (level != 0) + return ERROR_INVALID_LEVEL; + + if (flags & ~LG_INCLUDE_INDIRECT) + return ERROR_INVALID_PARAMETER; + + if (flags & LG_INCLUDE_INDIRECT) + { + WARN("The flag LG_INCLUDE_INDIRECT is not supported yet!\n"); + } + + if (servername != NULL) + RtlInitUnicodeString(&ServerName, servername); + + RtlInitUnicodeString(&UserName, username); + + /* 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 | DOMAIN_GET_ALIAS_MEMBERSHIP, + &BuiltinDomainHandle); + if (!NT_SUCCESS(Status)) + { + ERR("OpenBuiltinDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Get the Account Domain SID */ + Status = GetAccountDomainSid((servername != NULL) ? &ServerName : NULL, + &AccountDomainSid); + if (!NT_SUCCESS(Status)) + { + ERR("GetAccountDomainSid failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Open the Account Domain */ + Status = SamOpenDomain(ServerHandle, + DOMAIN_LOOKUP | DOMAIN_GET_ALIAS_MEMBERSHIP, + AccountDomainSid, + &AccountDomainHandle); + if (!NT_SUCCESS(Status)) + { + ERR("OpenAccountDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Get the RID for the given user name */ + Status = SamLookupNamesInDomain(AccountDomainHandle, + 1, + &UserName, + &RelativeIds, + &Use); + if (!NT_SUCCESS(Status)) + { + ERR("SamLookupNamesInDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Fail, if it is not a user account */ + if (Use[0] != SidTypeUser) + { + ERR("Account is not a User!\n"); + ApiStatus = NERR_UserNotFound; + goto done; + } + + /* Build the User SID from the Account Domain SID and the users RID */ + UserSid = CreateSidFromSidAndRid(AccountDomainSid, + RelativeIds[0]); + if (UserSid == NULL) + { + ERR("CreateSidFromSidAndRid failed!\n"); + ApiStatus = ERROR_NOT_ENOUGH_MEMORY; + goto done; + } + + /* Get alias memberships in the Builtin Domain */ + Status = SamGetAliasMembership(BuiltinDomainHandle, + 1, + &UserSid, + &BuiltinMemberCount, + &BuiltinAliases); + if (!NT_SUCCESS(Status)) + { + ERR("SamGetAliasMembership failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + if (BuiltinMemberCount > 0) + { + /* Get the Names of the builtin alias members */ + Status = SamLookupIdsInDomain(BuiltinDomainHandle, + BuiltinMemberCount, + BuiltinAliases, + &BuiltinNames, + NULL); + if (!NT_SUCCESS(Status)) + { + ERR("SamLookupIdsInDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + } + + /* Get alias memberships in the Account Domain */ + Status = SamGetAliasMembership(AccountDomainHandle, + 1, + &UserSid, + &AccountMemberCount, + &AccountAliases); + if (!NT_SUCCESS(Status)) + { + ERR("SamGetAliasMembership failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + if (AccountMemberCount > 0) + { + /* Get the Names of the builtin alias members */ + Status = SamLookupIdsInDomain(AccountDomainHandle, + AccountMemberCount, + AccountAliases, + &AccountNames, + NULL); + if (!NT_SUCCESS(Status)) + { + ERR("SamLookupIdsInDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + } + + /* Calculate the required buffer size */ + Size = 0; + + for (i = 0; i < BuiltinMemberCount; i++) + { + if (BuiltinNames[i].Length > 0) + { + Size += (sizeof(LOCALGROUP_USERS_INFO_0) + BuiltinNames[i].Length + sizeof(UNICODE_NULL)); + Count++; + } + } + + for (i = 0; i < AccountMemberCount; i++) + { + if (BuiltinNames[i].Length > 0) + { + Size += (sizeof(LOCALGROUP_USERS_INFO_0) + AccountNames[i].Length + sizeof(UNICODE_NULL)); + Count++; + } + } + + if (Size == 0) + { + ApiStatus = NERR_Success; + goto done; + } + + /* Allocate buffer */ + ApiStatus = NetApiBufferAllocate(Size, (LPVOID*)&Buffer); + if (ApiStatus != NERR_Success) + goto done; + + ZeroMemory(Buffer, Size); + + StrPtr = (LPWSTR)((INT_PTR)Buffer + Count * sizeof(LOCALGROUP_USERS_INFO_0)); + + /* Copy data to the allocated buffer */ + Index = 0; + for (i = 0; i < BuiltinMemberCount; i++) + { + if (BuiltinNames[i].Length > 0) + { + CopyMemory(StrPtr, + BuiltinNames[i].Buffer, + BuiltinNames[i].Length); + Buffer[Index].lgrui0_name = StrPtr; + + StrPtr = (LPWSTR)((INT_PTR)StrPtr + BuiltinNames[i].Length + sizeof(UNICODE_NULL)); + Index++; + } + } + + for (i = 0; i < AccountMemberCount; i++) + { + if (AccountNames[i].Length > 0) + { + CopyMemory(StrPtr, + AccountNames[i].Buffer, + AccountNames[i].Length); + Buffer[Index].lgrui0_name = StrPtr; + + StrPtr = (LPWSTR)((INT_PTR)StrPtr + AccountNames[i].Length + sizeof(UNICODE_NULL)); + Index++; + } + } + +done: + if (AccountNames != NULL) + SamFreeMemory(AccountNames); + + if (BuiltinNames != NULL) + SamFreeMemory(BuiltinNames); + + if (AccountAliases != NULL) + SamFreeMemory(AccountAliases); + + if (BuiltinAliases != NULL) + SamFreeMemory(BuiltinAliases); + + if (RelativeIds != NULL) + SamFreeMemory(RelativeIds); + + if (Use != NULL) + SamFreeMemory(Use); + + if (UserSid != NULL) + RtlFreeHeap(RtlGetProcessHeap(), 0, UserSid); + + if (AccountDomainSid != NULL) + RtlFreeHeap(RtlGetProcessHeap(), 0, AccountDomainSid); + + if (AccountDomainHandle != NULL) + SamCloseHandle(AccountDomainHandle); + + if (BuiltinDomainHandle != NULL) + SamCloseHandle(BuiltinDomainHandle); + + if (ServerHandle != NULL) + SamCloseHandle(ServerHandle); + + if (ApiStatus != NERR_Success && ApiStatus != ERROR_MORE_DATA) + { + *entriesread = 0; + *totalentries = 0; + } else - status = NetApiBufferAllocate(size, (LPVOID*)&info); - - if(status != NERR_Success) - { - *bufptr = NULL; - *entriesread = 0; - return status; - } - - info->lgrui0_name = (LPWSTR)((LPBYTE)info + sizeof(*info)); - lstrcpyW(info->lgrui0_name, admins); - - *bufptr = (LPBYTE)info; - *entriesread = 1; - - return NERR_Success; + { + *entriesread = Count; + *totalentries = Count; + } + + *bufptr = (LPBYTE)Buffer; + + return ApiStatus; }
11 years, 11 months
1
0
0
0
[ekohl] 58094: [SAMSRV] SamrGetAliasMembership: - Change requrred access right from DOMIN_LOOKUP to DOMAIN_GET_ALIAS_MEMBERSHIP. - Handle the case properly where a user is not a member of any alias...
by ekohl@svn.reactos.org
Author: ekohl Date: Tue Jan 1 22:04:41 2013 New Revision: 58094 URL:
http://svn.reactos.org/svn/reactos?rev=58094&view=rev
Log: [SAMSRV] SamrGetAliasMembership: - Change requrred access right from DOMIN_LOOKUP to DOMAIN_GET_ALIAS_MEMBERSHIP. - Handle the case properly where a user is not a member of any alias. - Retrieve an alias members RID correctly. Modified: trunk/reactos/dll/win32/samsrv/samrpc.c Modified: trunk/reactos/dll/win32/samsrv/samrpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/samrpc.c?…
============================================================================== --- trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] Tue Jan 1 22:04:41 2013 @@ -2877,6 +2877,7 @@ ULONG DataLength; ULONG i, j; NTSTATUS Status; + WCHAR NameBuffer[9]; TRACE("SamrGetAliasMembership(%p %p %p)\n", DomainHandle, SidArray, Membership); @@ -2884,7 +2885,7 @@ /* Validate the domain handle */ Status = SampValidateDbObject(DomainHandle, SamDbDomainObject, - DOMAIN_LOOKUP, + DOMAIN_GET_ALIAS_MEMBERSHIP, &DomainObject); if (!NT_SUCCESS(Status)) return Status; @@ -2902,6 +2903,13 @@ KEY_READ, &MembersKeyHandle); TRACE("SampRegOpenKey returned %08lX\n", Status); + + if (Status == STATUS_OBJECT_NAME_NOT_FOUND) + { + Status = STATUS_SUCCESS; + goto done; + } + if (!NT_SUCCESS(Status)) goto done; @@ -2926,11 +2934,19 @@ MaxSidCount += ValueCount; } - NtClose(MemberKeyHandle); } + if (Status == STATUS_OBJECT_NAME_NOT_FOUND) + Status = STATUS_SUCCESS; + LocalFree(MemberSidString); + } + + if (MaxSidCount == 0) + { + Status = STATUS_SUCCESS; + goto done; } TRACE("Maximum sid count: %lu\n", MaxSidCount); @@ -2962,14 +2978,18 @@ for (j = 0; j < ValueCount; j++) { - DataLength = sizeof(ULONG); + DataLength = 9 * sizeof(WCHAR); Status = SampRegEnumerateValue(MemberKeyHandle, j, - NULL, - NULL, - NULL, - (PVOID)&RidArray[j], - &DataLength); + NameBuffer, + &DataLength, + NULL, + NULL, + NULL); + if (NT_SUCCESS(Status)) + { + RidArray[j] = wcstoul(NameBuffer, NULL, 16); + } } } @@ -2978,7 +2998,6 @@ LocalFree(MemberSidString); } - done: if (NT_SUCCESS(Status))
11 years, 11 months
1
0
0
0
[ekohl] 58093: [SAMLIB] Ensure that optional parameters are handled properly.
by ekohl@svn.reactos.org
Author: ekohl Date: Tue Jan 1 21:12:38 2013 New Revision: 58093 URL:
http://svn.reactos.org/svn/reactos?rev=58093&view=rev
Log: [SAMLIB] Ensure that optional parameters are handled properly. Modified: trunk/reactos/dll/win32/samlib/samlib.c trunk/reactos/include/ddk/ntsam.h Modified: trunk/reactos/dll/win32/samlib/samlib.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samlib/samlib.c?…
============================================================================== --- trunk/reactos/dll/win32/samlib/samlib.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samlib/samlib.c [iso-8859-1] Tue Jan 1 21:12:38 2013 @@ -212,7 +212,7 @@ NTSTATUS NTAPI -SamConnect(IN OUT PUNICODE_STRING ServerName, +SamConnect(IN OUT PUNICODE_STRING ServerName OPTIONAL, OUT PSAM_HANDLE ServerHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes) @@ -682,7 +682,7 @@ SAMPR_ULONG_ARRAY Membership; NTSTATUS Status; - TRACE("SamAliasMembership(%p %ul %p %p %p)\n", + TRACE("SamAliasMembership(%p %lu %p %p %p)\n", DomainHandle, PassedCount, Sids, MembershipCount, Aliases); if (Sids == NULL || @@ -905,7 +905,7 @@ IN ULONG Count, IN PULONG RelativeIds, OUT PUNICODE_STRING *Names, - OUT PSID_NAME_USE *Use) + OUT PSID_NAME_USE *Use OPTIONAL) { SAMPR_RETURNED_USTRING_ARRAY NamesBuffer = {0, NULL}; SAMPR_ULONG_ARRAY UseBuffer = {0, NULL}; @@ -916,7 +916,9 @@ DomainHandle, Count, RelativeIds, Names, Use); *Names = NULL; - *Use = NULL; + + if (Use != NULL) + *Use = NULL; RpcTryExcept { @@ -951,13 +953,6 @@ } } - *Use = midl_user_allocate(Count * sizeof(SID_NAME_USE)); - if (*Use == NULL) - { - Status = STATUS_INSUFFICIENT_RESOURCES; - goto done; - } - for (i = 0; i < Count; i++) { (*Names)[i].Length = NamesBuffer.Element[i].Length; @@ -968,9 +963,19 @@ NamesBuffer.Element[i].Length); } - RtlCopyMemory(*Use, - UseBuffer.Element, - Count * sizeof(SID_NAME_USE)); + if (Use != NULL) + { + *Use = midl_user_allocate(Count * sizeof(SID_NAME_USE)); + if (*Use == NULL) + { + Status = STATUS_INSUFFICIENT_RESOURCES; + goto done; + } + + RtlCopyMemory(*Use, + UseBuffer.Element, + Count * sizeof(SID_NAME_USE)); + } } done: @@ -987,7 +992,7 @@ midl_user_free(*Names); } - if (*Use != NULL) + if (Use != NULL && *Use != NULL) midl_user_free(*Use); } Modified: trunk/reactos/include/ddk/ntsam.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntsam.h?rev=58…
============================================================================== --- trunk/reactos/include/ddk/ntsam.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/ntsam.h [iso-8859-1] Tue Jan 1 21:12:38 2013 @@ -623,7 +623,7 @@ NTSTATUS NTAPI -SamConnect(IN OUT PUNICODE_STRING ServerName, +SamConnect(IN OUT PUNICODE_STRING ServerName OPTIONAL, OUT PSAM_HANDLE ServerHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes); @@ -755,7 +755,7 @@ IN ULONG Count, IN PULONG RelativeIds, OUT PUNICODE_STRING *Names, - OUT PSID_NAME_USE *Use); + OUT PSID_NAME_USE *Use OPTIONAL); NTSTATUS NTAPI
11 years, 11 months
1
0
0
0
[hbelusca] 58092: [SHELL32] Fix untitled Run dialog in some languages. I wonder why it was as it since ages, in some languages but not in anothers.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Jan 1 19:49:55 2013 New Revision: 58092 URL:
http://svn.reactos.org/svn/reactos?rev=58092&view=rev
Log: [SHELL32] Fix untitled Run dialog in some languages. I wonder why it was as it since ages, in some languages but not in anothers. Modified: trunk/reactos/dll/win32/shell32/lang/bg-BG.rc trunk/reactos/dll/win32/shell32/lang/ca-ES.rc trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc trunk/reactos/dll/win32/shell32/lang/el-GR.rc trunk/reactos/dll/win32/shell32/lang/fi-FI.rc trunk/reactos/dll/win32/shell32/lang/fr-FR.rc trunk/reactos/dll/win32/shell32/lang/hu-HU.rc trunk/reactos/dll/win32/shell32/lang/it-IT.rc trunk/reactos/dll/win32/shell32/lang/ja-JP.rc trunk/reactos/dll/win32/shell32/lang/ko-KR.rc trunk/reactos/dll/win32/shell32/lang/nl-NL.rc trunk/reactos/dll/win32/shell32/lang/pl-PL.rc trunk/reactos/dll/win32/shell32/lang/pt-BR.rc trunk/reactos/dll/win32/shell32/lang/pt-PT.rc trunk/reactos/dll/win32/shell32/lang/ru-RU.rc trunk/reactos/dll/win32/shell32/lang/sl-SI.rc trunk/reactos/dll/win32/shell32/lang/sv-SE.rc trunk/reactos/dll/win32/shell32/lang/zh-CN.rc trunk/reactos/dll/win32/shell32/lang/zh-TW.rc Modified: trunk/reactos/dll/win32/shell32/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/bg-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/bg-BG.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/bg-BG.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -155,7 +155,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/ca-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ca-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/ca-ES.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/ca-ES.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -155,7 +155,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/cs-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -143,7 +143,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/el-GR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/el-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/el-GR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/el-GR.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -155,7 +155,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/fi-FI.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/fi-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/fi-FI.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/fi-FI.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -155,7 +155,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/fr-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/fr-FR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/fr-FR.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -159,7 +159,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Exécuter" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/hu-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/hu-HU.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/hu-HU.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -158,7 +158,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/it-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/it-IT.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/it-IT.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -156,7 +156,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ja-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/ja-JP.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/ja-JP.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -155,7 +155,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 9, "MS UI Gothic" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/ko-KR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ko-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/ko-KR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/ko-KR.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -155,7 +155,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/nl-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/nl-NL.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/nl-NL.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -155,7 +155,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pl-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/pl-PL.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -163,7 +163,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/pt-BR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pt-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/pt-BR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/pt-BR.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -158,7 +158,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/pt-PT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pt-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/pt-PT.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/pt-PT.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -158,7 +158,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ru-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/ru-RU.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -155,7 +155,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/sl-SI.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sl-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/sl-SI.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/sl-SI.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -155,7 +155,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/sv-SE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sv-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/sv-SE.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/sv-SE.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -155,7 +155,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/zh-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/zh-CN.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/zh-CN.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -146,7 +146,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE Modified: trunk/reactos/dll/win32/shell32/lang/zh-TW.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/zh-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/zh-TW.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/zh-TW.rc [iso-8859-1] Tue Jan 1 19:49:55 2013 @@ -145,7 +145,7 @@ IDD_RUN DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Run" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE
11 years, 11 months
1
0
0
0
[tkreuzer] 58091: [WIN32K] Partly revert r57691. Fixes messed up icons in 32bpp.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Jan 1 19:41:20 2013 New Revision: 58091 URL:
http://svn.reactos.org/svn/reactos?rev=58091&view=rev
Log: [WIN32K] Partly revert r57691. Fixes messed up icons in 32bpp. Modified: trunk/reactos/win32ss/gdi/ntgdi/dib.h trunk/reactos/win32ss/gdi/ntgdi/dibobj.c trunk/reactos/win32ss/user/ntuser/clipboard.c trunk/reactos/win32ss/user/ntuser/misc/file.c Modified: trunk/reactos/win32ss/gdi/ntgdi/dib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dib.h?re…
============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/dib.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/dib.h [iso-8859-1] Tue Jan 1 19:41:20 2013 @@ -7,11 +7,8 @@ INT APIENTRY DIB_GetDIBImageBytes (INT width, INT height, INT depth); HPALETTE FASTCALL DIB_MapPaletteColors(PPALETTE ppal, CONST BITMAPINFO* lpbmi); HPALETTE FASTCALL BuildDIBPalette (CONST BITMAPINFO *bmi); - -/* Those functions permit to tranparently work with a BITMAPCOREINFO structure */ BITMAPINFO* FASTCALL DIB_ConvertBitmapInfo(CONST BITMAPINFO* bmi, DWORD Usage); -/* Pass Usage = -1 if you don't want to convert the BITMAPINFO back to BITMAPCOREINFO */ -VOID FASTCALL DIB_FreeConvertedBitmapInfo(BITMAPINFO* converted, BITMAPINFO* orig, DWORD Usage); +VOID FASTCALL DIB_FreeConvertedBitmapInfo(BITMAPINFO* converted, BITMAPINFO* orig); INT APIENTRY Modified: trunk/reactos/win32ss/gdi/ntgdi/dibobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dibobj.c…
============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/dibobj.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/dibobj.c [iso-8859-1] Tue Jan 1 19:41:20 2013 @@ -584,6 +584,7 @@ DWORD compr, size ; USHORT i; int bitmap_type; + RGBTRIPLE* rgbTriples; RGBQUAD* rgbQuads; VOID* colorPtr; @@ -593,6 +594,7 @@ return 0; colorPtr = (LPBYTE)Info + Info->bmiHeader.biSize; + rgbTriples = colorPtr; rgbQuads = colorPtr; bitmap_type = DIB_GetBitmapInfo(&Info->bmiHeader, @@ -641,6 +643,15 @@ switch(bpp) { case 0: /* Only info */ + if(pbmci) + { + pbmci->bmciHeader.bcWidth = (WORD)psurf->SurfObj.sizlBitmap.cx; + pbmci->bmciHeader.bcHeight = (WORD)((psurf->SurfObj.fjBitmap & BMF_TOPDOWN) ? + -psurf->SurfObj.sizlBitmap.cy : + psurf->SurfObj.sizlBitmap.cy); + pbmci->bmciHeader.bcPlanes = 1; + pbmci->bmciHeader.bcBitCount = BitsPerFormat(psurf->SurfObj.iBitmapFormat); + } Info->bmiHeader.biWidth = psurf->SurfObj.sizlBitmap.cx; Info->bmiHeader.biHeight = (psurf->SurfObj.fjBitmap & BMF_TOPDOWN) ? -psurf->SurfObj.sizlBitmap.cy : @@ -691,6 +702,16 @@ if(Usage == DIB_RGB_COLORS) { ULONG colors = min(psurf->ppal->NumColors, 256); + + if(pbmci) + { + for(i = 0; i < colors; i++) + { + rgbTriples[i].rgbtRed = psurf->ppal->IndexedColors[i].peRed; + rgbTriples[i].rgbtGreen = psurf->ppal->IndexedColors[i].peGreen; + rgbTriples[i].rgbtBlue = psurf->ppal->IndexedColors[i].peBlue; + } + } if(colors != 256) Info->bmiHeader.biClrUsed = colors; for(i = 0; i < colors; i++) { @@ -703,7 +724,10 @@ else { for(i = 0; i < 256; i++) + { + if(pbmci) ((WORD*)rgbTriples)[i] = i; ((WORD*)rgbQuads)[i] = i; + } } } else @@ -712,6 +736,7 @@ { for(i = 0; i < 256; i++) { + if(pbmci) ((WORD*)rgbTriples)[i] = i; ((WORD*)rgbQuads)[i] = i; } } @@ -728,6 +753,13 @@ } for (i = 0; i < pDcPal->NumColors; i++) { + if (pbmci) + { + rgbTriples[i].rgbtRed = pDcPal->IndexedColors[i].peRed; + rgbTriples[i].rgbtGreen = pDcPal->IndexedColors[i].peGreen; + rgbTriples[i].rgbtBlue = pDcPal->IndexedColors[i].peBlue; + } + rgbQuads[i].rgbRed = pDcPal->IndexedColors[i].peRed; rgbQuads[i].rgbGreen = pDcPal->IndexedColors[i].peGreen; rgbQuads[i].rgbBlue = pDcPal->IndexedColors[i].peBlue; @@ -740,20 +772,55 @@ switch (bpp) { case 1: - rgbQuads[0].rgbRed = rgbQuads[0].rgbGreen = rgbQuads[0].rgbBlue = 0; + if (pbmci) + { + rgbTriples[0].rgbtRed = rgbTriples[0].rgbtGreen = + rgbTriples[0].rgbtBlue = 0; + rgbTriples[1].rgbtRed = rgbTriples[1].rgbtGreen = + rgbTriples[1].rgbtBlue = 0xff; + } + rgbQuads[0].rgbRed = rgbQuads[0].rgbGreen = + rgbQuads[0].rgbBlue = 0; rgbQuads[0].rgbReserved = 0; - rgbQuads[1].rgbRed = rgbQuads[1].rgbGreen = rgbQuads[1].rgbBlue = 0xff; + rgbQuads[1].rgbRed = rgbQuads[1].rgbGreen = + rgbQuads[1].rgbBlue = 0xff; rgbQuads[1].rgbReserved = 0; break; case 4: + if (pbmci) + RtlCopyMemory(rgbTriples, EGAColorsTriples, sizeof(EGAColorsTriples)); RtlCopyMemory(rgbQuads, EGAColorsQuads, sizeof(EGAColorsQuads)); + break; case 8: { INT r, g, b; RGBQUAD *color; + if (pbmci) + { + RGBTRIPLE *colorTriple; + + RtlCopyMemory(rgbTriples, DefLogPaletteTriples, + 10 * sizeof(RGBTRIPLE)); + RtlCopyMemory(rgbTriples + 246, DefLogPaletteTriples + 10, + 10 * sizeof(RGBTRIPLE)); + colorTriple = rgbTriples + 10; + for(r = 0; r <= 5; r++) /* FIXME */ + { + for(g = 0; g <= 5; g++) + { + for(b = 0; b <= 5; b++) + { + colorTriple->rgbtRed = (r * 0xff) / 5; + colorTriple->rgbtGreen = (g * 0xff) / 5; + colorTriple->rgbtBlue = (b * 0xff) / 5; + colorTriple++; + } + } + } + } memcpy(rgbQuads, DefLogPaletteQuads, 10 * sizeof(RGBQUAD)); memcpy(rgbQuads + 246, DefLogPaletteQuads + 10, @@ -870,6 +937,11 @@ RECTL_vSetRect(&rcDest, 0, 0, ScanLines, psurf->SurfObj.sizlBitmap.cx); + rcDest.left = 0; + rcDest.top = 0; + rcDest.bottom = ScanLines; + rcDest.right = psurf->SurfObj.sizlBitmap.cx; + srcPoint.x = 0; if(height < 0) @@ -918,7 +990,7 @@ if(pDC) DC_UnlockDc(pDC); if(psurf) SURFACE_ShareUnlockSurface(psurf); - if(pbmci) DIB_FreeConvertedBitmapInfo(Info, (BITMAPINFO*)pbmci, Usage); + if(pbmci) DIB_FreeConvertedBitmapInfo(Info, (BITMAPINFO*)pbmci); return ScanLines; } @@ -1857,51 +1929,10 @@ /* Frees a BITMAPINFO created with DIB_ConvertBitmapInfo */ VOID FASTCALL -DIB_FreeConvertedBitmapInfo(BITMAPINFO* converted, BITMAPINFO* orig, DWORD usage) -{ - BITMAPCOREINFO* pbmci; - if(converted == orig) - return; - - if(usage == -1) - { - /* Caller don't want any conversion */ +DIB_FreeConvertedBitmapInfo(BITMAPINFO* converted, BITMAPINFO* orig) +{ + if(converted != orig) ExFreePoolWithTag(converted, TAG_DIB); - return; - } - - /* Perform inverse conversion */ - pbmci = (BITMAPCOREINFO*)orig; - - ASSERT(pbmci->bmciHeader.bcSize == sizeof(BITMAPCOREHEADER)); - pbmci->bmciHeader.bcBitCount = converted->bmiHeader.biBitCount; - pbmci->bmciHeader.bcWidth = converted->bmiHeader.biWidth; - pbmci->bmciHeader.bcHeight = converted->bmiHeader.biHeight; - pbmci->bmciHeader.bcPlanes = converted->bmiHeader.biPlanes; - - if(pbmci->bmciHeader.bcBitCount <= 8) - { - UINT numColors = converted->bmiHeader.biClrUsed; - if(!numColors) numColors = 1 << pbmci->bmciHeader.bcBitCount; - if(usage == DIB_PAL_COLORS) - { - RtlZeroMemory(pbmci->bmciColors, (1 << pbmci->bmciHeader.bcBitCount) * sizeof(WORD)); - RtlCopyMemory(pbmci->bmciColors, converted->bmiColors, numColors * sizeof(WORD)); - } - else - { - UINT i; - RtlZeroMemory(pbmci->bmciColors, (1 << pbmci->bmciHeader.bcBitCount) * sizeof(RGBTRIPLE)); - for(i=0; i<numColors; i++) - { - pbmci->bmciColors[i].rgbtRed = converted->bmiColors[i].rgbRed; - pbmci->bmciColors[i].rgbtGreen = converted->bmiColors[i].rgbGreen; - pbmci->bmciColors[i].rgbtBlue = converted->bmiColors[i].rgbBlue; - } - } - } - /* Now free it, it's not needed anymore */ - ExFreePoolWithTag(converted, TAG_DIB); } /* EOF */ Modified: trunk/reactos/win32ss/user/ntuser/clipboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/clipbo…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/clipboard.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/clipboard.c [iso-8859-1] Tue Jan 1 19:41:20 2013 @@ -276,7 +276,7 @@ UserReleaseDC(NULL, hdc, FALSE); if (pConvertedBmi) - DIB_FreeConvertedBitmapInfo(pConvertedBmi, pBmi, -1); + DIB_FreeConvertedBitmapInfo(pConvertedBmi, pBmi); } VOID static NTAPI Modified: trunk/reactos/win32ss/user/ntuser/misc/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/misc/f…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/misc/file.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/misc/file.c [iso-8859-1] Tue Jan 1 19:41:20 2013 @@ -233,7 +233,7 @@ 0); NtGdiDeleteObjectApp(hdc); - DIB_FreeConvertedBitmapInfo(pConvertedInfo, pbmi, -1); + DIB_FreeConvertedBitmapInfo(pConvertedInfo, pbmi); } else {
11 years, 11 months
1
0
0
0
[hbelusca] 58090: [REGEDIT] - Revert lstrcpynW --> wcsncpy changes from r57471 back to lstrcpynW because this function automatically NULL-terminate strings (but I wonder if there is a replacement o...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Jan 1 19:38:47 2013 New Revision: 58090 URL:
http://svn.reactos.org/svn/reactos?rev=58090&view=rev
Log: [REGEDIT] - Revert lstrcpynW --> wcsncpy changes from r57471 back to lstrcpynW because this function automatically NULL-terminate strings (but I wonder if there is a replacement of lstrcpynW which has all its functionalities, in the CRT). This fixes address loading after editing it in the address bar. Caught by Edijus ;) - Unicodize a little bit more regedit. Modified: trunk/reactos/base/applications/regedit/childwnd.c trunk/reactos/base/applications/regedit/edit.c trunk/reactos/base/applications/regedit/find.c trunk/reactos/base/applications/regedit/framewnd.c trunk/reactos/base/applications/regedit/listview.c trunk/reactos/base/applications/regedit/treeview.c Modified: trunk/reactos/base/applications/regedit/childwnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
============================================================================== --- trunk/reactos/base/applications/regedit/childwnd.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/childwnd.c [iso-8859-1] Tue Jan 1 19:38:47 2013 @@ -236,16 +236,16 @@ { /* Sanity check this key; it cannot be empty, nor can it be a * loop back */ - if ((szBuffer[0] != L'\0') && wcsicmp(szBuffer, pszKeyPath)) + if ((szBuffer[0] != L'\0') && _wcsicmp(szBuffer, pszKeyPath)) { if (RegOpenKeyW(hRootKey, szBuffer, &hOtherKey) == ERROR_SUCCESS) { - wcsncpy(pszSuggestions, L"HKCR\\", (int) iSuggestionsLength); + lstrcpynW(pszSuggestions, L"HKCR\\", (int) iSuggestionsLength); i = wcslen(pszSuggestions); pszSuggestions += i; iSuggestionsLength -= i; - wcsncpy(pszSuggestions, szBuffer, (int) iSuggestionsLength); + lstrcpynW(pszSuggestions, szBuffer, (int) iSuggestionsLength); i = MIN(wcslen(pszSuggestions) + 1, iSuggestionsLength); pszSuggestions += i; iSuggestionsLength -= i; @@ -266,12 +266,12 @@ if (QueryStringValue(hSubKey, L"CLSID", NULL, szBuffer, COUNT_OF(szBuffer)) == ERROR_SUCCESS) { - wcsncpy(pszSuggestions, L"HKCR\\CLSID\\", (int)iSuggestionsLength); + lstrcpynW(pszSuggestions, L"HKCR\\CLSID\\", (int)iSuggestionsLength); i = wcslen(pszSuggestions); pszSuggestions += i; iSuggestionsLength -= i; - wcsncpy(pszSuggestions, szBuffer, (int)iSuggestionsLength); + lstrcpynW(pszSuggestions, szBuffer, (int)iSuggestionsLength); i = MIN(wcslen(pszSuggestions) + 1, iSuggestionsLength); pszSuggestions += i; iSuggestionsLength -= i; @@ -286,7 +286,7 @@ { WNDPROC oldwndproc; static WCHAR s_szNode[256]; - oldwndproc = (WNDPROC)(LONG_PTR)GetWindowLongPtr(hwnd, GWL_USERDATA); + oldwndproc = (WNDPROC)(LONG_PTR)GetWindowLongPtr(hwnd, GWLP_USERDATA); switch (uMsg) { @@ -300,7 +300,7 @@ default: break; } - return CallWindowProc(oldwndproc, hwnd, uMsg, wParam, lParam); + return CallWindowProcW(oldwndproc, hwnd, uMsg, wParam, lParam); } static VOID @@ -333,8 +333,8 @@ EnableMenuItem(GetSubMenu(hMenuFrame,0), ID_REGISTRY_LOADHIVE, MF_BYCOMMAND | MF_GRAYED); EnableMenuItem(GetSubMenu(hMenuFrame,0), ID_REGISTRY_UNLOADHIVE, MF_BYCOMMAND | MF_GRAYED); /* compare the strings to see if we should enable/disable the "Load Hive" menus accordingly */ - if (!(wcsicmp(rootName, L"HKEY_LOCAL_MACHINE") && - wcsicmp(rootName, L"HKEY_USERS"))) + if (!(_wcsicmp(rootName, L"HKEY_LOCAL_MACHINE") && + _wcsicmp(rootName, L"HKEY_USERS"))) { /* * enable the unload menu item if at the root, otherwise @@ -406,9 +406,9 @@ 0); } /* Subclass the AddressBar */ - oldproc = (WNDPROC)(LONG_PTR)GetWindowLongPtr(g_pChildWnd->hAddressBarWnd, GWL_WNDPROC); - SetWindowLongPtr(g_pChildWnd->hAddressBarWnd, GWL_USERDATA, (DWORD_PTR)oldproc); - SetWindowLongPtr(g_pChildWnd->hAddressBarWnd, GWL_WNDPROC, (DWORD_PTR)AddressBarProc); + oldproc = (WNDPROC)(LONG_PTR)GetWindowLongPtr(g_pChildWnd->hAddressBarWnd, GWLP_WNDPROC); + SetWindowLongPtr(g_pChildWnd->hAddressBarWnd, GWLP_USERDATA, (DWORD_PTR)oldproc); + SetWindowLongPtr(g_pChildWnd->hAddressBarWnd, GWLP_WNDPROC, (DWORD_PTR)AddressBarProc); break; } case WM_COMMAND: @@ -660,8 +660,8 @@ { TVHITTESTINFO hti; HMENU hContextMenu; - TVITEM item; - MENUITEMINFO mii; + TVITEMW item; + MENUITEMINFOW mii; WCHAR resource[256]; WCHAR buffer[256]; LPWSTR s; Modified: trunk/reactos/base/applications/regedit/edit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
============================================================================== --- trunk/reactos/base/applications/regedit/edit.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/edit.c [iso-8859-1] Tue Jan 1 19:38:47 2013 @@ -230,7 +230,7 @@ { WNDPROC oldwndproc; - oldwndproc = (WNDPROC)(LONG_PTR)GetWindowLongPtr(hwnd, GWL_USERDATA); + oldwndproc = (WNDPROC)(LONG_PTR)GetWindowLongPtr(hwnd, GWLP_USERDATA); switch (uMsg) { @@ -263,7 +263,7 @@ } } - return CallWindowProc(oldwndproc, hwnd, uMsg, wParam, lParam); + return CallWindowProcW(oldwndproc, hwnd, uMsg, wParam, lParam); } @@ -285,9 +285,9 @@ /* subclass the edit control */ hwndValue = GetDlgItem(hwndDlg, IDC_VALUE_DATA); - oldproc = (WNDPROC)(LONG_PTR)GetWindowLongPtr(hwndValue, GWL_WNDPROC); - SetWindowLongPtr(hwndValue, GWL_USERDATA, (DWORD_PTR)oldproc); - SetWindowLongPtr(hwndValue, GWL_WNDPROC, (DWORD_PTR)DwordEditSubclassProc); + oldproc = (WNDPROC)(LONG_PTR)GetWindowLongPtr(hwndValue, GWLP_WNDPROC); + SetWindowLongPtr(hwndValue, GWLP_USERDATA, (DWORD_PTR)oldproc); + SetWindowLongPtr(hwndValue, GWLP_WNDPROC, (DWORD_PTR)DwordEditSubclassProc); if (editValueName && wcscmp(editValueName, L"")) { @@ -665,7 +665,7 @@ HWND hwndLV; WCHAR buffer[80]; - LVITEM item; + LVITEMW item; INT iItem; pFullDescriptor = &resourceValueData->List[fullResourceIndex]; @@ -866,7 +866,7 @@ if (lpnmlv->iItem != -1) { PCM_PARTIAL_RESOURCE_DESCRIPTOR pDescriptor; - LVITEM item; + LVITEMW item; item.mask = LVIF_PARAM; item.iItem = lpnmlv->iItem; @@ -968,7 +968,7 @@ { PCM_FULL_RESOURCE_DESCRIPTOR pFullDescriptor; WCHAR buffer[80]; - LVITEM item; + LVITEMW item; ULONG i; INT iItem; Modified: trunk/reactos/base/applications/regedit/find.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
============================================================================== --- trunk/reactos/base/applications/regedit/find.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/find.c [iso-8859-1] Tue Jan 1 19:38:47 2013 @@ -77,7 +77,7 @@ if (s_dwFlags & RSF_MATCHCASE) return wcscmp(pszName1, pszName2) == 0; else - return wcsicmp(pszName1, pszName2) == 0; + return _wcsicmp(pszName1, pszName2) == 0; } else { @@ -130,7 +130,7 @@ { const LPCWSTR *a = (const LPCWSTR *)x; const LPCWSTR *b = (const LPCWSTR *)y; - return wcsicmp(*a, *b); + return _wcsicmp(*a, *b); } BOOL RegFindRecurse( @@ -198,7 +198,7 @@ if (DoEvents()) goto err; - if (!fPast && wcsicmp(ppszNames[i], pszValueName) == 0) + if (!fPast && _wcsicmp(ppszNames[i], pszValueName) == 0) { fPast = TRUE; continue; @@ -390,7 +390,7 @@ } else { - wcsncpy(szKeyName, pch + 1, MAX_PATH); + lstrcpynW(szKeyName, pch + 1, MAX_PATH); *pch = 0; lResult = RegOpenKeyExW(hBaseKey, szSubKey, 0, KEY_ALL_ACCESS, &hSubKey); @@ -434,7 +434,7 @@ if (DoEvents()) goto err; - if (!fPast && wcsicmp(ppszNames[i], szKeyName) == 0) + if (!fPast && _wcsicmp(ppszNames[i], szKeyName) == 0) { fPast = TRUE; continue; Modified: trunk/reactos/base/applications/regedit/framewnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
============================================================================== --- trunk/reactos/base/applications/regedit/framewnd.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/framewnd.c [iso-8859-1] Tue Jan 1 19:38:47 2013 @@ -453,7 +453,7 @@ { /* Look at the extension of the file to determine its type */ if (ofn.nFileExtension >= 1 && - wcsicmp(ofn.lpstrFile + ofn.nFileExtension, L"reg") == 0) /* REGEDIT4 or Windows Registry Editor Version 5.00 */ + _wcsicmp(ofn.lpstrFile + ofn.nFileExtension, L"reg") == 0) /* REGEDIT4 or Windows Registry Editor Version 5.00 */ { /* Open the file */ FILE* fp = _wfopen(ofn.lpstrFile, L"r"); @@ -1249,7 +1249,7 @@ if ((LOWORD(wParam) >= ID_FAVORITES_MIN) && (LOWORD(wParam) <= ID_FAVORITES_MAX)) { HMENU hMenu; - MENUITEMINFO mii; + MENUITEMINFOW mii; WCHAR szFavorite[512]; hMenu = GetSubMenu(GetMenu(hWnd), FAVORITES_MENU_POSITION); Modified: trunk/reactos/base/applications/regedit/listview.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
============================================================================== --- trunk/reactos/base/applications/regedit/listview.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/listview.c [iso-8859-1] Tue Jan 1 19:38:47 2013 @@ -56,7 +56,7 @@ LPCWSTR GetValueName(HWND hwndLV, int iStartAt) { int item; - LVITEM LVItem; + LVITEMW LVItem; PLINE_INFO lineinfo; /* @@ -108,7 +108,7 @@ BOOL IsDefaultValue(HWND hwndLV, int i) { PLINE_INFO lineinfo; - LVITEM Item; + LVITEMW Item; Item.mask = LVIF_PARAM; Item.iItem = i; @@ -126,7 +126,7 @@ static void AddEntryToList(HWND hwndLV, LPWSTR Name, DWORD dwValType, void* ValBuf, DWORD dwCount, int Position, BOOL ValExists) { PLINE_INFO linfo; - LVITEM item; + LVITEMW item; int index; linfo = (PLINE_INFO)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LINE_INFO) + dwCount); @@ -654,7 +654,7 @@ void DestroyListView(HWND hwndLV) { INT count, i; - LVITEM item; + LVITEMW item; count = ListView_GetItemCount(hwndLV); for (i = 0; i < count; i++) Modified: trunk/reactos/base/applications/regedit/treeview.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
============================================================================== --- trunk/reactos/base/applications/regedit/treeview.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/treeview.c [iso-8859-1] Tue Jan 1 19:38:47 2013 @@ -34,7 +34,7 @@ static BOOL get_item_path(HWND hwndTV, HTREEITEM hItem, HKEY* phKey, LPWSTR* pKeyPath, int* pPathLen, int* pMaxLen) { - TVITEM item; + TVITEMW item; size_t maxLen, len; LPWSTR newStr; @@ -109,8 +109,8 @@ /* Add an entry to the tree. Only give hKey for root nodes (HKEY_ constants) */ static HTREEITEM AddEntryToTree(HWND hwndTV, HTREEITEM hParent, LPWSTR label, HKEY hKey, DWORD dwChildren) { - TVITEM tvi; - TVINSERTSTRUCT tvins; + TVITEMW tvi; + TVINSERTSTRUCTW tvins; if (hKey) { @@ -140,7 +140,7 @@ LPCWSTR KeyPath; DWORD dwCount, dwIndex, dwMaxSubKeyLen; LPWSTR Name = NULL; - TVITEM tvItem; + TVITEMW tvItem; LPWSTR pszNodes = NULL; BOOL bSuccess = FALSE; LPWSTR s; @@ -332,7 +332,7 @@ { WCHAR buf[MAX_NEW_KEY_LEN]; HTREEITEM hNewItem = 0; - TVITEMEX item; + TVITEMEXW item; /* Default to the current selection */ if (!hItem) @@ -390,8 +390,8 @@ static BOOL InitTreeViewItems(HWND hwndTV, LPWSTR pHostName) { - TVITEM tvi; - TVINSERTSTRUCT tvins; + TVITEMW tvi; + TVINSERTSTRUCTW tvins; HTREEITEM hRoot; tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN | TVIF_PARAM; @@ -664,7 +664,7 @@ WCHAR szPathPart[128]; WCHAR szBuffer[128]; LPCWSTR s; - TVITEM tvi; + TVITEMW tvi; /* Load "My Computer" string... */ LoadStringW(hInst, IDS_MY_COMPUTER, szBuffer, COUNT_OF(szBuffer)); @@ -683,22 +683,22 @@ while(keyPath[0]) { s = wcschr(keyPath, L'\\'); - wcsncpy(szPathPart, keyPath, s ? s - keyPath + 1 : wcslen(keyPath) + 1); + lstrcpynW(szPathPart, keyPath, s ? s - keyPath + 1 : wcslen(keyPath) + 1); /* Special case for root to expand root key abbreviations */ if (hItem == hRoot) { - if (!wcsicmp(szPathPart, L"HKCR")) + if (!_wcsicmp(szPathPart, L"HKCR")) wcscpy(szPathPart, L"HKEY_CLASSES_ROOT"); - else if (!wcsicmp(szPathPart, L"HKCU")) + else if (!_wcsicmp(szPathPart, L"HKCU")) wcscpy(szPathPart, L"HKEY_CURRENT_USER"); - else if (!wcsicmp(szPathPart, L"HKLM")) + else if (!_wcsicmp(szPathPart, L"HKLM")) wcscpy(szPathPart, L"HKEY_LOCAL_MACHINE"); - else if (!wcsicmp(szPathPart, L"HKU")) + else if (!_wcsicmp(szPathPart, L"HKU")) wcscpy(szPathPart, L"HKEY_USERS"); - else if (!wcsicmp(szPathPart, L"HKCC")) + else if (!_wcsicmp(szPathPart, L"HKCC")) wcscpy(szPathPart, L"HKEY_CURRENT_CONFIG"); - else if (!wcsicmp(szPathPart, L"HKDD")) + else if (!_wcsicmp(szPathPart, L"HKDD")) wcscpy(szPathPart, L"HKEY_DYN_DATA"); } @@ -713,7 +713,7 @@ (void)TreeView_GetItem(hwndTV, &tvi); - if (!wcsicmp(szBuffer, szPathPart)) + if (!_wcsicmp(szBuffer, szPathPart)) break; }
11 years, 11 months
1
0
0
0
[tkreuzer] 58089: [WIN32K] - In NtGdiGetRandomRgn use the region pointers directly, instead of getting their handles. These regions might not even have a handle. - Fix last error code
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Jan 1 19:23:30 2013 New Revision: 58089 URL:
http://svn.reactos.org/svn/reactos?rev=58089&view=rev
Log: [WIN32K] - In NtGdiGetRandomRgn use the region pointers directly, instead of getting their handles. These regions might not even have a handle. - Fix last error code Modified: trunk/reactos/win32ss/gdi/ntgdi/dcobjs.c Modified: trunk/reactos/win32ss/gdi/ntgdi/dcobjs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dcobjs.c…
============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/dcobjs.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/dcobjs.c [iso-8859-1] Tue Jan 1 19:23:30 2013 @@ -615,12 +615,13 @@ INT ret = 0; PDC pdc; HRGN hrgnSrc = NULL; + PREGION prgnSrc = NULL; POINTL ptlOrg; pdc = DC_LockDc(hdc); if (!pdc) { - EngSetLastError(ERROR_INVALID_PARAMETER); + EngSetLastError(ERROR_INVALID_HANDLE); return -1; } @@ -628,33 +629,51 @@ { case CLIPRGN: hrgnSrc = pdc->rosdc.hClipRgn; -// if (pdc->dclevel.prgnClip) hrgnSrc = pdc->dclevel.prgnClip->BaseObject.hHmgr; - break; +// if (pdc->dclevel.prgnClip) prgnSrc = pdc->dclevel.prgnClip; + break; + case METARGN: - if (pdc->dclevel.prgnMeta) - hrgnSrc = pdc->dclevel.prgnMeta->BaseObject.hHmgr; - break; + prgnSrc = pdc->dclevel.prgnMeta; + break; + case APIRGN: - if (pdc->prgnAPI) hrgnSrc = pdc->prgnAPI->BaseObject.hHmgr; -// else if (pdc->dclevel.prgnClip) hrgnSrc = pdc->dclevel.prgnClip->BaseObject.hHmgr; - else if (pdc->rosdc.hClipRgn) hrgnSrc = pdc->rosdc.hClipRgn; - else if (pdc->dclevel.prgnMeta) hrgnSrc = pdc->dclevel.prgnMeta->BaseObject.hHmgr; - break; + if (pdc->prgnAPI) + { + prgnSrc = pdc->prgnAPI; + } +// else if (pdc->dclevel.prgnClip) prgnSrc = pdc->dclevel.prgnClip; + else if (pdc->rosdc.hClipRgn) + { + hrgnSrc = pdc->rosdc.hClipRgn; + } + else if (pdc->dclevel.prgnMeta) + { + prgnSrc = pdc->dclevel.prgnMeta; + } + break; + case SYSRGN: - if (pdc->prgnVis) - { - PREGION prgnDest = REGION_LockRgn(hrgnDest); - ret = IntGdiCombineRgn(prgnDest, pdc->prgnVis, 0, RGN_COPY) == ERROR ? -1 : 1; - REGION_UnlockRgn(prgnDest); - } - break; + prgnSrc = pdc->prgnVis; + break; + default: - hrgnSrc = NULL; + break; } if (hrgnSrc) { ret = NtGdiCombineRgn(hrgnDest, hrgnSrc, 0, RGN_COPY) == ERROR ? -1 : 1; + } + else if (prgnSrc) + { + PREGION prgnDest = REGION_LockRgn(hrgnDest); + if (prgnDest) + { + ret = IntGdiCombineRgn(prgnDest, prgnSrc, 0, RGN_COPY) == ERROR ? -1 : 1; + REGION_UnlockRgn(prgnDest); + } + else + ret = -1; } if (iCode == SYSRGN)
11 years, 11 months
1
0
0
0
[hbelusca] 58088: [NTOSKRNL] Display both on the screen and on the debug console that an invalid debug service was called.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Jan 1 16:42:07 2013 New Revision: 58088 URL:
http://svn.reactos.org/svn/reactos?rev=58088&view=rev
Log: [NTOSKRNL] Display both on the screen and on the debug console that an invalid debug service was called. Modified: trunk/reactos/ntoskrnl/kd/kdmain.c Modified: trunk/reactos/ntoskrnl/kd/kdmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdmain.c?rev=5…
============================================================================== --- trunk/reactos/ntoskrnl/kd/kdmain.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd/kdmain.c [iso-8859-1] Tue Jan 1 16:42:07 2013 @@ -108,7 +108,8 @@ #endif /* KDBG */ #endif /* DBG */ default: - HalDisplayString ("Invalid debug service call!\n"); + DPRINT1("Invalid debug service call!\n"); + HalDisplayString("Invalid debug service call!\n"); break; }
11 years, 11 months
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Results per page:
10
25
50
100
200