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
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
August 2011
----- 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
18 participants
498 discussions
Start a n
N
ew thread
[tkreuzer] 53211: [NTOSKRNL/WIN32K/NDK] - OkToClose procedure (OB_OKAYTOCLOSE_METHOD) returns BOOLEAN, not NTSTATUS - Check ppi for NULL before dereferencing it in IntWinstaOkToClose (it is NULL, i...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Aug 13 20:10:40 2011 New Revision: 53211 URL:
http://svn.reactos.org/svn/reactos?rev=53211&view=rev
Log: [NTOSKRNL/WIN32K/NDK] - OkToClose procedure (OB_OKAYTOCLOSE_METHOD) returns BOOLEAN, not NTSTATUS - Check ppi for NULL before dereferencing it in IntWinstaOkToClose (it is NULL, if we do our job of cleaning up the win32 process properly) - Set the win32 process info to NULL on process cleanup - Free THREADINFO and PROCESSINFO instead of leaking them - Set NULL cursor, when the last thread is cleaned up in win32k, so we don't call UserSetCursor() in the process cleanup, when we don't have a THREADINFO anymore. This should hopefully fix a crash of MSVC builds. - Remove unused UserGetNextHandle function - Fix some warnings Modified: trunk/reactos/include/ndk/obtypes.h trunk/reactos/ntoskrnl/ex/win32k.c trunk/reactos/ntoskrnl/kdbg/kdb_symbols.cmake.c trunk/reactos/subsystems/win32/win32k/main/dllmain.c trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c trunk/reactos/subsystems/win32/win32k/ntuser/object.c trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c Modified: trunk/reactos/include/ndk/obtypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/obtypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/obtypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/obtypes.h [iso-8859-1] Sat Aug 13 20:10:40 2011 @@ -236,7 +236,7 @@ IN KPROCESSOR_MODE AccessMode ); -typedef NTSTATUS +typedef BOOLEAN (NTAPI *OB_OKAYTOCLOSE_METHOD)( IN PEPROCESS Process OPTIONAL, IN PVOID Object, Modified: trunk/reactos/ntoskrnl/ex/win32k.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/win32k.c?rev=5…
============================================================================== --- trunk/reactos/ntoskrnl/ex/win32k.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/win32k.c [iso-8859-1] Sat Aug 13 20:10:40 2011 @@ -43,7 +43,7 @@ /* FUNCTIONS ****************************************************************/ -NTSTATUS +BOOLEAN NTAPI ExpDesktopOkToClose( IN PEPROCESS Process OPTIONAL, IN PVOID Object, @@ -57,10 +57,10 @@ Parameters.Handle = Handle; Parameters.PreviousMode = AccessMode; - return ExpDesktopObjectOkToClose(&Parameters); + return NT_SUCCESS(ExpDesktopObjectOkToClose(&Parameters)); } -NTSTATUS +BOOLEAN NTAPI ExpWindowStationOkToClose( IN PEPROCESS Process OPTIONAL, IN PVOID Object, @@ -74,7 +74,7 @@ Parameters.Handle = Handle; Parameters.PreviousMode = AccessMode; - return ExpWindowStationObjectOkToClose(&Parameters); + return NT_SUCCESS(ExpWindowStationObjectOkToClose(&Parameters)); } VOID Modified: trunk/reactos/ntoskrnl/kdbg/kdb_symbols.cmake.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/kdb_symbols.…
============================================================================== --- trunk/reactos/ntoskrnl/kdbg/kdb_symbols.cmake.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kdbg/kdb_symbols.cmake.c [iso-8859-1] Sat Aug 13 20:10:40 2011 @@ -35,8 +35,8 @@ static BOOLEAN LoadSymbols; static LIST_ENTRY SymbolFileListHead; static KSPIN_LOCK SymbolFileListLock; -static PROSSYM_INFO KdbpRosSymInfo; -static ULONG_PTR KdbpImageBase; +//static PROSSYM_INFO KdbpRosSymInfo; +//static ULONG_PTR KdbpImageBase; BOOLEAN KdbpSymbolsInitialized = FALSE; /* FUNCTIONS ****************************************************************/ @@ -178,7 +178,9 @@ PMEMORY_AREA MemoryArea = NULL; PROS_SECTION_OBJECT SectionObject; PLDR_DATA_TABLE_ENTRY LdrEntry; +#if 0 PROSSYM_KM_OWN_CONTEXT FileContext; +#endif ULONG_PTR RelativeAddress; NTSTATUS Status; ROSSYM_LINEINFO LineInfo = {0}; @@ -599,7 +601,7 @@ UNICODE_STRING ModuleNameCopy; RtlInitUnicodeString(&SystemRoot, L"\\SystemRoot\\system32\\Drivers\\"); ModuleNameCopy.Length = 0; - ModuleNameCopy.MaximumLength = + ModuleNameCopy.MaximumLength = LdrEntry->BaseDllName.MaximumLength + SystemRoot.MaximumLength; ModuleNameCopy.Buffer = ExAllocatePool(NonPagedPool, SystemRoot.MaximumLength + LdrEntry->BaseDllName.MaximumLength); RtlCopyUnicodeString(&ModuleNameCopy, &SystemRoot); Modified: trunk/reactos/subsystems/win32/win32k/main/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ma…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] Sat Aug 13 20:10:40 2011 @@ -203,6 +203,10 @@ GdiPoolDestroy(Win32Process->pPoolDcAttr); GdiPoolDestroy(Win32Process->pPoolBrushAttr); GdiPoolDestroy(Win32Process->pPoolRgnAttr); + + /* Ftee the PROCESSINFO */ + PsSetProcessWin32Process(Process, NULL); + ExFreePoolWithTag(Win32Process, USERTAG_PROCESSINFO); } RETURN( STATUS_SUCCESS); @@ -418,10 +422,18 @@ IntSetThreadDesktop(NULL, TRUE); - /* Decrement thread count */ + /* Decrement thread count and check if its 0 */ ppiCurrent->cThreads--; - + if (ppiCurrent->cThreads == 0) + { + /* UGLY: Prevent this function from being called later + when we don't have a THREADINFO anymore. */ + UserSetCursor(NULL, TRUE); + } + + /* Free the THREADINFO */ PsSetThreadWin32Thread(Thread, NULL); + ExFreePoolWithTag(ptiCurrent, USERTAG_THREADINFO); } Status = STATUS_SUCCESS; Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] Sat Aug 13 20:10:40 2011 @@ -182,10 +182,10 @@ if( Parameters->Handle == pti->ppi->hdeskStartup || Parameters->Handle == pti->hdesk) { - return FALSE; - } - - return TRUE; + return STATUS_ACCESS_DENIED; + } + + return STATUS_SUCCESS; } /* PRIVATE FUNCTIONS **********************************************************/ Modified: trunk/reactos/subsystems/win32/win32k/ntuser/object.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/object.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/object.c [iso-8859-1] Sat Aug 13 20:10:40 2011 @@ -261,31 +261,7 @@ return entry->ptr; } -/* return the next user handle after 'handle' that is of a given type */ -PVOID UserGetNextHandle(PUSER_HANDLE_TABLE ht, HANDLE* handle, USER_OBJECT_TYPE type ) -{ - PUSER_HANDLE_ENTRY entry; - - if (!*handle) - entry = ht->handles; - else - { - int index = (((unsigned int)*handle & 0xffff) - FIRST_USER_HANDLE) >> 1; - if (index < 0 || index >= ht->nb_handles) - return NULL; - entry = ht->handles + index + 1; /* start from the next one */ - } - while (entry < ht->handles + ht->nb_handles) - { - if (!type || entry->type == type) - { - *handle = entry_to_handle(ht, entry ); - return entry->ptr; - } - entry++; - } - return NULL; -} + BOOL FASTCALL UserCreateHandleTable(VOID) { @@ -383,7 +359,7 @@ case otMenu: case otCallProc: ((PPROCDESKHEAD)Object)->rpdesk = rpdesk; - ((PPROCDESKHEAD)Object)->pSelf = Object; + ((PPROCDESKHEAD)Object)->pSelf = Object; break; case otCursorIcon: @@ -469,7 +445,7 @@ UserDeleteObject(HANDLE h, USER_OBJECT_TYPE type ) { PVOID body = UserGetObject(gHandleTable, h, type); - + if (!body) return FALSE; ASSERT( ((PHEAD)body)->cLockObj >= 1); Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c [iso-8859-1] Sat Aug 13 20:10:40 2011 @@ -187,19 +187,20 @@ return STATUS_OBJECT_TYPE_MISMATCH; } -NTSTATUS NTAPI +NTSTATUS +NTAPI IntWinstaOkToClose(PWIN32_OKAYTOCLOSEMETHOD_PARAMETERS Parameters) { PPROCESSINFO ppi; ppi = PsGetCurrentProcessWin32Process(); - if(Parameters->Handle == ppi->hwinsta) + if(ppi && (Parameters->Handle == ppi->hwinsta)) { - return FALSE; + return STATUS_ACCESS_DENIED; } - return TRUE; + return STATUS_SUCCESS; } /* PRIVATE FUNCTIONS **********************************************************/ @@ -974,7 +975,7 @@ /* * FIXME - don't allow changing the window station if there are threads that are attached to desktops and own gui objects */ - + PsSetProcessWindowStation(ppi->peProcess, hWindowStation); ppi->prpwinsta = NewWinSta;
13 years, 3 months
1
0
0
0
[ekohl] 53210: [ADVAPI32] Fix EnumServiceGroupW and EnumServiceStatus[A/W]: - If lpServices is NULL or cbBufSize is less than sizeof(ENUM_SERVICE_STATUS/W) pass a pointer to an internal status buff...
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Aug 13 19:57:32 2011 New Revision: 53210 URL:
http://svn.reactos.org/svn/reactos?rev=53210&view=rev
Log: [ADVAPI32] Fix EnumServiceGroupW and EnumServiceStatus[A/W]: - If lpServices is NULL or cbBufSize is less than sizeof(ENUM_SERVICE_STATUS/W) pass a pointer to an internal status buffer to REnumServiceGrouW or REnumServiceStatusA/W. Modified: trunk/reactos/dll/win32/advapi32/service/scm.c Modified: trunk/reactos/dll/win32/advapi32/service/scm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
============================================================================== --- trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] Sat Aug 13 19:57:32 2011 @@ -875,7 +875,9 @@ LPDWORD lpResumeHandle, LPCWSTR lpGroup) { + ENUM_SERVICE_STATUSW ServiceStatus; LPENUM_SERVICE_STATUSW lpStatusPtr; + DWORD dwBufferSize; DWORD dwError; DWORD dwCount; @@ -885,6 +887,17 @@ { SetLastError(ERROR_INVALID_HANDLE); return FALSE; + } + + if (lpServices == NULL || cbBufSize < sizeof(ENUM_SERVICE_STATUSW)) + { + lpStatusPtr = &ServiceStatus; + dwBufferSize = sizeof(ENUM_SERVICE_STATUSW); + } + else + { + lpStatusPtr = lpServices; + dwBufferSize = cbBufSize; } RpcTryExcept @@ -894,8 +907,8 @@ dwError = REnumServicesStatusW((SC_RPC_HANDLE)hSCManager, dwServiceType, dwServiceState, - (LPBYTE)lpServices, - cbBufSize, + (LPBYTE)lpStatusPtr, + dwBufferSize, pcbBytesNeeded, lpServicesReturned, lpResumeHandle); @@ -905,8 +918,8 @@ dwError = REnumServiceGroupW((SC_RPC_HANDLE)hSCManager, dwServiceType, dwServiceState, - (LPBYTE)lpServices, - cbBufSize, + (LPBYTE)lpStatusPtr, + dwBufferSize, pcbBytesNeeded, lpServicesReturned, lpResumeHandle, @@ -921,18 +934,20 @@ if (dwError == ERROR_SUCCESS || dwError == ERROR_MORE_DATA) { - lpStatusPtr = (LPENUM_SERVICE_STATUSW)lpServices; - for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++) + if (*lpServicesReturned > 0) { - if (lpStatusPtr->lpServiceName) - lpStatusPtr->lpServiceName = - (LPWSTR)((ULONG_PTR)lpServices + (ULONG_PTR)lpStatusPtr->lpServiceName); - - if (lpStatusPtr->lpDisplayName) - lpStatusPtr->lpDisplayName = - (LPWSTR)((ULONG_PTR)lpServices + (ULONG_PTR)lpStatusPtr->lpDisplayName); - - lpStatusPtr++; + for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++) + { + if (lpStatusPtr->lpServiceName) + lpStatusPtr->lpServiceName = + (LPWSTR)((ULONG_PTR)lpServices + (ULONG_PTR)lpStatusPtr->lpServiceName); + + if (lpStatusPtr->lpDisplayName) + lpStatusPtr->lpDisplayName = + (LPWSTR)((ULONG_PTR)lpServices + (ULONG_PTR)lpStatusPtr->lpDisplayName); + + lpStatusPtr++; + } } } @@ -964,7 +979,9 @@ LPDWORD lpServicesReturned, LPDWORD lpResumeHandle) { + ENUM_SERVICE_STATUSA ServiceStatus; LPENUM_SERVICE_STATUSA lpStatusPtr; + DWORD dwBufferSize; DWORD dwError; DWORD dwCount; @@ -1012,13 +1029,24 @@ return FALSE; } + if (lpServices == NULL || cbBufSize < sizeof(ENUM_SERVICE_STATUSW)) + { + lpStatusPtr = &ServiceStatus; + dwBufferSize = sizeof(ENUM_SERVICE_STATUSW); + } + else + { + lpStatusPtr = lpServices; + dwBufferSize = cbBufSize; + } + RpcTryExcept { dwError = REnumServicesStatusA((SC_RPC_HANDLE)hSCManager, dwServiceType, dwServiceState, - (LPBYTE)lpServices, - cbBufSize, + (LPBYTE)lpStatusPtr, + dwBufferSize, pcbBytesNeeded, lpServicesReturned, lpResumeHandle); @@ -1031,18 +1059,20 @@ if (dwError == ERROR_SUCCESS || dwError == ERROR_MORE_DATA) { - lpStatusPtr = (LPENUM_SERVICE_STATUSA)lpServices; - for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++) + if (*lpServicesReturned > 0) { - if (lpStatusPtr->lpServiceName) - lpStatusPtr->lpServiceName = - (LPSTR)((ULONG_PTR)lpServices + (ULONG_PTR)lpStatusPtr->lpServiceName); - - if (lpStatusPtr->lpDisplayName) - lpStatusPtr->lpDisplayName = - (LPSTR)((ULONG_PTR)lpServices + (ULONG_PTR)lpStatusPtr->lpDisplayName); - - lpStatusPtr++; + for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++) + { + if (lpStatusPtr->lpServiceName) + lpStatusPtr->lpServiceName = + (LPSTR)((ULONG_PTR)lpServices + (ULONG_PTR)lpStatusPtr->lpServiceName); + + if (lpStatusPtr->lpDisplayName) + lpStatusPtr->lpDisplayName = + (LPSTR)((ULONG_PTR)lpServices + (ULONG_PTR)lpStatusPtr->lpDisplayName); + + lpStatusPtr++; + } } } @@ -1074,7 +1104,9 @@ LPDWORD lpServicesReturned, LPDWORD lpResumeHandle) { + ENUM_SERVICE_STATUSW ServiceStatus; LPENUM_SERVICE_STATUSW lpStatusPtr; + DWORD dwBufferSize; DWORD dwError; DWORD dwCount; @@ -1084,6 +1116,17 @@ { SetLastError(ERROR_INVALID_HANDLE); return FALSE; + } + + if (lpServices == NULL || cbBufSize < sizeof(ENUM_SERVICE_STATUSW)) + { + lpStatusPtr = &ServiceStatus; + dwBufferSize = sizeof(ENUM_SERVICE_STATUSW); + } + else + { + lpStatusPtr = lpServices; + dwBufferSize = cbBufSize; } RpcTryExcept @@ -1091,8 +1134,8 @@ dwError = REnumServicesStatusW((SC_RPC_HANDLE)hSCManager, dwServiceType, dwServiceState, - (LPBYTE)lpServices, - cbBufSize, + (LPBYTE)lpStatusPtr, + dwBufferSize, pcbBytesNeeded, lpServicesReturned, lpResumeHandle); @@ -1105,18 +1148,20 @@ if (dwError == ERROR_SUCCESS || dwError == ERROR_MORE_DATA) { - lpStatusPtr = (LPENUM_SERVICE_STATUSW)lpServices; - for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++) + if (*lpServicesReturned > 0) { - if (lpStatusPtr->lpServiceName) - lpStatusPtr->lpServiceName = - (LPWSTR)((ULONG_PTR)lpServices + (ULONG_PTR)lpStatusPtr->lpServiceName); - - if (lpStatusPtr->lpDisplayName) - lpStatusPtr->lpDisplayName = - (LPWSTR)((ULONG_PTR)lpServices + (ULONG_PTR)lpStatusPtr->lpDisplayName); - - lpStatusPtr++; + for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++) + { + if (lpStatusPtr->lpServiceName) + lpStatusPtr->lpServiceName = + (LPWSTR)((ULONG_PTR)lpServices + (ULONG_PTR)lpStatusPtr->lpServiceName); + + if (lpStatusPtr->lpDisplayName) + lpStatusPtr->lpDisplayName = + (LPWSTR)((ULONG_PTR)lpServices + (ULONG_PTR)lpStatusPtr->lpDisplayName); + + lpStatusPtr++; + } } }
13 years, 3 months
1
0
0
0
[jgardou] 53209: [SETUPAPI] - fix broken check - fix potential NULL pointer dereference - fix non critical parameter checks.
by jgardou@svn.reactos.org
Author: jgardou Date: Sat Aug 13 19:53:29 2011 New Revision: 53209 URL:
http://svn.reactos.org/svn/reactos?rev=53209&view=rev
Log: [SETUPAPI] - fix broken check - fix potential NULL pointer dereference - fix non critical parameter checks. Modified: trunk/reactos/dll/win32/setupapi/devinst.c Modified: trunk/reactos/dll/win32/setupapi/devinst.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/devinst…
============================================================================== --- trunk/reactos/dll/win32/setupapi/devinst.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/devinst.c [iso-8859-1] Sat Aug 13 19:53:29 2011 @@ -1288,7 +1288,10 @@ SetLastError(ERROR_INVALID_MACHINENAME); goto cleanup; } - size += (len + 3) * sizeof(WCHAR); + if(len > 0) + size += (len + 3) * sizeof(WCHAR); + else + MachineName = NULL; } if (Reserved != NULL) @@ -3022,13 +3025,19 @@ SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - if (DeviceInterfaceDetailData && (DeviceInterfaceDetailData->cbSize < - FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_A, DevicePath) + 1 || - DeviceInterfaceDetailData->cbSize > sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_A))) + if (DeviceInterfaceDetailData && (DeviceInterfaceDetailData->cbSize != sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_A))) { SetLastError(ERROR_INVALID_USER_BUFFER); return FALSE; } + + if((DeviceInterfaceDetailDataSize != 0) && + (DeviceInterfaceDetailDataSize < (FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_A, DevicePath) + sizeof(CHAR)))) + { + SetLastError(ERROR_INVALID_USER_BUFFER); + return FALSE; + } + if (!DeviceInterfaceDetailData && DeviceInterfaceDetailDataSize) { SetLastError(ERROR_INVALID_USER_BUFFER); @@ -3045,10 +3054,10 @@ { SetLastError(ERROR_NOT_ENOUGH_MEMORY); } + DeviceInterfaceDetailDataW->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_W); } if (!DeviceInterfaceDetailData || (DeviceInterfaceDetailData && DeviceInterfaceDetailDataW)) { - DeviceInterfaceDetailDataW->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_W); ret = SetupDiGetDeviceInterfaceDetailW( DeviceInfoSet, DeviceInterfaceData, @@ -3060,7 +3069,7 @@ + FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_A, DevicePath); if (RequiredSize) *RequiredSize = bytesNeeded; - if (ret && DeviceInterfaceDetailData && DeviceInterfaceDetailDataSize <= bytesNeeded) + if (ret && DeviceInterfaceDetailData && DeviceInterfaceDetailDataSize >= bytesNeeded) { if (!WideCharToMultiByte( CP_ACP, 0, @@ -3123,7 +3132,8 @@ SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - if (DeviceInterfaceDetailData != NULL && DeviceInterfaceDetailDataSize < FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_W, DevicePath) + sizeof(WCHAR)) + if ((DeviceInterfaceDetailData != NULL) + && (DeviceInterfaceDetailDataSize < (FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_W, DevicePath)) + sizeof(WCHAR))) { SetLastError(ERROR_INVALID_PARAMETER); return FALSE;
13 years, 3 months
1
0
0
0
[mkupfer] 53208: move clean the screen to a later point
by mkupfer@svn.reactos.org
Author: mkupfer Date: Sat Aug 13 18:57:33 2011 New Revision: 53208 URL:
http://svn.reactos.org/svn/reactos?rev=53208&view=rev
Log: move clean the screen to a later point Modified: trunk/reactos/ntoskrnl/ex/init.c Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=532…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] Sat Aug 13 18:57:33 2011 @@ -1918,9 +1918,6 @@ /* Update progress bar */ InbvUpdateProgressBar(100); - /* Clean the screen */ - if (InbvBootDriverInstalled) FinalizeBootLogo(); - /* Allow strings to be displayed */ InbvEnableDisplayString(TRUE); @@ -1959,6 +1956,9 @@ &Size, MEM_RELEASE); + /* Clean the screen */ + if (InbvBootDriverInstalled) FinalizeBootLogo(); + /* Increase init phase */ ExpInitializationPhase++;
13 years, 3 months
1
0
0
0
[tkreuzer] 53207: [WIN32K] Simplify the loop to remove the THREADINFO from the PROCESSINFO's list when cleaning up
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Aug 13 16:44:49 2011 New Revision: 53207 URL:
http://svn.reactos.org/svn/reactos?rev=53207&view=rev
Log: [WIN32K] Simplify the loop to remove the THREADINFO from the PROCESSINFO's list when cleaning up Modified: trunk/reactos/subsystems/win32/win32k/main/dllmain.c Modified: trunk/reactos/subsystems/win32/win32k/main/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ma…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] Sat Aug 13 16:44:49 2011 @@ -368,32 +368,28 @@ } else { - PTHREADINFO pti; + PTHREADINFO *ppti; PSINGLE_LIST_ENTRY psle; + PPROCESSINFO ppiCurrent; DPRINT("Destroying W32 thread TID:%d at IRQ level: %lu\n", Thread->Cid.UniqueThread, KeGetCurrentIrql()); + ppiCurrent = ptiCurrent->ppi; ptiCurrent->TIF_flags |= TIF_INCLEANUP; - pti = ptiCurrent->ppi->ptiList; - if (pti == ptiCurrent) - { - ptiCurrent->ppi->ptiList = ptiCurrent->ptiSibling; - ptiCurrent->ppi->cThreads--; - } - else - { - do - { - if (pti->ptiSibling == ptiCurrent) - { - pti->ptiSibling = ptiCurrent->ptiSibling; - ptiCurrent->ppi->cThreads--; - break; - } - pti = pti->ptiSibling; - } - while (pti); - } + + /* Find the THREADINFO in the PROCESSINFO's list */ + ppti = &ppiCurrent->ptiList; + while (*ppti != NULL && *ppti != ptiCurrent) + { + ppti = &((*ppti)->ptiSibling); + } + + /* we must have found it */ + ASSERT(*ppti == ptiCurrent); + + /* Remove it from the list */ + *ppti = ptiCurrent->ptiSibling; + DceFreeThreadDCE(ptiCurrent); HOOK_DestroyThreadHooks(Thread); EVENT_DestroyThreadEvents(Thread); @@ -421,6 +417,9 @@ } IntSetThreadDesktop(NULL, TRUE); + + /* Decrement thread count */ + ppiCurrent->cThreads--; PsSetThreadWin32Thread(Thread, NULL); }
13 years, 3 months
1
0
0
0
[tkreuzer] 53206: [WIN32K] - use the correct pool tags for PROCESSINFO and THREADINFO - get rid of RETURN macro usage - misc code cleanup
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Aug 13 16:27:30 2011 New Revision: 53206 URL:
http://svn.reactos.org/svn/reactos?rev=53206&view=rev
Log: [WIN32K] - use the correct pool tags for PROCESSINFO and THREADINFO - get rid of RETURN macro usage - misc code cleanup Modified: trunk/reactos/subsystems/win32/win32k/main/dllmain.c Modified: trunk/reactos/subsystems/win32/win32k/main/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ma…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] Sat Aug 13 16:27:30 2011 @@ -49,7 +49,7 @@ /* FIXME - lock the process */ Win32Process = ExAllocatePoolWithTag(NonPagedPool, sizeof(PROCESSINFO), - 'p23W'); + USERTAG_PROCESSINFO); if (Win32Process == NULL) RETURN( STATUS_NO_MEMORY); @@ -157,9 +157,9 @@ DPRINT1("Shell process is exiting (%d)\n", ExitCode); - UserPostMessage(hwndSAS, - WM_LOGONNOTIFY, - LN_SHELL_EXITED, + UserPostMessage(hwndSAS, + WM_LOGONNOTIFY, + LN_SHELL_EXITED, ExitCode); } } @@ -220,9 +220,9 @@ PSW32THREADCALLOUTTYPE Type) { struct _EPROCESS *Process; - PTHREADINFO Win32Thread; + PTHREADINFO ptiCurrent; int i; - DECLARE_RETURN(NTSTATUS); + NTSTATUS Status; DPRINT("Enter Win32kThreadCallback\n"); UserEnterExclusive(); @@ -230,59 +230,63 @@ Process = Thread->ThreadsProcess; /* Get the Win32 Thread */ - Win32Thread = PsGetThreadWin32Thread(Thread); + ptiCurrent = PsGetThreadWin32Thread(Thread); /* Allocate one if needed */ - if (!Win32Thread) + if (!ptiCurrent) { /* FIXME - lock the process */ - Win32Thread = ExAllocatePoolWithTag(NonPagedPool, - sizeof(THREADINFO), - 't23W'); - - if (Win32Thread == NULL) RETURN( STATUS_NO_MEMORY); - - RtlZeroMemory(Win32Thread, sizeof(THREADINFO)); - - PsSetThreadWin32Thread(Thread, Win32Thread); + ptiCurrent = ExAllocatePoolWithTag(NonPagedPool, + sizeof(THREADINFO), + USERTAG_THREADINFO); + + if (ptiCurrent == NULL) + { + Status = STATUS_NO_MEMORY; + goto leave; + } + + RtlZeroMemory(ptiCurrent, sizeof(THREADINFO)); + + PsSetThreadWin32Thread(Thread, ptiCurrent); /* FIXME - unlock the process */ } + if (Type == PsW32ThreadCalloutInitialize) { HWINSTA hWinSta = NULL; PTEB pTeb; HDESK hDesk = NULL; - NTSTATUS Status; PUNICODE_STRING DesktopPath; PDESKTOP pdesk; PRTL_USER_PROCESS_PARAMETERS ProcessParams = (Process->Peb ? Process->Peb->ProcessParameters : NULL); DPRINT("Creating W32 thread TID:%d at IRQ level: %lu\n", Thread->Cid.UniqueThread, KeGetCurrentIrql()); - InitializeListHead(&Win32Thread->WindowListHead); - InitializeListHead(&Win32Thread->W32CallbackListHead); - InitializeListHead(&Win32Thread->PtiLink); + InitializeListHead(&ptiCurrent->WindowListHead); + InitializeListHead(&ptiCurrent->W32CallbackListHead); + InitializeListHead(&ptiCurrent->PtiLink); for (i = 0; i < NB_HOOKS; i++) { - InitializeListHead(&Win32Thread->aphkStart[i]); - } - - Win32Thread->TIF_flags &= ~TIF_INCLEANUP; - co_IntDestroyCaret(Win32Thread); - Win32Thread->ppi = PsGetCurrentProcessWin32Process(); - Win32Thread->ptiSibling = Win32Thread->ppi->ptiList; - Win32Thread->ppi->ptiList = Win32Thread; - Win32Thread->ppi->cThreads++; - if (Win32Thread->rpdesk && !Win32Thread->pDeskInfo) - { - Win32Thread->pDeskInfo = Win32Thread->rpdesk->pDeskInfo; - } - Win32Thread->MessageQueue = MsqCreateMessageQueue(Thread); - Win32Thread->KeyboardLayout = W32kGetDefaultKeyLayout(); - Win32Thread->pEThread = Thread; + InitializeListHead(&ptiCurrent->aphkStart[i]); + } + + ptiCurrent->TIF_flags &= ~TIF_INCLEANUP; + co_IntDestroyCaret(ptiCurrent); + ptiCurrent->ppi = PsGetCurrentProcessWin32Process(); + ptiCurrent->ptiSibling = ptiCurrent->ppi->ptiList; + ptiCurrent->ppi->ptiList = ptiCurrent; + ptiCurrent->ppi->cThreads++; + if (ptiCurrent->rpdesk && !ptiCurrent->pDeskInfo) + { + ptiCurrent->pDeskInfo = ptiCurrent->rpdesk->pDeskInfo; + } + ptiCurrent->MessageQueue = MsqCreateMessageQueue(Thread); + ptiCurrent->KeyboardLayout = W32kGetDefaultKeyLayout(); + ptiCurrent->pEThread = Thread; /* HAAAAAAAACK! This should go to Win32kProcessCallback */ - if(Win32Thread->ppi->hdeskStartup == NULL) + if(ptiCurrent->ppi->hdeskStartup == NULL) { /* * inherit the thread desktop and process window station (if not yet inherited) from the process startup @@ -313,8 +317,8 @@ if(NT_SUCCESS(Status)) { - Win32Thread->ppi->hdeskStartup = hDesk; - Win32Thread->ppi->rpdeskStartup = pdesk; + ptiCurrent->ppi->hdeskStartup = hDesk; + ptiCurrent->ppi->rpdeskStartup = pdesk; } } } @@ -324,9 +328,9 @@ } } - if (Win32Thread->ppi->hdeskStartup != NULL) - { - if (!IntSetThreadDesktop(Win32Thread->ppi->hdeskStartup, FALSE)) + if (ptiCurrent->ppi->hdeskStartup != NULL) + { + if (!IntSetThreadDesktop(ptiCurrent->ppi->hdeskStartup, FALSE)) { DPRINT1("Unable to set thread desktop\n"); } @@ -336,20 +340,21 @@ if (pTeb) { /* Attempt to startup client support which should have been initialized in IntSetThreadDesktop. */ PCLIENTINFO pci = (PCLIENTINFO)pTeb->Win32ClientInfo; - Win32Thread->pClientInfo = pci; - pci->ppi = Win32Thread->ppi; - pci->fsHooks = Win32Thread->fsHooks; - if (Win32Thread->KeyboardLayout) pci->hKL = Win32Thread->KeyboardLayout->hkl; - pci->dwTIFlags = Win32Thread->TIF_flags; + ptiCurrent->pClientInfo = pci; + pci->ppi = ptiCurrent->ppi; + pci->fsHooks = ptiCurrent->fsHooks; + if (ptiCurrent->KeyboardLayout) pci->hKL = ptiCurrent->KeyboardLayout->hkl; + pci->dwTIFlags = ptiCurrent->TIF_flags; + /* CI may not have been initialized. */ - if (!pci->pDeskInfo && Win32Thread->pDeskInfo) + if (!pci->pDeskInfo && ptiCurrent->pDeskInfo) { if (!pci->ulClientDelta) pci->ulClientDelta = DesktopHeapGetUserDelta(); - pci->pDeskInfo = (PVOID)((ULONG_PTR)Win32Thread->pDeskInfo - pci->ulClientDelta); + pci->pDeskInfo = (PVOID)((ULONG_PTR)ptiCurrent->pDeskInfo - pci->ulClientDelta); } - if (Win32Thread->pcti && pci->pDeskInfo) - pci->pClientThreadInfo = (PVOID)((ULONG_PTR)Win32Thread->pcti - pci->ulClientDelta); + if (ptiCurrent->pcti && pci->pDeskInfo) + pci->pClientThreadInfo = (PVOID)((ULONG_PTR)ptiCurrent->pcti - pci->ulClientDelta); else pci->pClientThreadInfo = NULL; } @@ -357,60 +362,62 @@ { DPRINT1("No TEB for this Thread!\n"); // System thread running! Now SendMessage should be okay. - Win32Thread->pcti = &Win32Thread->cti; + ptiCurrent->pcti = &ptiCurrent->cti; } GetW32ThreadInfo(); } else { PTHREADINFO pti; - PSINGLE_LIST_ENTRY e; + PSINGLE_LIST_ENTRY psle; DPRINT("Destroying W32 thread TID:%d at IRQ level: %lu\n", Thread->Cid.UniqueThread, KeGetCurrentIrql()); - Win32Thread->TIF_flags |= TIF_INCLEANUP; - pti = Win32Thread->ppi->ptiList; - if (pti == Win32Thread) - { - Win32Thread->ppi->ptiList = Win32Thread->ptiSibling; - Win32Thread->ppi->cThreads--; + ptiCurrent->TIF_flags |= TIF_INCLEANUP; + pti = ptiCurrent->ppi->ptiList; + if (pti == ptiCurrent) + { + ptiCurrent->ppi->ptiList = ptiCurrent->ptiSibling; + ptiCurrent->ppi->cThreads--; } else { do { - if (pti->ptiSibling == Win32Thread) + if (pti->ptiSibling == ptiCurrent) { - pti->ptiSibling = Win32Thread->ptiSibling; - Win32Thread->ppi->cThreads--; + pti->ptiSibling = ptiCurrent->ptiSibling; + ptiCurrent->ppi->cThreads--; break; } pti = pti->ptiSibling; } while (pti); } - DceFreeThreadDCE(Win32Thread); + DceFreeThreadDCE(ptiCurrent); HOOK_DestroyThreadHooks(Thread); EVENT_DestroyThreadEvents(Thread); + /* Cleanup timers */ - DestroyTimersForThread(Win32Thread); - KeSetEvent(Win32Thread->MessageQueue->NewMessages, IO_NO_INCREMENT, FALSE); + DestroyTimersForThread(ptiCurrent); + KeSetEvent(ptiCurrent->MessageQueue->NewMessages, IO_NO_INCREMENT, FALSE); UnregisterThreadHotKeys(Thread); + /* what if this co_ func crash in umode? what will clean us up then? */ co_DestroyThreadWindows(Thread); - IntBlockInput(Win32Thread, FALSE); - MsqDestroyMessageQueue(Win32Thread->MessageQueue); - IntCleanupThreadCallbacks(Win32Thread); + IntBlockInput(ptiCurrent, FALSE); + MsqDestroyMessageQueue(ptiCurrent->MessageQueue); + IntCleanupThreadCallbacks(ptiCurrent); /* cleanup user object references stack */ - e = PopEntryList(&Win32Thread->ReferencesList); - while (e) - { - PUSER_REFERENCE_ENTRY ref = CONTAINING_RECORD(e, USER_REFERENCE_ENTRY, Entry); + psle = PopEntryList(&ptiCurrent->ReferencesList); + while (psle) + { + PUSER_REFERENCE_ENTRY ref = CONTAINING_RECORD(psle, USER_REFERENCE_ENTRY, Entry); DPRINT("thread clean: remove reference obj 0x%x\n",ref->obj); UserDereferenceObject(ref->obj); - e = PopEntryList(&Win32Thread->ReferencesList); + psle = PopEntryList(&ptiCurrent->ReferencesList); } IntSetThreadDesktop(NULL, TRUE); @@ -418,12 +425,13 @@ PsSetThreadWin32Thread(Thread, NULL); } - RETURN( STATUS_SUCCESS); - -CLEANUP: + Status = STATUS_SUCCESS; + +leave: UserLeave(); - DPRINT("Leave Win32kThreadCallback, ret=%i\n",_ret_); - END_CLEANUP; + DPRINT("Leave Win32kThreadCallback, Status=0x%lx\n",Status); + + return Status; } NTSTATUS
13 years, 3 months
1
0
0
0
[jgardou] 53205: [SETUPAPI] - fix typo
by jgardou@svn.reactos.org
Author: jgardou Date: Sat Aug 13 15:55:16 2011 New Revision: 53205 URL:
http://svn.reactos.org/svn/reactos?rev=53205&view=rev
Log: [SETUPAPI] - fix typo Modified: trunk/reactos/dll/win32/setupapi/driver.c Modified: trunk/reactos/dll/win32/setupapi/driver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/driver.…
============================================================================== --- trunk/reactos/dll/win32/setupapi/driver.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/driver.c [iso-8859-1] Sat Aug 13 15:55:16 2011 @@ -609,7 +609,7 @@ if ((dwFlags & RRF_RT_DWORD) == RRF_RT_DWORD) cbExpect = 4; - else if ((dwFlags & RRF_RT_DWORD) == RRF_RT_QWORD) + else if ((dwFlags & RRF_RT_QWORD) == RRF_RT_QWORD) cbExpect = 8; if (cbExpect && cbData != cbExpect)
13 years, 3 months
1
0
0
0
[tkreuzer] 53204: [USER32] Partly sync static.c with wine, reduce diff between ros and wine code. The leak fix is taken care of. Also go back from Get/SetWindowLongPtr to Get/SetWindowLong for LONG...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Aug 13 15:16:31 2011 New Revision: 53204 URL:
http://svn.reactos.org/svn/reactos?rev=53204&view=rev
Log: [USER32] Partly sync static.c with wine, reduce diff between ros and wine code. The leak fix is taken care of. Also go back from Get/SetWindowLongPtr to Get/SetWindowLong for LONG values. Using the *Ptr version is wrong for LONG values! Modified: trunk/reactos/dll/win32/user32/controls/static.c trunk/reactos/dll/win32/user32/include/user32p.h Modified: trunk/reactos/dll/win32/user32/controls/static.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
============================================================================== --- trunk/reactos/dll/win32/user32/controls/static.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/controls/static.c [iso-8859-1] Sat Aug 13 15:16:31 2011 @@ -55,15 +55,13 @@ static void STATIC_PaintBitmapfn( HWND hwnd, HDC hdc, DWORD style ); static void STATIC_PaintEnhMetafn( HWND hwnd, HDC hdc, DWORD style ); static void STATIC_PaintEtchedfn( HWND hwnd, HDC hdc, DWORD style ); -//static LRESULT WINAPI StaticWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); -//static LRESULT WINAPI StaticWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); static COLORREF color_3dshadow, color_3ddkshadow, color_3dhighlight; /* offsets for GetWindowLong for static private information */ #define HFONT_GWL_OFFSET 0 #define HICON_GWL_OFFSET (sizeof(HFONT)) -#define UISTATE_GWL_OFFSET (HICON_GWL_OFFSET+sizeof(HICON)) +#define UISTATE_GWL_OFFSET (HICON_GWL_OFFSET+sizeof(HICON)) // ReactOS: keep in sync with STATIC_UISTATE_GWL_OFFSET #define STATIC_EXTRA_BYTES (UISTATE_GWL_OFFSET + sizeof(LONG)) typedef void (*pfPaint)( HWND hwnd, HDC hdc, DWORD style ); @@ -107,40 +105,6 @@ 0 /* brush */ }; -/* REACTOS ONLY */ -static __inline void set_ui_state( HWND hwnd, LONG flags ) -{ - SetWindowLongPtrW( hwnd, UISTATE_GWL_OFFSET, flags ); -} - -static __inline LONG get_ui_state( HWND hwnd ) -{ - return GetWindowLongPtrW( hwnd, UISTATE_GWL_OFFSET ); -} - -/* Retrieve the UI state for the control */ -static BOOL STATIC_update_uistate(HWND hwnd, BOOL unicode) -{ - LONG flags, prevflags; - - if (unicode) - flags = DefWindowProcW(hwnd, WM_QUERYUISTATE, 0, 0); - else - flags = DefWindowProcA(hwnd, WM_QUERYUISTATE, 0, 0); - - prevflags = get_ui_state(hwnd); - - if (prevflags != flags) - { - set_ui_state(hwnd, flags); - return TRUE; - } - - return FALSE; -} - -/* END REACTOS ONLY */ - static void setup_clipping(HWND hwnd, HDC hdc, HRGN *orig) { RECT rc; @@ -172,28 +136,22 @@ /*********************************************************************** * STATIC_SetIcon * - * Set the icon for an SS_ICON control. Modified for ReactOS + * Set the icon for an SS_ICON control. */ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style ) { HICON prevIcon; - ICONINFO info; + SIZE size; if ((style & SS_TYPEMASK) != SS_ICON) return 0; - if (hicon && (!GetIconInfo(hicon, &info))) { - WARN("hicon != 0, but info == 0\n"); + if (hicon && !get_icon_size( hicon, &size )) + { + WARN("hicon != 0, but invalid\n"); return 0; } prevIcon = (HICON)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hicon ); if (hicon && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL)) { - BITMAP bm; - - if (!GetObjectW(info.hbmColor, sizeof(BITMAP), &bm)) - { - return 0; - } - /* Windows currently doesn't implement SS_RIGHTJUST */ /* if ((style & SS_RIGHTJUST) != 0) @@ -205,12 +163,8 @@ } else */ { - SetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight, - SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER ); - } - - DeleteObject(info.hbmMask); - if (info.hbmColor) DeleteObject(info.hbmColor); + SetWindowPos( hwnd, 0, 0, 0, size.cx, size.cy, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER ); + } } return prevIcon; } @@ -218,7 +172,7 @@ /*********************************************************************** * STATIC_SetBitmap * - * Set the bitmap for an SS_BITMAP control. Modified for ReactOS + * Set the bitmap for an SS_BITMAP control. */ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style ) { @@ -331,13 +285,13 @@ if (hInstance && ((ULONG_PTR)hInstance >> 16)) { - if ((style & SS_REALSIZEIMAGE) != 0) - hicon = LoadImageW(hInstance, name, IMAGE_ICON, 0, 0, LR_SHARED); - else - { - hicon = LoadIconW( hInstance, name ); - if (!hicon) hicon = LoadCursorW( hInstance, name ); - } + if ((style & SS_REALSIZEIMAGE) != 0) + hicon = LoadImageW(hInstance, name, IMAGE_ICON, 0, 0, LR_SHARED); + else + { + hicon = LoadIconW( hInstance, name ); + if (!hicon) hicon = LoadCursorW( hInstance, name ); + } } if (!hicon) hicon = LoadIconW( 0, name ); /* Windows doesn't try to load a standard cursor, @@ -346,7 +300,6 @@ return hicon; } - /*********************************************************************** * STATIC_TryPaintFcn * @@ -362,11 +315,11 @@ { HDC hdc; HRGN hOrigClipping; - + hdc = GetDC( hwnd ); setup_clipping(hwnd, hdc, &hOrigClipping); (staticPaintFunc[style])( hwnd, hdc, full_style ); - restore_clipping(hdc, hOrigClipping); + restore_clipping(hdc, hOrigClipping); ReleaseDC( hwnd, hdc ); } } @@ -420,11 +373,10 @@ /*********************************************************************** * StaticWndProc_common */ -LRESULT WINAPI StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, - LPARAM lParam, BOOL unicode ) +LRESULT WINAPI StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL unicode ) // ReactOS { LRESULT lResult = 0; - LONG full_style = GetWindowLongPtrW( hwnd, GWL_STYLE ); + LONG full_style = GetWindowLongW( hwnd, GWL_STYLE ); LONG style = full_style & SS_TYPEMASK; #ifdef __REACTOS__ PWND pWnd; @@ -436,8 +388,10 @@ { NtUserSetWindowFNID(hwnd, FNID_STATIC); } - } -#endif + } +#endif + + if (!IsWindow( hwnd )) return 0; switch (uMsg) { @@ -447,7 +401,7 @@ ERR("Unknown style 0x%02lx\n", style ); return -1; } - STATIC_update_uistate(hwnd, unicode); + STATIC_update_uistate(hwnd, unicode); // ReactOS r30727 STATIC_InitColours(); break; @@ -470,8 +424,8 @@ DefWindowProcA(hwnd, uMsg, wParam, lParam); case WM_ERASEBKGND: - /* do all painting in WM_PAINT like Windows does */ - return 1; + /* do all painting in WM_PAINT like Windows does */ + return 1; case WM_PRINTCLIENT: case WM_PAINT: @@ -510,47 +464,31 @@ case WM_NCCREATE: { - LPCSTR textA; - LPCWSTR textW; - HINSTANCE hInstance; + CREATESTRUCTW *cs = (CREATESTRUCTW *)lParam; if (full_style & SS_SUNKEN) - SetWindowLongPtrW( hwnd, GWL_EXSTYLE, - GetWindowLongPtrW( hwnd, GWL_EXSTYLE ) | WS_EX_STATICEDGE ); - - if(unicode) - { - textA = NULL; - textW = ((LPCREATESTRUCTW)lParam)->lpszName; - } - else - { - textA = ((LPCREATESTRUCTA)lParam)->lpszName; - textW = NULL; - - } - - hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE ); + SetWindowLongW( hwnd, GWL_EXSTYLE, + GetWindowLongW( hwnd, GWL_EXSTYLE ) | WS_EX_STATICEDGE ); switch (style) { case SS_ICON: { HICON hIcon; - if(unicode ) - hIcon = STATIC_LoadIconW(hInstance, textW, full_style); + if (unicode || IS_INTRESOURCE(cs->lpszName)) + hIcon = STATIC_LoadIconW(cs->hInstance, cs->lpszName, full_style); else - hIcon = STATIC_LoadIconA(hInstance, textA, full_style); + hIcon = STATIC_LoadIconA(cs->hInstance, (LPCSTR)cs->lpszName, full_style); STATIC_SetIcon(hwnd, hIcon, full_style); } break; case SS_BITMAP: - if ((ULONG_PTR)hInstance >> 16) + if ((ULONG_PTR)cs->hInstance >> 16) { HBITMAP hBitmap; - if(unicode) - hBitmap = LoadBitmapW(hInstance, textW); + if (unicode || IS_INTRESOURCE(cs->lpszName)) + hBitmap = LoadBitmapW(cs->hInstance, cs->lpszName); else - hBitmap = LoadBitmapA(hInstance, textA); + hBitmap = LoadBitmapA(cs->hInstance, (LPCSTR)cs->lpszName); STATIC_SetBitmap(hwnd, hBitmap, full_style); } break; @@ -619,16 +557,16 @@ case STM_SETIMAGE: switch(wParam) { case IMAGE_BITMAP: - if (style != SS_BITMAP) return 0; + if (style != SS_BITMAP) return 0; // ReactOS r43158 lResult = (LRESULT)STATIC_SetBitmap( hwnd, (HBITMAP)lParam, full_style ); break; case IMAGE_ENHMETAFILE: - if (style != SS_ENHMETAFILE) return 0; + if (style != SS_ENHMETAFILE) return 0; // ReactOS r43158 lResult = (LRESULT)STATIC_SetEnhMetaFile( hwnd, (HENHMETAFILE)lParam, full_style ); break; case IMAGE_ICON: case IMAGE_CURSOR: - if (style != SS_ICON) return 0; + if (style != SS_ICON) return 0; // ReactOS r43158 lResult = (LRESULT)STATIC_SetIcon( hwnd, (HICON)lParam, full_style ); break; default: @@ -643,6 +581,7 @@ STATIC_TryPaintFcn( hwnd, full_style ); break; +#ifdef __REACTOS__ case WM_UPDATEUISTATE: if (unicode) DefWindowProcW(hwnd, uMsg, wParam, lParam); @@ -654,6 +593,7 @@ RedrawWindow( hwnd, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN ); } break; +#endif default: return unicode ? DefWindowProcW(hwnd, uMsg, wParam, lParam) : @@ -745,7 +685,7 @@ if (style & SS_NOPREFIX) wFormat |= DT_NOPREFIX; - else if (get_ui_state(hwnd) & UISF_HIDEACCEL) + else if (GetWindowLongW(hwnd, UISTATE_GWL_OFFSET) & UISF_HIDEACCEL) // ReactOS r30727 wFormat |= DT_HIDEPREFIX; if ((style & SS_TYPEMASK) != SS_SIMPLE) @@ -781,9 +721,9 @@ while ((len = InternalGetWindowText( hwnd, text, buf_size )) == buf_size - 1) { - buf_size *= 2; - if (!(text = HeapReAlloc( GetProcessHeap(), 0, text, buf_size * sizeof(WCHAR) ))) - goto no_TextOut; + buf_size *= 2; + if (!(text = HeapReAlloc( GetProcessHeap(), 0, text, buf_size * sizeof(WCHAR) ))) + goto no_TextOut; } if (!len) goto no_TextOut; @@ -850,6 +790,7 @@ } DeleteObject( hBrush ); } + static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style ) { @@ -969,4 +910,3 @@ break; } } - Modified: trunk/reactos/dll/win32/user32/include/user32p.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/u…
============================================================================== --- trunk/reactos/dll/win32/user32/include/user32p.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/include/user32p.h [iso-8859-1] Sat Aug 13 15:16:31 2011 @@ -214,4 +214,28 @@ #define __EXCEPT_PAGE_FAULT else #define __ENDTRY +#define STATIC_UISTATE_GWL_OFFSET (sizeof(HFONT)+sizeof(HICON))// see UISTATE_GWL_OFFSET in static.c + +/* Retrieve the UI state for the control */ +static __inline BOOL STATIC_update_uistate(HWND hwnd, BOOL unicode) +{ + LONG flags, prevflags; + + if (unicode) + flags = DefWindowProcW(hwnd, WM_QUERYUISTATE, 0, 0); + else + flags = DefWindowProcA(hwnd, WM_QUERYUISTATE, 0, 0); + + prevflags = GetWindowLongW(hwnd, STATIC_UISTATE_GWL_OFFSET); + + if (prevflags != flags) + { + SetWindowLongW(hwnd, STATIC_UISTATE_GWL_OFFSET, flags); + return TRUE; + } + + return FALSE; +} + + /* EOF */
13 years, 3 months
1
0
0
0
[cgutman] 53203: [NTOSKRNL] - Display the loading message for drivers loaded by the PnP manager during boot - Maybe now NDIS.SYS won't get all the blame for boot hangs ; )
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Aug 13 14:28:45 2011 New Revision: 53203 URL:
http://svn.reactos.org/svn/reactos?rev=53203&view=rev
Log: [NTOSKRNL] - Display the loading message for drivers loaded by the PnP manager during boot - Maybe now NDIS.SYS won't get all the blame for boot hangs ;) Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/driver.c…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] Sat Aug 13 14:28:45 2011 @@ -396,6 +396,10 @@ { DPRINT("Loading module\n"); Status = MmLoadSystemImage(&ServiceImagePath, NULL, NULL, 0, (PVOID)ModuleObject, &BaseAddress); + if (NT_SUCCESS(Status)) + { + IopDisplayLoadingMessage(ServiceName); + } } ExFreePool(ServiceImagePath.Buffer);
13 years, 3 months
1
0
0
0
[ekohl] 53202: [ADVAPI32] Fix QueryServiceConfigEx[A/W]: - If lpServiceConfig is NULL or cbBufSize is less than sizeof(QUERY_SERVICE_CONFIGA/W) pass a pointer to an internal status buffer to RQuery...
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Aug 13 14:26:55 2011 New Revision: 53202 URL:
http://svn.reactos.org/svn/reactos?rev=53202&view=rev
Log: [ADVAPI32] Fix QueryServiceConfigEx[A/W]: - If lpServiceConfig is NULL or cbBufSize is less than sizeof(QUERY_SERVICE_CONFIGA/W) pass a pointer to an internal status buffer to RQueryServiceConfigA/W. - Revert r53153 and r53154. Adding 'in' and 'unique' attributes is NOT an option because this is not compatible with Windows. Modified: trunk/reactos/dll/win32/advapi32/service/scm.c trunk/reactos/include/reactos/idl/svcctl.idl Modified: trunk/reactos/dll/win32/advapi32/service/scm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
============================================================================== --- trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] Sat Aug 13 14:26:55 2011 @@ -1835,17 +1835,32 @@ DWORD cbBufSize, LPDWORD pcbBytesNeeded) { + QUERY_SERVICE_CONFIGA ServiceConfig; + LPQUERY_SERVICE_CONFIGA lpConfigPtr; + DWORD dwBufferSize; DWORD dwError; TRACE("QueryServiceConfigA(%p, %p, %lu, %p)\n", hService, lpServiceConfig, cbBufSize, pcbBytesNeeded); + if (lpServiceConfig == NULL || + cbBufSize < sizeof(QUERY_SERVICE_CONFIGA)) + { + lpConfigPtr = &ServiceConfig; + dwBufferSize = sizeof(QUERY_SERVICE_CONFIGA); + } + else + { + lpConfigPtr = lpServiceConfig; + dwBufferSize = cbBufSize; + } + RpcTryExcept { /* Call to services.exe using RPC */ dwError = RQueryServiceConfigA((SC_RPC_HANDLE)hService, - (LPBYTE)lpServiceConfig, - cbBufSize, + (LPBYTE)lpConfigPtr, + dwBufferSize, pcbBytesNeeded); } RpcExcept(EXCEPTION_EXECUTE_HANDLER) @@ -1862,30 +1877,30 @@ } /* Adjust the pointers */ - if (lpServiceConfig->lpBinaryPathName) - lpServiceConfig->lpBinaryPathName = - (LPSTR)((ULONG_PTR)lpServiceConfig + - (ULONG_PTR)lpServiceConfig->lpBinaryPathName); - - if (lpServiceConfig->lpLoadOrderGroup) - lpServiceConfig->lpLoadOrderGroup = - (LPSTR)((ULONG_PTR)lpServiceConfig + - (ULONG_PTR)lpServiceConfig->lpLoadOrderGroup); - - if (lpServiceConfig->lpDependencies) - lpServiceConfig->lpDependencies = - (LPSTR)((ULONG_PTR)lpServiceConfig + - (ULONG_PTR)lpServiceConfig->lpDependencies); - - if (lpServiceConfig->lpServiceStartName) - lpServiceConfig->lpServiceStartName = - (LPSTR)((ULONG_PTR)lpServiceConfig + - (ULONG_PTR)lpServiceConfig->lpServiceStartName); - - if (lpServiceConfig->lpDisplayName) - lpServiceConfig->lpDisplayName = - (LPSTR)((ULONG_PTR)lpServiceConfig + - (ULONG_PTR)lpServiceConfig->lpDisplayName); + if (lpConfigPtr->lpBinaryPathName) + lpConfigPtr->lpBinaryPathName = + (LPSTR)((ULONG_PTR)lpConfigPtr + + (ULONG_PTR)lpConfigPtr->lpBinaryPathName); + + if (lpConfigPtr->lpLoadOrderGroup) + lpConfigPtr->lpLoadOrderGroup = + (LPSTR)((ULONG_PTR)lpConfigPtr + + (ULONG_PTR)lpConfigPtr->lpLoadOrderGroup); + + if (lpConfigPtr->lpDependencies) + lpConfigPtr->lpDependencies = + (LPSTR)((ULONG_PTR)lpConfigPtr + + (ULONG_PTR)lpConfigPtr->lpDependencies); + + if (lpConfigPtr->lpServiceStartName) + lpConfigPtr->lpServiceStartName = + (LPSTR)((ULONG_PTR)lpConfigPtr + + (ULONG_PTR)lpConfigPtr->lpServiceStartName); + + if (lpConfigPtr->lpDisplayName) + lpConfigPtr->lpDisplayName = + (LPSTR)((ULONG_PTR)lpConfigPtr + + (ULONG_PTR)lpConfigPtr->lpDisplayName); TRACE("QueryServiceConfigA() done\n"); @@ -1904,20 +1919,32 @@ DWORD cbBufSize, LPDWORD pcbBytesNeeded) { + QUERY_SERVICE_CONFIGW ServiceConfig; + LPQUERY_SERVICE_CONFIGW lpConfigPtr; + DWORD dwBufferSize; DWORD dwError; TRACE("QueryServiceConfigW(%p, %p, %lu, %p)\n", hService, lpServiceConfig, cbBufSize, pcbBytesNeeded); - - if(pcbBytesNeeded) - *pcbBytesNeeded = 0; - + + if (lpServiceConfig == NULL || + cbBufSize < sizeof(QUERY_SERVICE_CONFIGW)) + { + lpConfigPtr = &ServiceConfig; + dwBufferSize = sizeof(QUERY_SERVICE_CONFIGW); + } + else + { + lpConfigPtr = lpServiceConfig; + dwBufferSize = cbBufSize; + } + RpcTryExcept { /* Call to services.exe using RPC */ dwError = RQueryServiceConfigW((SC_RPC_HANDLE)hService, - (LPBYTE)lpServiceConfig, - cbBufSize, + (LPBYTE)lpConfigPtr, + dwBufferSize, pcbBytesNeeded); } RpcExcept(EXCEPTION_EXECUTE_HANDLER) @@ -1934,30 +1961,30 @@ } /* Adjust the pointers */ - if (lpServiceConfig->lpBinaryPathName) - lpServiceConfig->lpBinaryPathName = - (LPWSTR)((ULONG_PTR)lpServiceConfig + - (ULONG_PTR)lpServiceConfig->lpBinaryPathName); - - if (lpServiceConfig->lpLoadOrderGroup) - lpServiceConfig->lpLoadOrderGroup = - (LPWSTR)((ULONG_PTR)lpServiceConfig + - (ULONG_PTR)lpServiceConfig->lpLoadOrderGroup); - - if (lpServiceConfig->lpDependencies) - lpServiceConfig->lpDependencies = - (LPWSTR)((ULONG_PTR)lpServiceConfig + - (ULONG_PTR)lpServiceConfig->lpDependencies); - - if (lpServiceConfig->lpServiceStartName) - lpServiceConfig->lpServiceStartName = - (LPWSTR)((ULONG_PTR)lpServiceConfig + - (ULONG_PTR)lpServiceConfig->lpServiceStartName); - - if (lpServiceConfig->lpDisplayName) - lpServiceConfig->lpDisplayName = - (LPWSTR)((ULONG_PTR)lpServiceConfig + - (ULONG_PTR)lpServiceConfig->lpDisplayName); + if (lpConfigPtr->lpBinaryPathName) + lpConfigPtr->lpBinaryPathName = + (LPWSTR)((ULONG_PTR)lpConfigPtr + + (ULONG_PTR)lpConfigPtr->lpBinaryPathName); + + if (lpConfigPtr->lpLoadOrderGroup) + lpConfigPtr->lpLoadOrderGroup = + (LPWSTR)((ULONG_PTR)lpConfigPtr + + (ULONG_PTR)lpConfigPtr->lpLoadOrderGroup); + + if (lpConfigPtr->lpDependencies) + lpConfigPtr->lpDependencies = + (LPWSTR)((ULONG_PTR)lpConfigPtr + + (ULONG_PTR)lpConfigPtr->lpDependencies); + + if (lpConfigPtr->lpServiceStartName) + lpConfigPtr->lpServiceStartName = + (LPWSTR)((ULONG_PTR)lpConfigPtr + + (ULONG_PTR)lpConfigPtr->lpServiceStartName); + + if (lpConfigPtr->lpDisplayName) + lpConfigPtr->lpDisplayName = + (LPWSTR)((ULONG_PTR)lpConfigPtr + + (ULONG_PTR)lpConfigPtr->lpDisplayName); TRACE("QueryServiceConfigW() done\n"); Modified: trunk/reactos/include/reactos/idl/svcctl.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/svcctl…
============================================================================== --- trunk/reactos/include/reactos/idl/svcctl.idl [iso-8859-1] (original) +++ trunk/reactos/include/reactos/idl/svcctl.idl [iso-8859-1] Sat Aug 13 14:26:55 2011 @@ -435,10 +435,10 @@ /* Function 17 */ DWORD RQueryServiceConfigW( [in] SC_RPC_HANDLE hService, - [in, out, size_is(cbBufSize), unique] LPBYTE lpServiceConfig, + [out, size_is(cbBufSize)] LPBYTE lpServiceConfig, /* FIXME: should be [out] LPQUERY_SERVICE_CONFIGW lpServiceConfig, */ [in, range(0, 1024*8)] DWORD cbBufSize, - [in, out, unique] LPBOUNDED_DWORD_8K pcbBytesNeeded); + [out] LPBOUNDED_DWORD_8K pcbBytesNeeded); /* Function 18 */ DWORD RQueryServiceLockStatusW( @@ -547,10 +547,10 @@ /* Function 29 */ DWORD RQueryServiceConfigA( [in] SC_RPC_HANDLE hService, - [in, out, size_is(cbBufSize), unique] LPBYTE lpServiceConfig, + [out, size_is(cbBufSize)] LPBYTE lpServiceConfig, /* FIXME: should be [out] LPQUERY_SERVICE_CONFIGA lpServiceConfig, */ [in, range(0, 1024*8)] DWORD cbBufSize, - [in, out, unique] LPBOUNDED_DWORD_8K pcbBytesNeeded); + [out] LPBOUNDED_DWORD_8K pcbBytesNeeded); /* Function 30 */ DWORD RQueryServiceLockStatusA(
13 years, 3 months
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
50
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Results per page:
10
25
50
100
200