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
February 2015
----- 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
16 participants
372 discussions
Start a n
N
ew thread
[tfaber] 66367: [KERNEL32_APITEST] - Add a test for process termination behavior. This shows that CreateProcess with CREATE_SUSPENDED followed by TerminateProcess causes a handle leak. CORE-9234
by tfaber@svn.reactos.org
Author: tfaber Date: Fri Feb 20 10:29:47 2015 New Revision: 66367 URL:
http://svn.reactos.org/svn/reactos?rev=66367&view=rev
Log: [KERNEL32_APITEST] - Add a test for process termination behavior. This shows that CreateProcess with CREATE_SUSPENDED followed by TerminateProcess causes a handle leak. CORE-9234 Added: trunk/rostests/apitests/kernel32/TerminateProcess.c (with props) Modified: trunk/rostests/apitests/kernel32/CMakeLists.txt trunk/rostests/apitests/kernel32/testlist.c Modified: trunk/rostests/apitests/kernel32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/kernel32/CMakeLi…
============================================================================== --- trunk/rostests/apitests/kernel32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/kernel32/CMakeLists.txt [iso-8859-1] Fri Feb 20 10:29:47 2015 @@ -10,6 +10,7 @@ MultiByteToWideChar.c SetCurrentDirectory.c SetUnhandledExceptionFilter.c + TerminateProcess.c testlist.c) add_executable(kernel32_apitest ${SOURCE}) Added: trunk/rostests/apitests/kernel32/TerminateProcess.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/kernel32/Termina…
============================================================================== --- trunk/rostests/apitests/kernel32/TerminateProcess.c (added) +++ trunk/rostests/apitests/kernel32/TerminateProcess.c [iso-8859-1] Fri Feb 20 10:29:47 2015 @@ -0,0 +1,255 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory + * PURPOSE: Test for TerminateProcess + * PROGRAMMER: Thomas Faber <thomas.faber(a)reactos.org> + */ + +#include <apitest.h> + +#include <ndk/obfuncs.h> +#include <strsafe.h> + +static +HANDLE +StartChild( + _In_ PCWSTR Argument, + _In_ DWORD Flags, + _Out_opt_ PDWORD ProcessId) +{ + BOOL Success; + WCHAR FileName[MAX_PATH]; + WCHAR CommandLine[MAX_PATH]; + STARTUPINFOW StartupInfo; + PROCESS_INFORMATION ProcessInfo; + + GetModuleFileNameW(NULL, FileName, _countof(FileName)); + StringCbPrintfW(CommandLine, + sizeof(CommandLine), + L"\"%ls\" TerminateProcess %ls", + FileName, + Argument); + + RtlZeroMemory(&StartupInfo, sizeof(StartupInfo)); + StartupInfo.cb = sizeof(StartupInfo); + /* HACK: running the test under rosautotest seems to keep another reference + * to the child process around until the test finishes (on both ROS and + * Windows)... I'm too lazy to investigate very much so let's just redirect + * the child std handles to nowhere. ok() is useless in half the child + * processes anyway. + */ + StartupInfo.dwFlags = STARTF_USESTDHANDLES; + + Success = CreateProcessW(FileName, + CommandLine, + NULL, + NULL, + FALSE, + Flags, + NULL, + NULL, + &StartupInfo, + &ProcessInfo); + if (!Success) + { + skip("CreateProcess failed with %lu\n", GetLastError()); + if (ProcessId) + *ProcessId = 0; + return NULL; + } + CloseHandle(ProcessInfo.hThread); + if (ProcessId) + *ProcessId = ProcessInfo.dwProcessId; + return ProcessInfo.hProcess; +} + +static +VOID +TraceHandleCount_( + _In_ HANDLE hObject, + _In_ PCSTR File, + _In_ INT Line) +{ + NTSTATUS Status; + OBJECT_BASIC_INFORMATION BasicInfo; + + Status = NtQueryObject(hObject, + ObjectBasicInformation, + &BasicInfo, + sizeof(BasicInfo), + NULL); + if (!NT_SUCCESS(Status)) + { + ok_(File, Line)(0, "NtQueryObject failed with status 0x%lx\n", Status); + return; + } + ok_(File, Line)(0, "Handle %p still has %lu open handles, %lu references\n", hObject, BasicInfo.HandleCount, BasicInfo.PointerCount); +} + +#define WaitExpectSuccess(h, ms) WaitExpect_(h, ms, WAIT_OBJECT_0, __FILE__, __LINE__) +#define WaitExpectTimeout(h, ms) WaitExpect_(h, ms, WAIT_TIMEOUT, __FILE__, __LINE__) +static +VOID +WaitExpect_( + _In_ HANDLE hWait, + _In_ DWORD Milliseconds, + _In_ DWORD ExpectedError, + _In_ PCSTR File, + _In_ INT Line) +{ + DWORD Error; + + Error = WaitForSingleObject(hWait, Milliseconds); + ok_(File, Line)(Error == ExpectedError, "Wait for %p return %lu\n", hWait, Error); +} + +#define CloseProcessAndVerify(hp, pid, code) CloseProcessAndVerify_(hp, pid, code, __FILE__, __LINE__) +static +VOID +CloseProcessAndVerify_( + _In_ HANDLE hProcess, + _In_ DWORD ProcessId, + _In_ UINT ExpectedExitCode, + _In_ PCSTR File, + _In_ INT Line) +{ + int i = 0; + DWORD Error; + DWORD ExitCode; + BOOL Success; + + WaitExpect_(hProcess, 0, WAIT_OBJECT_0, File, Line); + Success = GetExitCodeProcess(hProcess, &ExitCode); + ok_(File, Line)(Success, "GetExitCodeProcess failed with %lu\n", GetLastError()); + CloseHandle(hProcess); + while ((hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, ProcessId)) != NULL) + { + if (++i >= 100) + { + TraceHandleCount_(hProcess, File, Line); + CloseHandle(hProcess); + break; + } + CloseHandle(hProcess); + Sleep(100); + } + Error = GetLastError(); + ok_(File, Line)(hProcess == NULL, "OpenProcess succeeded unexpectedly for pid 0x%lx\n", ProcessId); + ok_(File, Line)(Error == ERROR_INVALID_PARAMETER, "Error = %lu\n", Error); + ok_(File, Line)(ExitCode == ExpectedExitCode, "Exit code is %lu but expected %lu\n", ExitCode, ExpectedExitCode); +} + +static +VOID +TestTerminateProcess( + _In_ HANDLE hEvent) +{ + HANDLE hProcess; + DWORD ProcessId; + + /* Regular child process that returns from the test function */ + /* HACK: These two tests don't work if stdout is a pipe. See StartChild */ + ResetEvent(hEvent); + hProcess = StartChild(L"child", 0, &ProcessId); + WaitExpectSuccess(hEvent, 5000); + WaitExpectSuccess(hProcess, 5000); + CloseProcessAndVerify(hProcess, ProcessId, 0); + + ResetEvent(hEvent); + hProcess = StartChild(L"child", 0, &ProcessId); + WaitExpectSuccess(hProcess, 5000); + WaitExpectSuccess(hEvent, 0); + CloseProcessAndVerify(hProcess, ProcessId, 0); + + /* Suspended process -- never gets a chance to initialize */ + ResetEvent(hEvent); + hProcess = StartChild(L"child", CREATE_SUSPENDED, &ProcessId); + WaitExpectTimeout(hEvent, 100); + WaitExpectTimeout(hProcess, 100); + TerminateProcess(hProcess, 123); + WaitExpectSuccess(hProcess, 5000); + CloseProcessAndVerify(hProcess, ProcessId, 123); + + /* Waiting process -- we have to terminate it */ + ResetEvent(hEvent); + hProcess = StartChild(L"wait", 0, &ProcessId); + WaitExpectTimeout(hProcess, 100); + TerminateProcess(hProcess, 123); + WaitExpectSuccess(hProcess, 5000); + CloseProcessAndVerify(hProcess, ProcessId, 123); + + /* Process calls ExitProcess */ + ResetEvent(hEvent); + hProcess = StartChild(L"child exit 456", 0, &ProcessId); + WaitExpectSuccess(hEvent, 5000); + WaitExpectSuccess(hProcess, 5000); + CloseProcessAndVerify(hProcess, ProcessId, 456); + + /* Process calls TerminateProcess with GetCurrentProcess */ + ResetEvent(hEvent); + hProcess = StartChild(L"child terminate 456", 0, &ProcessId); + WaitExpectSuccess(hEvent, 5000); + WaitExpectSuccess(hProcess, 5000); + CloseProcessAndVerify(hProcess, ProcessId, 456); + + /* Process calls TerminateProcess with real handle to itself */ + ResetEvent(hEvent); + hProcess = StartChild(L"child terminate2 456", 0, &ProcessId); + WaitExpectSuccess(hEvent, 5000); + WaitExpectSuccess(hProcess, 5000); + CloseProcessAndVerify(hProcess, ProcessId, 456); +} + +START_TEST(TerminateProcess) +{ + HANDLE hEvent; + BOOL Success; + DWORD Error; + int argc; + char **argv; + + hEvent = CreateEventW(NULL, TRUE, FALSE, L"kernel32_apitest_TerminateProcess_event"); + Error = GetLastError(); + if (!hEvent) + { + skip("CreateEvent failed with error %lu\n", Error); + return; + } + argc = winetest_get_mainargs(&argv); + if (argc >= 3) + { + ok(Error == ERROR_ALREADY_EXISTS, "Error = %lu\n", Error); + if (!strcmp(argv[2], "wait")) + { + WaitExpectSuccess(hEvent, 30000); + } + else + { + Success = SetEvent(hEvent); + ok(Success, "SetEvent failed with return %d, error %lu\n", Success, GetLastError()); + } + } + else + { + ok(Error == NO_ERROR, "Error = %lu\n", Error); + TestTerminateProcess(hEvent); + } + CloseHandle(hEvent); + if (argc >= 5) + { + UINT ExitCode = strtol(argv[4], NULL, 10); + + fflush(stdout); + if (!strcmp(argv[3], "exit")) + ExitProcess(ExitCode); + else if (!strcmp(argv[3], "terminate")) + TerminateProcess(GetCurrentProcess(), ExitCode); + else if (!strcmp(argv[3], "terminate2")) + { + HANDLE hProcess; + hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, GetCurrentProcessId()); + TerminateProcess(hProcess, ExitCode); + } + ok(0, "Should have terminated\n"); + } +} Propchange: trunk/rostests/apitests/kernel32/TerminateProcess.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/kernel32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/kernel32/testlis…
============================================================================== --- trunk/rostests/apitests/kernel32/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/kernel32/testlist.c [iso-8859-1] Fri Feb 20 10:29:47 2015 @@ -13,6 +13,7 @@ extern void func_MultiByteToWideChar(void); extern void func_SetCurrentDirectory(void); extern void func_SetUnhandledExceptionFilter(void); +extern void func_TerminateProcess(void); const struct test winetest_testlist[] = { @@ -25,7 +26,8 @@ { "lstrcpynW", func_lstrcpynW }, { "MultiByteToWideChar", func_MultiByteToWideChar }, { "SetCurrentDirectory", func_SetCurrentDirectory }, - { "SetUnhandledExceptionFilter", func_SetUnhandledExceptionFilter}, + { "SetUnhandledExceptionFilter", func_SetUnhandledExceptionFilter }, + { "TerminateProcess", func_TerminateProcess }, { 0, 0 } };
9 years, 10 months
1
0
0
0
[janderwald] 66366: [PSDK] - add dif function codes
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Feb 20 09:24:47 2015 New Revision: 66366 URL:
http://svn.reactos.org/svn/reactos?rev=66366&view=rev
Log: [PSDK] - add dif function codes Modified: trunk/reactos/include/psdk/setupapi.h Modified: trunk/reactos/include/psdk/setupapi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/setupapi.h?re…
============================================================================== --- trunk/reactos/include/psdk/setupapi.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/setupapi.h [iso-8859-1] Fri Feb 20 09:24:47 2015 @@ -155,7 +155,9 @@ #define DIF_POWERMESSAGEWAKE 39 #define DIF_ADDREMOTEPROPERTYPAGE_ADVANCED 40 #define DIF_UPDATEDRIVER_UI 41 -#define DIF_RESERVED2 42 +#define DIF_FINISHINSTALL_ACTION 42 +#define DIF_RESERVED2 48 + #define DIGCDP_FLAG_BASIC 0x00000001 #define DIGCDP_FLAG_ADVANCED 0x00000002 #if (_SETUPAPI_VER >= 0x0501)
9 years, 10 months
1
0
0
0
[tfaber] 66365: [KERNEL32] - Make BaseSetLastNTError return the converted Win32 error code. This will determine the upper 24 bits of EAX in functions that return BOOLEAN FALSE right after calling B...
by tfaber@svn.reactos.org
Author: tfaber Date: Fri Feb 20 07:03:00 2015 New Revision: 66365 URL:
http://svn.reactos.org/svn/reactos?rev=66365&view=rev
Log: [KERNEL32] - Make BaseSetLastNTError return the converted Win32 error code. This will determine the upper 24 bits of EAX in functions that return BOOLEAN FALSE right after calling BaseSetLastNTError, e.g. Wow64EnableWow64FsRedirection. Fixes installers using WiX Toolset (e.g. VS2012 redist) on MSVC builds. See
http://wixtoolset.org/issues/4681/
for the WiX bug that causes this. CORE-8010 Modified: trunk/reactos/dll/win32/kernel32/client/except.c trunk/reactos/dll/win32/kernel32/include/kernel32.h Modified: trunk/reactos/dll/win32/kernel32/client/except.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/client/except.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/except.c [iso-8859-1] Fri Feb 20 07:03:00 2015 @@ -682,12 +682,16 @@ /* * @implemented */ -VOID +DWORD WINAPI BaseSetLastNTError(IN NTSTATUS Status) { + DWORD dwErrCode; + /* Convert from NT to Win32, then set */ - SetLastError(RtlNtStatusToDosError(Status)); + dwErrCode = RtlNtStatusToDosError(Status); + SetLastError(dwErrCode); + return dwErrCode; } /* Modified: trunk/reactos/dll/win32/kernel32/include/kernel32.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/include…
============================================================================== --- trunk/reactos/dll/win32/kernel32/include/kernel32.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/include/kernel32.h [iso-8859-1] Fri Feb 20 07:03:00 2015 @@ -353,7 +353,7 @@ WINAPI InitCommandLines(VOID); -VOID +DWORD WINAPI BaseSetLastNTError(IN NTSTATUS Status);
9 years, 10 months
1
0
0
0
[jimtabor] 66364: [Win32ss] - Cleanup and remove unused code.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Fri Feb 20 06:24:04 2015 New Revision: 66364 URL:
http://svn.reactos.org/svn/reactos?rev=66364&view=rev
Log: [Win32ss] - Cleanup and remove unused code. Modified: trunk/reactos/win32ss/include/ntuser.h trunk/reactos/win32ss/user/ntuser/caret.c trunk/reactos/win32ss/user/ntuser/simplecall.c trunk/reactos/win32ss/user/user32/include/ntwrapper.h trunk/reactos/win32ss/user/user32/include/user32p.h trunk/reactos/win32ss/user/user32/windows/caret.c trunk/reactos/win32ss/user/user32/windows/defwnd.c Modified: trunk/reactos/win32ss/include/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/include/ntuser.h?r…
============================================================================== --- trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] Fri Feb 20 06:24:04 2015 @@ -3509,7 +3509,6 @@ */ #define NOPARAM_ROUTINE_ISCONSOLEMODE 0xffff0001 -#define ONEPARAM_ROUTINE_SWITCHCARETSHOWING 0xfffe0008 #define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0xfffe000d #define ONEPARAM_ROUTINE_GETDESKTOPMAPPING 0xfffe000e #define TWOPARAM_ROUTINE_SETMENUBARHEIGHT 0xfffd0050 Modified: trunk/reactos/win32ss/user/ntuser/caret.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/caret.…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/caret.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/caret.c [iso-8859-1] Fri Feb 20 06:24:04 2015 @@ -278,26 +278,6 @@ return TRUE; } -/* This can go away now! */ -BOOL FASTCALL -IntSwitchCaretShowing(PVOID Info) -{ - PTHREADINFO pti; - PUSER_MESSAGE_QUEUE ThreadQueue; - - pti = PsGetCurrentThreadWin32Thread(); - ThreadQueue = pti->MessageQueue; - - if(ThreadQueue->CaretInfo->hWnd) - { - ThreadQueue->CaretInfo->Showing = (ThreadQueue->CaretInfo->Showing ? 0 : 1); - MmCopyToCaller(Info, ThreadQueue->CaretInfo, sizeof(THRDCARETINFO)); - return TRUE; - } - - return FALSE; -} - /* SYSCALLS *****************************************************************/ BOOL Modified: trunk/reactos/win32ss/user/ntuser/simplecall.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/simple…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] Fri Feb 20 06:24:04 2015 @@ -217,9 +217,6 @@ gpsi->aiSysMet[SM_SWAPBUTTON] = gspv.bMouseBtnSwap; RETURN(Result); } - - case ONEPARAM_ROUTINE_SWITCHCARETSHOWING: - RETURN( (DWORD_PTR)IntSwitchCaretShowing((PVOID)Param)); case ONEPARAM_ROUTINE_SETCARETBLINKTIME: RETURN( (DWORD_PTR)IntSetCaretBlinkTime((UINT)Param)); Modified: trunk/reactos/win32ss/user/user32/include/ntwrapper.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/includ…
============================================================================== --- trunk/reactos/win32ss/user/user32/include/ntwrapper.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/include/ntwrapper.h [iso-8859-1] Fri Feb 20 06:24:04 2015 @@ -791,11 +791,6 @@ return (LPARAM)NtUserGetThreadState(THREADSTATE_GETMESSAGEEXTRAINFO); } -EXTINLINE BOOL NtUserxSwitchCaretShowing(THRDCARETINFO* CaretInfo) -{ - return (BOOL)NtUserCallOneParam((DWORD_PTR)CaretInfo, ONEPARAM_ROUTINE_SWITCHCARETSHOWING); -} - EXTINLINE VOID NtUserxEnableProcessWindowGhosting(BOOL bEnable) { NtUserCallOneParam((DWORD_PTR)bEnable, ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING); Modified: trunk/reactos/win32ss/user/user32/include/user32p.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/includ…
============================================================================== --- trunk/reactos/win32ss/user/user32/include/user32p.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/include/user32p.h [iso-8859-1] Fri Feb 20 06:24:04 2015 @@ -129,7 +129,6 @@ VOID FASTCALL GetConnected(VOID); extern BOOL FASTCALL EnumNamesA(HWINSTA WindowStation, NAMEENUMPROCA EnumFunc, LPARAM Context, BOOL Desktops); extern BOOL FASTCALL EnumNamesW(HWINSTA WindowStation, NAMEENUMPROCW EnumFunc, LPARAM Context, BOOL Desktops); -void DrawCaret(HWND hWnd, PTHRDCARETINFO CaretInfo); BOOL UserDrawSysMenuButton( HWND hWnd, HDC hDC, LPRECT, BOOL down ); HWND* WIN_ListChildren (HWND hWndparent); VOID DeleteFrameBrushes(VOID); Modified: trunk/reactos/win32ss/user/user32/windows/caret.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/caret.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/caret.c [iso-8859-1] Fri Feb 20 06:24:04 2015 @@ -34,54 +34,6 @@ /* FUNCTIONS *****************************************************************/ -void -DrawCaret(HWND hWnd, - PTHRDCARETINFO CaretInfo) -{ - HDC hdc, hdcMem; - HBITMAP hbmOld; - BOOL bDone = FALSE; - - hdc = GetDC(hWnd); - if (!hdc) - { - ERR("GetDC failed\n"); - return; - } - - if(CaretInfo->Bitmap && GetBitmapDimensionEx(CaretInfo->Bitmap, &CaretInfo->Size)) - { - hdcMem = CreateCompatibleDC(hdc); - if (hdcMem) - { - hbmOld = SelectObject(hdcMem, CaretInfo->Bitmap); - bDone = BitBlt(hdc, - CaretInfo->Pos.x, - CaretInfo->Pos.y, - CaretInfo->Size.cx, - CaretInfo->Size.cy, - hdcMem, - 0, - 0, - SRCINVERT); - SelectObject(hdcMem, hbmOld); - DeleteDC(hdcMem); - } - } - - if (!bDone) - { - PatBlt(hdc, - CaretInfo->Pos.x, - CaretInfo->Pos.y, - CaretInfo->Size.cx, - CaretInfo->Size.cy, - DSTINVERT); - } - - ReleaseDC(hWnd, hdc); -} - /* * @implemented Modified: trunk/reactos/win32ss/user/user32/windows/defwnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/defwnd.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/defwnd.c [iso-8859-1] Fri Feb 20 06:24:04 2015 @@ -967,22 +967,6 @@ break; } - case WM_SYSTIMER: - { - THRDCARETINFO CaretInfo; - switch(wParam) - { - case 0xffff: /* Caret timer */ - /* switch showing byte in win32k and get information about the caret */ - if(NtUserxSwitchCaretShowing(&CaretInfo) && (CaretInfo.hWnd == hWnd)) - { - DrawCaret(hWnd, &CaretInfo); - } - break; - } - break; - } - case WM_QUERYOPEN: case WM_QUERYENDSESSION: {
9 years, 10 months
1
0
0
0
[hbelusca] 66363: [SHORTCUTS]: Shortcut to regedit is to regedit, not to the NT 3.x compatibility stub!!
by hbelusca@svn.reactos.org
Author: hbelusca Date: Fri Feb 20 02:09:28 2015 New Revision: 66363 URL:
http://svn.reactos.org/svn/reactos?rev=66363&view=rev
Log: [SHORTCUTS]: Shortcut to regedit is to regedit, not to the NT 3.x compatibility stub!! Modified: trunk/reactos/media/inf/shortcuts.inf Modified: trunk/reactos/media/inf/shortcuts.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/inf/shortcuts.inf?re…
============================================================================== --- trunk/reactos/media/inf/shortcuts.inf [iso-8859-1] (original) +++ trunk/reactos/media/inf/shortcuts.inf [iso-8859-1] Fri Feb 20 02:09:28 2015 @@ -40,7 +40,7 @@ [SystemToolsShortcuts] %SystemRoot%\system32\charmap.exe, %CHARMAP_TITLE%, %CHARMAP_DESC%, 0 %SystemRoot%\system32\kbswitch.exe, %KBSWITCH_TITLE%, %KBSWITCH_DESC%, 0 -%SystemRoot%\system32\regedt32.exe, %REGEDIT_TITLE%, %REGEDIT_DESC%, 0 +%SystemRoot%\regedit.exe, %REGEDIT_TITLE%, %REGEDIT_DESC%, 0 %SystemRoot%\system32\dxdiag.exe, %DXDIAG_TITLE%, %DXDIAG_DESC%, 0 [AccessibilityShortcuts]
9 years, 10 months
1
0
0
0
[hbelusca] 66362: Forgot this file ;)
by hbelusca@svn.reactos.org
Author: hbelusca Date: Fri Feb 20 02:07:23 2015 New Revision: 66362 URL:
http://svn.reactos.org/svn/reactos?rev=66362&view=rev
Log: Forgot this file ;) Modified: trunk/reactos/dll/win32/shell32/cpanel.h Modified: trunk/reactos/dll/win32/shell32/cpanel.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/cpanel.h…
============================================================================== --- trunk/reactos/dll/win32/shell32/cpanel.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/cpanel.h [iso-8859-1] Fri Feb 20 02:07:23 2015 @@ -26,6 +26,7 @@ { struct CPlApplet *next; /* linked list */ HWND hWnd; + LPWSTR cmd; /* path to applet */ unsigned count; /* number of subprograms */ HMODULE hModule; /* module of loaded applet */ APPLET_PROC proc; /* entry point address */
9 years, 10 months
1
0
0
0
[hbelusca] 66361: [SHELL32]: Partial sync: SHA-1: a08160680be1a3164e882fcc41504f115ba62f12 * shell32: Automatically expand CPL applet path string. (Hermès Bélusca-Maïto)
by hbelusca@svn.reactos.org
Author: hbelusca Date: Fri Feb 20 02:05:46 2015 New Revision: 66361 URL:
http://svn.reactos.org/svn/reactos?rev=66361&view=rev
Log: [SHELL32]: Partial sync: SHA-1: a08160680be1a3164e882fcc41504f115ba62f12 * shell32: Automatically expand CPL applet path string. (Hermès Bélusca-Maïto) Modified: trunk/reactos/dll/win32/shell32/wine/control.c Modified: trunk/reactos/dll/win32/shell32/wine/control.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/wine/con…
============================================================================== --- trunk/reactos/dll/win32/shell32/wine/control.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/wine/control.c [iso-8859-1] Fri Feb 20 02:05:46 2015 @@ -49,6 +49,7 @@ FreeLibrary(applet->hModule); next = applet->next; + HeapFree(GetProcessHeap(), 0, applet->cmd); HeapFree(GetProcessHeap(), 0, applet); return next; } @@ -56,6 +57,7 @@ CPlApplet* Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel* panel) { CPlApplet* applet; + DWORD len; unsigned i; CPLINFO info; NEWCPLINFOW newinfo; @@ -63,16 +65,32 @@ if (!(applet = (CPlApplet *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*applet)))) return applet; + len = ExpandEnvironmentStringsW(cmd, NULL, 0); + if (len > 0) + { + if (!(applet->cmd = HeapAlloc(GetProcessHeap(), 0, (len+1) * sizeof(WCHAR)))) + { + WARN("Cannot allocate memory for applet path\n"); + goto theError; + } + ExpandEnvironmentStringsW(cmd, applet->cmd, len+1); + } + else + { + WARN("Cannot expand applet path\n"); + goto theError; + } + applet->hWnd = hWnd; - if (!(applet->hModule = LoadLibraryW(cmd))) - { - WARN("Cannot load control panel applet %s\n", debugstr_w(cmd)); + if (!(applet->hModule = LoadLibraryW(applet->cmd))) + { + WARN("Cannot load control panel applet %s\n", debugstr_w(applet->cmd)); goto theError; } if (!(applet->proc = (APPLET_PROC)GetProcAddress(applet->hModule, "CPlApplet"))) { - WARN("Not a valid control panel applet %s\n", debugstr_w(cmd)); + WARN("Not a valid control panel applet %s\n", debugstr_w(applet->cmd)); goto theError; } if (!applet->proc(hWnd, CPL_INIT, 0L, 0L)) @@ -155,9 +173,9 @@ panel->hWnd = hWnd; } -#define XICON 32 +#define XICON 32 #define XSTEP 128 -#define YICON 32 +#define YICON 32 #define YSTEP 64 static BOOL Control_Localize(const CPanel* panel, int cx, int cy,
9 years, 10 months
1
0
0
0
[hbelusca] 66360: [FREELDR]: Code formatting; support drive numbers that can be also specified in particular in hexadecimal: 0x??? or in octal: 0??? (first character starts with '0' so it's OK).
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Feb 19 21:06:38 2015 New Revision: 66360 URL:
http://svn.reactos.org/svn/reactos?rev=66360&view=rev
Log: [FREELDR]: Code formatting; support drive numbers that can be also specified in particular in hexadecimal: 0x??? or in octal: 0??? (first character starts with '0' so it's OK). Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/drivemap.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/drivemap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/drivemap.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/drivemap.c [iso-8859-1] Thu Feb 19 21:06:38 2015 @@ -114,11 +114,12 @@ BOOLEAN DriveMapIsValidDriveString(PCSTR DriveString) { - ULONG Index; + ULONG Index; // Now verify that the user has given us appropriate strings if ((strlen(DriveString) < 3) || - ((DriveString[0] != 'f') && (DriveString[0] != 'F') && (DriveString[0] != 'h') && (DriveString[0] != 'H')) || + ((DriveString[0] != 'f') && (DriveString[0] != 'F') && + (DriveString[0] != 'h') && (DriveString[0] != 'H')) || ((DriveString[1] != 'd') && (DriveString[1] != 'D'))) { return FALSE; @@ -126,13 +127,14 @@ // Now verify that the user has given us appropriate numbers // Make sure that only numeric characters were given - for (Index=2; Index<strlen(DriveString); Index++) + for (Index = 2; Index < strlen(DriveString); Index++) { if (DriveString[Index] < '0' || DriveString[Index] > '9') { return FALSE; } } + // Now make sure that they are not outrageous values (i.e. hd90874) if ((atoi(&DriveString[2]) < 0) || (atoi(&DriveString[2]) > 0xff)) { @@ -145,13 +147,15 @@ UCHAR DriveMapGetBiosDriveNumber(PCSTR DeviceName) { - UCHAR BiosDriveNumber = 0; + UCHAR BiosDriveNumber = 0; + + TRACE("DriveMapGetBiosDriveNumber(%s)\n", DeviceName); // If they passed in a number string then just // convert it to decimal and return it if (DeviceName[0] >= '0' && DeviceName[0] <= '9') { - return atoi(DeviceName); + return (UCHAR)strtoul(DeviceName, NULL, 0); } // Convert the drive number string into a number @@ -171,8 +175,8 @@ #ifndef _MSC_VER VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap) { - ULONG* RealModeIVT = (ULONG*)0x00000000; - USHORT* BiosLowMemorySize = (USHORT*)0x00000413; + ULONG* RealModeIVT = (ULONG*)0x00000000; + USHORT* BiosLowMemorySize = (USHORT*)0x00000413; if (!DriveMapInstalled) { @@ -207,8 +211,8 @@ VOID DriveMapRemoveInt13Handler(VOID) { - ULONG* RealModeIVT = (ULONG*)0x00000000; - USHORT* BiosLowMemorySize = (USHORT*)0x00000413; + ULONG* RealModeIVT = (ULONG*)0x00000000; + USHORT* BiosLowMemorySize = (USHORT*)0x00000413; if (DriveMapInstalled) {
9 years, 10 months
1
0
0
0
[hbelusca] 66359: [WINSRV]: Initialize Context.QueryResult to a meaningful value by default. Spotted by Thomas. CORE-9229 #resolve
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Feb 19 20:38:03 2015 New Revision: 66359 URL:
http://svn.reactos.org/svn/reactos?rev=66359&view=rev
Log: [WINSRV]: Initialize Context.QueryResult to a meaningful value by default. Spotted by Thomas. CORE-9229 #resolve Modified: trunk/reactos/win32ss/user/winsrv/usersrv/shutdown.c Modified: trunk/reactos/win32ss/user/winsrv/usersrv/shutdown.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/usersr…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/usersrv/shutdown.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/usersrv/shutdown.c [iso-8859-1] Thu Feb 19 20:38:03 2015 @@ -535,6 +535,7 @@ NOTIFY_CONTEXT Context; Context.ShutdownSettings = ShutdownSettings; + Context.QueryResult = QUERY_RESULT_CONTINUE; // We continue shutdown by default. /* Lock the process */ CsrLockProcessByClientId(CsrProcess->ClientId.UniqueProcess, &Process);
9 years, 10 months
1
0
0
0
[pschweitzer] 66358: [KERNEL32] OK, Thomas had to convince me that MAX_USHORT + MAX_USHORT + 0x400 + 0x6 cannot overflow an ULONG. So remove useless check. By Thomas :-)
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Thu Feb 19 19:15:46 2015 New Revision: 66358 URL:
http://svn.reactos.org/svn/reactos?rev=66358&view=rev
Log: [KERNEL32] OK, Thomas had to convince me that MAX_USHORT + MAX_USHORT + 0x400 + 0x6 cannot overflow an ULONG. So remove useless check. By Thomas :-) Modified: trunk/reactos/dll/win32/kernel32/client/file/move.c Modified: trunk/reactos/dll/win32/kernel32/client/file/move.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/client/file/move.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/file/move.c [iso-8859-1] Thu Feb 19 19:15:46 2015 @@ -93,12 +93,6 @@ /* Reserve enough to read previous string + to append our with required null chars */ BufferLength = NewPath->Length + ExistingPath->Length + STRING_LENGTH + 3 * sizeof(UNICODE_NULL); - /* Check we didn't overflow */ - if (BufferLength < STRING_LENGTH) - { - NtClose(KeyHandle); - return STATUS_BUFFER_TOO_SMALL; - } while (TRUE) { @@ -123,6 +117,7 @@ StringLength = DataSize; RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer); BufferLength = ExistingPath->Length + StringLength + NewPath->Length + 3 * sizeof(UNICODE_NULL); + /* Check we didn't overflow */ if (BufferLength < StringLength) { NtClose(KeyHandle);
9 years, 10 months
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
38
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Results per page:
10
25
50
100
200