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
March 2020
----- 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
25 participants
156 discussions
Start a n
N
ew thread
[reactos] 01/01: [PSDK] Extend struct _SECPKG_DLL_FUNCTIONS, fix definitions.
by Andreas Maier
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=11fe17c3a1dfcdcbdff8f…
commit 11fe17c3a1dfcdcbdff8fe872c7c91fc58546a86 Author: Andreas Maier <staubim(a)quantentunnel.de> AuthorDate: Tue Jan 7 19:06:37 2020 +0100 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Wed Mar 4 07:02:37 2020 +0100 [PSDK] Extend struct _SECPKG_DLL_FUNCTIONS, fix definitions. * Add missing enums to MSV1_0_PROTOCOL_MESSAGE_TYPE and SECPKG_EXTENDED_INFORMATION_CLASS * Add missing function entries to LSA_SECPKG_FUNCTION_TABLE and add needed definitions. * Fix params of PLSA_AP_CALL_PACKAGE * Fix SpInitializeFn (+ NTAPI) --- sdk/include/psdk/ntsecapi.h | 5 +++- sdk/include/psdk/ntsecpkg.h | 58 ++++++++++++++++++++++++++++++++++++++------- sdk/include/psdk/sspi.h | 13 ++++++++++ 3 files changed, 66 insertions(+), 10 deletions(-) diff --git a/sdk/include/psdk/ntsecapi.h b/sdk/include/psdk/ntsecapi.h index 52e9407dc06..c9f6073f4c8 100644 --- a/sdk/include/psdk/ntsecapi.h +++ b/sdk/include/psdk/ntsecapi.h @@ -226,7 +226,10 @@ typedef enum _MSV1_0_PROTOCOL_MESSAGE_TYPE { MsV1_0CacheLogon, MsV1_0SubAuth, MsV1_0DeriveCredential, - MsV1_0CacheLookup + MsV1_0CacheLookup, +#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP) + MsV1_0SetProcessOption, +#endif } MSV1_0_PROTOCOL_MESSAGE_TYPE, *PMSV1_0_PROTOCOL_MESSAGE_TYPE; typedef enum _POLICY_LSA_SERVER_ROLE { PolicyServerRoleBackup = 2, diff --git a/sdk/include/psdk/ntsecpkg.h b/sdk/include/psdk/ntsecpkg.h index c10f26b7e38..213fab3c486 100644 --- a/sdk/include/psdk/ntsecpkg.h +++ b/sdk/include/psdk/ntsecpkg.h @@ -51,6 +51,8 @@ typedef enum _SECPKG_EXTENDED_INFORMATION_CLASS SecpkgGssInfo = 1, SecpkgContextThunks, SecpkgMutualAuthLevel, + SecpkgWowClientDll, + SecpkgExtraOids, SecpkgMaxInfo } SECPKG_EXTENDED_INFORMATION_CLASS; @@ -131,9 +133,9 @@ typedef struct _SECPKG_CLIENT_INFO { *PSECPKG_CLIENT_INFO; typedef struct _SECURITY_USER_DATA { - UNICODE_STRING UserName; - UNICODE_STRING LogonDomainName; - UNICODE_STRING LogonServer; + SECURITY_STRING UserName; + SECURITY_STRING LogonDomainName; + SECURITY_STRING LogonServer; PSID pSid; } SECURITY_USER_DATA, *PSECURITY_USER_DATA, SecurityUserData, *PSecurityUserData; @@ -152,6 +154,22 @@ typedef struct _SECPKG_MUTUAL_AUTH_LEVEL { ULONG MutualAuthLevel; } SECPKG_MUTUAL_AUTH_LEVEL, *PSECPKG_MUTUAL_AUTH_LEVEL; +typedef struct _SECPKG_WOW_CLIENT_DLL { + SECURITY_STRING WowClientDllPath; +} SECPKG_WOW_CLIENT_DLL, *PSECPKG_WOW_CLIENT_DLL; + +#define SECPKG_MAX_OID_LENGTH 32 +typedef struct _SECPKG_SERIALIZED_OID { + ULONG OidLength; + ULONG OidAttributes; + UCHAR OidValue[SECPKG_MAX_OID_LENGTH]; +} SECPKG_SERIALIZED_OID, *PSECPKG_SERIALIZED_OID; + +typedef struct _SECPKG_EXTRA_OIDS { + ULONG OidCount; + SECPKG_SERIALIZED_OID Oids[1]; +} SECPKG_EXTRA_OIDS, *PSECPKG_EXTRA_OIDS; + typedef struct _SECPKG_CALL_INFO { ULONG ProcessId; ULONG ThreadId; @@ -165,6 +183,8 @@ typedef struct _SECPKG_EXTENDED_INFORMATION { SECPKG_GSS_INFO GssInfo; SECPKG_CONTEXT_THUNKS ContextThunks; SECPKG_MUTUAL_AUTH_LEVEL MutualAuthLevel; + SECPKG_WOW_CLIENT_DLL WowClientDll; + SECPKG_EXTRA_OIDS ExtraOids; } Info; } SECPKG_EXTENDED_INFORMATION, *PSECPKG_EXTENDED_INFORMATION; @@ -235,8 +255,8 @@ typedef PVOID (NTAPI *PLSA_CREATE_SHARED_MEMORY)(ULONG, ULONG); typedef PVOID (NTAPI *PLSA_ALLOCATE_SHARED_MEMORY)(PVOID, ULONG); typedef VOID (NTAPI *PLSA_FREE_SHARED_MEMORY)(PVOID, PVOID); typedef BOOLEAN (NTAPI *PLSA_DELETE_SHARED_MEMORY)(PVOID); -typedef NTSTATUS (NTAPI *PLSA_OPEN_SAM_USER)(PUNICODE_STRING, SECPKG_NAME_TYPE, - PUNICODE_STRING, BOOLEAN, ULONG, PVOID*); +typedef NTSTATUS (NTAPI *PLSA_OPEN_SAM_USER)(PSECURITY_STRING, SECPKG_NAME_TYPE, + PSECURITY_STRING, BOOLEAN, ULONG, PVOID*); typedef NTSTATUS (NTAPI *PLSA_GET_USER_CREDENTIALS)(PVOID, PVOID *, PULONG, PVOID *, PULONG); typedef NTSTATUS (NTAPI *PLSA_GET_USER_AUTH_DATA)(PVOID, PUCHAR *, PULONG); @@ -247,8 +267,8 @@ typedef NTSTATUS (NTAPI *PLSA_CONVERT_AUTH_DATA_TO_TOKEN)(PVOID, ULONG, typedef NTSTATUS (NTAPI *PLSA_CLIENT_CALLBACK)(PCHAR, ULONG_PTR, ULONG_PTR, PSecBuffer, PSecBuffer); typedef NTSTATUS (NTAPI *PLSA_UPDATE_PRIMARY_CREDENTIALS)(PSECPKG_PRIMARY_CRED, PSECPKG_SUPPLEMENTAL_CRED_ARRAY); -typedef NTSTATUS (NTAPI *PLSA_GET_AUTH_DATA_FOR_USER)(PUNICODE_STRING, - SECPKG_NAME_TYPE, PUNICODE_STRING, PUCHAR *, PULONG, PUNICODE_STRING); +typedef NTSTATUS (NTAPI *PLSA_GET_AUTH_DATA_FOR_USER)(PSECURITY_STRING, + SECPKG_NAME_TYPE, PSECURITY_STRING, PUCHAR *, PULONG, PUNICODE_STRING); typedef NTSTATUS (NTAPI *PLSA_CRACK_SINGLE_NAME)(ULONG, BOOLEAN, PUNICODE_STRING, PUNICODE_STRING, ULONG, PUNICODE_STRING, PUNICODE_STRING, PULONG); @@ -256,6 +276,11 @@ typedef NTSTATUS (NTAPI *PLSA_AUDIT_ACCOUNT_LOGON)(ULONG, BOOLEAN, PUNICODE_STRING, PUNICODE_STRING, PUNICODE_STRING, NTSTATUS); typedef NTSTATUS (NTAPI *PLSA_CALL_PACKAGE_PASSTHROUGH)(PUNICODE_STRING, PVOID, PVOID, ULONG, PVOID*, PULONG, PNTSTATUS); +typedef VOID (NTAPI *PLSA_PROTECT_MEMORY)(PVOID, ULONG); +typedef NTSTATUS (NTAPI *PLSA_OPEN_TOKEN_BY_LOGON_ID)(PLUID, HANDLE *); +typedef NTSTATUS (NTAPI *PLSA_EXPAND_AUTH_DATA_FOR_DOMAIN)(PUCHAR, ULONG, PVOID, PUCHAR *, PULONG); +typedef PVOID (NTAPI *PLSA_ALLOCATE_PRIVATE_HEAP)(SIZE_T); +typedef VOID (NTAPI *PLSA_FREE_PRIVATE_HEAP)(PVOID); /* Dispatch tables of functions used by SSP/AP */ typedef struct _SECPKG_DLL_FUNCTIONS { @@ -322,6 +347,21 @@ typedef struct _LSA_SECPKG_FUNCTION_TABLE { PLSA_CRACK_SINGLE_NAME CrackSingleName; PLSA_AUDIT_ACCOUNT_LOGON AuditAccountLogon; PLSA_CALL_PACKAGE_PASSTHROUGH CallPackagePassthrough; +#ifdef _WINCRED_H_ + CredReadFn *CrediRead; + CredReadDomainCredentialsFn *CrediReadDomainCredentials; + CredFreeCredentialsFn *CrediFreeCredentials; +#else + PLSA_PROTECT_MEMORY DummyFunction1; + PLSA_PROTECT_MEMORY DummyFunction2; + PLSA_PROTECT_MEMORY DummyFunction3; +#endif + PLSA_PROTECT_MEMORY LsaProtectMemory; + PLSA_PROTECT_MEMORY LsaUnprotectMemory; + PLSA_OPEN_TOKEN_BY_LOGON_ID OpenTokenByLogonId; + PLSA_EXPAND_AUTH_DATA_FOR_DOMAIN ExpandAuthDataForDomain; + PLSA_ALLOCATE_PRIVATE_HEAP AllocatePrivateHeap; + PLSA_FREE_PRIVATE_HEAP FreePrivateHeap; } LSA_SECPKG_FUNCTION_TABLE, *PLSA_SECPKG_FUNCTION_TABLE; @@ -330,7 +370,7 @@ typedef NTSTATUS (NTAPI *PLSA_AP_INITIALIZE_PACKAGE)(ULONG, PLSA_DISPATCH_TABLE, PLSA_STRING, PLSA_STRING, PLSA_STRING *); typedef NTSTATUS (NTAPI *PLSA_AP_LOGON_USER)(LPWSTR, LPWSTR, LPWSTR, LPWSTR, DWORD, DWORD, PHANDLE); -typedef NTSTATUS (NTAPI *PLSA_AP_CALL_PACKAGE)(PUNICODE_STRING, PVOID, ULONG, +typedef NTSTATUS (NTAPI *PLSA_AP_CALL_PACKAGE)(PLSA_CLIENT_REQUEST, PVOID, PVOID, ULONG, PVOID *, PULONG, PNTSTATUS); typedef VOID (NTAPI *PLSA_AP_LOGON_TERMINATED)(PLUID); typedef NTSTATUS (NTAPI *PLSA_AP_CALL_PACKAGE_UNTRUSTED)(PLSA_CLIENT_REQUEST, @@ -345,7 +385,7 @@ typedef NTSTATUS (NTAPI *PLSA_AP_LOGON_USER_EX2)(PLSA_CLIENT_REQUEST, SECURITY_LOGON_TYPE, PVOID, PVOID, ULONG, PVOID *, PULONG, PLUID, PNTSTATUS, PLSA_TOKEN_INFORMATION_TYPE, PVOID *, PUNICODE_STRING *, PUNICODE_STRING *, PUNICODE_STRING *, PSECPKG_PRIMARY_CRED, PSECPKG_SUPPLEMENTAL_CRED_ARRAY *); -typedef NTSTATUS (SpInitializeFn)(ULONG_PTR, PSECPKG_PARAMETERS, +typedef NTSTATUS (NTAPI SpInitializeFn)(ULONG_PTR, PSECPKG_PARAMETERS, PLSA_SECPKG_FUNCTION_TABLE); typedef NTSTATUS (NTAPI SpShutDownFn)(void); typedef NTSTATUS (NTAPI SpGetInfoFn)(PSecPkgInfoW); diff --git a/sdk/include/psdk/sspi.h b/sdk/include/psdk/sspi.h index c436fd85724..648ea3e160c 100644 --- a/sdk/include/psdk/sspi.h +++ b/sdk/include/psdk/sspi.h @@ -77,6 +77,19 @@ typedef struct _SECURITY_INTEGER } SECURITY_INTEGER, *PSECURITY_INTEGER; typedef SECURITY_INTEGER TimeStamp, *PTimeStamp; +// UNICODE_STRING should have the same memory layout in 32 bit and 64 bit mode. +// In 32 bit mode SECURITY_STRING is simply a clone of UNICODE_STRING. +// It is used internal in kernel an security components. +#ifndef _NTDEF_ +typedef struct _SECURITY_STRING { + unsigned short Length; + unsigned short MaximumLength; + unsigned short *Buffer; +} SECURITY_STRING, *PSECURITY_STRING; +#else +typedef UNICODE_STRING SECURITY_STRING, *PSECURITY_STRING; +#endif + #define SSPIPFC_CREDPROV_DO_NOT_SAVE 0x00000001 #define SSPIPFC_NO_CHECKBOX 0x00000002
4 years, 9 months
1
0
0
0
[reactos] 01/01: [WIN32SS] Improve Drawing Scrollbars
by Joachim Henze
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=00adb1a3f967ac7f5cd56…
commit 00adb1a3f967ac7f5cd56b4c39df72a7b3814603 Author: Joachim Henze <Joachim.Henze(a)reactos.org> AuthorDate: Wed Mar 4 02:12:06 2020 +0100 Commit: Joachim Henze <Joachim.Henze(a)reactos.org> CommitDate: Wed Mar 4 02:12:06 2020 +0100 [WIN32SS] Improve Drawing Scrollbars A very nice patch of JIRA user "I_kill_Bugs". Many many Thanks! It addresses: - CORE-14755 fixed, flashing scrollbar triangles (we know 131 affected apps just from rapps!) - CORE-13931 fixed, FamiTracker invisible about-dlg - CORE-14685 improves a bit, but is not entirely fixed - CORE-11561 improves a bit, but is not entirely fixed - The patch avoids unnecessary redraws, speeds up GUI interaction and NSIS install times Jim Tabor had no complains about it, I just did some white-space-tweaks on EOL and indentation. FTR A testbot run (not on master but on 0.4.13-RC-48-g818e5bc)
https://reactos.org/testman/compare.php?ids=71645,71666
VBox LGTM
https://reactos.org/testman/compare.php?ids=71646,71667
KVM LGTM I felt tempted to port back, but decided to play safe and commit to master just. --- win32ss/user/ntuser/scrollbar.c | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/win32ss/user/ntuser/scrollbar.c b/win32ss/user/ntuser/scrollbar.c index 325be6fe491..6bbc7ae7bc6 100644 --- a/win32ss/user/ntuser/scrollbar.c +++ b/win32ss/user/ntuser/scrollbar.c @@ -61,6 +61,9 @@ DBG_DEFAULT_CHANNEL(UserScrollbar); BOOL APIENTRY IntEnableScrollBar(BOOL Horz, PSCROLLBARINFO Info, UINT wArrows); +static void +IntRefeshScrollInterior(PWND pWnd, INT nBar, PSCROLLBARINFO psbi); + /* Ported from WINE20020904 */ /* Compute the scroll bar rectangle, in drawing coordinates (i.e. client coords for SB_CTL, window coords for SB_VERT and @@ -636,13 +639,21 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) if ( co_UserShowScrollBar(Window, nBar, TRUE, TRUE) ) return lpsi->fMask & SIF_PREVIOUSPOS ? OldPos : pSBData->pos; /* SetWindowPos() already did the painting */ if (bRedraw) - { // FIXME: Arrows and interior. - RECTL UpdateRect = psbi->rcScrollBar; - UpdateRect.left -= Window->rcClient.left - Window->rcWindow.left; - UpdateRect.right -= Window->rcClient.left - Window->rcWindow.left; - UpdateRect.top -= Window->rcClient.top - Window->rcWindow.top; - UpdateRect.bottom -= Window->rcClient.top - Window->rcWindow.top; - co_UserRedrawWindow(Window, &UpdateRect, 0, RDW_INVALIDATE | RDW_FRAME); + { + if (action & SA_SSI_REPAINT_ARROWS) + { // Redraw the entire bar. + RECTL UpdateRect = psbi->rcScrollBar; + UpdateRect.left -= Window->rcClient.left - Window->rcWindow.left; + UpdateRect.right -= Window->rcClient.left - Window->rcWindow.left; + UpdateRect.top -= Window->rcClient.top - Window->rcWindow.top; + UpdateRect.bottom -= Window->rcClient.top - Window->rcWindow.top; + co_UserRedrawWindow(Window, &UpdateRect, 0, RDW_INVALIDATE | RDW_FRAME); + } + else + { + // Redraw only the interior part of the bar. + IntRefeshScrollInterior(Window, nBar, psbi); + } } // FIXME: Arrows /* else if( action & SA_SSI_REPAINT_ARROWS ) { @@ -1069,6 +1080,21 @@ IntScrollGetObjectId(INT SBType) return OBJID_CLIENT; } +static void +IntRefeshScrollInterior(PWND pWnd, INT nBar, PSCROLLBARINFO psbi) +{ + HDC hdc; + BOOL Vertical = ((nBar == SB_CTL) ? ((pWnd->style & SBS_VERT) != 0) : (nBar == SB_VERT)); + + hdc = UserGetDCEx(pWnd, NULL, DCX_CACHE | ((nBar == SB_CTL) ? 0 : DCX_WINDOW)); + if (hdc) + { /* Get updated info. */ + co_IntGetScrollBarInfo(pWnd, IntScrollGetObjectId(nBar), psbi); + IntDrawScrollInterior(pWnd, hdc, nBar, Vertical, psbi); + UserReleaseDC(pWnd, hdc, FALSE); + } +} + void IntDrawScrollBar(PWND Wnd, HDC DC, INT Bar) {
4 years, 9 months
1
0
0
0
[reactos] 01/01: [NTOS:MM] Assert PFN lock ownership in MiInsertPageInFreeList.
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6831468ccfdedb4eb8c7c…
commit 6831468ccfdedb4eb8c7cc88ac2a01f35dbfc16b Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Wed Feb 12 21:09:49 2020 +0100 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Mon Mar 2 20:50:54 2020 +0100 [NTOS:MM] Assert PFN lock ownership in MiInsertPageInFreeList. AMD64 initialization previously only raised the IRQL. It now acquires the lock where needed, as i386 does. --- ntoskrnl/mm/ARM3/pfnlist.c | 2 +- ntoskrnl/mm/amd64/init.c | 19 +++++++------------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/ntoskrnl/mm/ARM3/pfnlist.c b/ntoskrnl/mm/ARM3/pfnlist.c index 0373fff2dea..f79a5013250 100644 --- a/ntoskrnl/mm/ARM3/pfnlist.c +++ b/ntoskrnl/mm/ARM3/pfnlist.c @@ -611,7 +611,7 @@ MiInsertPageInFreeList(IN PFN_NUMBER PageFrameIndex) PMMCOLOR_TABLES ColorTable; /* Make sure the page index is valid */ - ASSERT(KeGetCurrentIrql() >= DISPATCH_LEVEL); + MI_ASSERT_PFN_LOCK_HELD(); ASSERT((PageFrameIndex != 0) && (PageFrameIndex <= MmHighestPhysicalPage) && (PageFrameIndex >= MmLowestPhysicalPage)); diff --git a/ntoskrnl/mm/amd64/init.c b/ntoskrnl/mm/amd64/init.c index 6e3344bfe52..104d8b3b1eb 100644 --- a/ntoskrnl/mm/amd64/init.c +++ b/ntoskrnl/mm/amd64/init.c @@ -533,6 +533,7 @@ MiAddDescriptorToDatabase( TYPE_OF_MEMORY MemoryType) { PMMPFN Pfn; + KIRQL OldIrql; ASSERT(!MiIsMemoryTypeInvisible(MemoryType)); @@ -542,6 +543,9 @@ MiAddDescriptorToDatabase( /* Get the last pfn of this descriptor. Note we loop backwards */ Pfn = &MmPfnDatabase[BasePage + PageCount - 1]; + /* Lock the PFN Database */ + OldIrql = MiAcquirePfnLock(); + /* Loop all pages */ while (PageCount--) { @@ -552,6 +556,9 @@ MiAddDescriptorToDatabase( /* Go to the previous page */ Pfn--; } + + /* Release PFN database */ + MiReleasePfnLock(OldIrql); } else if (MemoryType == LoaderXIPRom) { @@ -668,8 +675,6 @@ NTAPI INIT_FUNCTION MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { - KIRQL OldIrql; - ASSERT(MxPfnAllocation != 0); /* Set some hardcoded addresses */ @@ -693,9 +698,6 @@ MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock) MiBuildSystemPteSpace(); - /* Need to be at DISPATCH_LEVEL for MiInsertPageInFreeList */ - KeRaiseIrql(DISPATCH_LEVEL, &OldIrql); - /* Map the PFN database pages */ MiBuildPfnDatabase(LoaderBlock); @@ -705,16 +707,9 @@ MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock) /* PFNs are initialized now! */ MiPfnsInitialized = TRUE; - //KeLowerIrql(OldIrql); - - /* Need to be at DISPATCH_LEVEL for InitializePool */ - //KeRaiseIrql(DISPATCH_LEVEL, &OldIrql); - /* Initialize the nonpaged pool */ InitializePool(NonPagedPool, 0); - KeLowerIrql(OldIrql); - /* Initialize the balancer */ MmInitializeBalancer((ULONG)MmAvailablePages, 0);
4 years, 9 months
1
0
0
0
[reactos] 02/02: [USBHUB] Partially implement USBH_ProcessHubStateChange. CORE-16704
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=67b3b73d82a067066fd20…
commit 67b3b73d82a067066fd2014af9a881580aa68c2b Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Sat Feb 22 10:32:11 2020 +0100 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Mon Mar 2 20:47:01 2020 +0100 [USBHUB] Partially implement USBH_ProcessHubStateChange. CORE-16704 --- drivers/usb/usbhub/usbhub.c | 93 ++++++++++++++++++++++++++++++++++++++++++--- drivers/usb/usbhub/usbhub.h | 4 +- 2 files changed, 89 insertions(+), 8 deletions(-) diff --git a/drivers/usb/usbhub/usbhub.c b/drivers/usb/usbhub/usbhub.c index 33d9259b905..d3e9aa34345 100644 --- a/drivers/usb/usbhub/usbhub.c +++ b/drivers/usb/usbhub/usbhub.c @@ -1358,6 +1358,57 @@ USBH_SyncGetStatus(IN PDEVICE_OBJECT DeviceObject, return NtStatus; } +NTSTATUS +NTAPI +USBH_SyncGetHubStatus(IN PUSBHUB_FDO_EXTENSION HubExtension, + IN PUSB_HUB_STATUS_AND_CHANGE HubStatus, + IN ULONG Length) +{ + BM_REQUEST_TYPE RequestType; + + DPRINT("USBH_SyncGetHubStatus\n"); + + RequestType.B = 0; + RequestType.Recipient = BMREQUEST_TO_DEVICE; + RequestType.Type = BMREQUEST_CLASS; + RequestType.Dir = BMREQUEST_DEVICE_TO_HOST; + + return USBH_Transact(HubExtension, + HubStatus, + Length, + BMREQUEST_DEVICE_TO_HOST, + URB_FUNCTION_CLASS_DEVICE, + RequestType, + USB_REQUEST_GET_STATUS, + 0, + 0); +} + +NTSTATUS +NTAPI +USBH_SyncClearHubStatus(IN PUSBHUB_FDO_EXTENSION HubExtension, + IN USHORT RequestValue) +{ + BM_REQUEST_TYPE RequestType; + + DPRINT("USBH_SyncClearHubStatus: RequestValue - %x\n", RequestValue); + + RequestType.B = 0; + RequestType.Recipient = BMREQUEST_TO_DEVICE; + RequestType.Type = BMREQUEST_CLASS; + RequestType.Dir = BMREQUEST_HOST_TO_DEVICE; + + return USBH_Transact(HubExtension, + NULL, + 0, + BMREQUEST_HOST_TO_DEVICE, + URB_FUNCTION_CLASS_DEVICE, + RequestType, + USB_REQUEST_CLEAR_FEATURE, + RequestValue, + 0); +} + NTSTATUS NTAPI USBH_SyncGetPortStatus(IN PUSBHUB_FDO_EXTENSION HubExtension, @@ -1785,6 +1836,35 @@ USBH_ChangeIndicationQueryChange(IN PUSBHUB_FDO_EXTENSION HubExtension, return Status; } +VOID +NTAPI +USBH_ProcessHubStateChange(IN PUSBHUB_FDO_EXTENSION HubExtension, + IN PUSB_HUB_STATUS_AND_CHANGE HubStatus) +{ + USB_HUB_CHANGE HubStatusChange; + + DPRINT_SCE("USBH_ProcessHubStateChange: HubStatus - %lx\n", HubStatus->AsUlong32); + + HubStatusChange = HubStatus->HubChange; + + if (HubStatusChange.LocalPowerChange) + { + DPRINT1("USBH_ProcessHubStateChange: LocalPowerChange\n"); + USBH_SyncClearHubStatus(HubExtension, + USBHUB_FEATURE_C_HUB_LOCAL_POWER); + } + else if (HubStatusChange.OverCurrentChange) + { + USBH_SyncClearHubStatus(HubExtension, + USBHUB_FEATURE_C_HUB_OVER_CURRENT); + if (HubStatus->HubStatus.OverCurrent) + { + DPRINT1("USBH_ProcessHubStateChange: OverCurrent UNIMPLEMENTED. FIXME\n"); + DbgBreakPoint(); + } + } +} + VOID NTAPI USBH_ProcessPortStateChange(IN PUSBHUB_FDO_EXTENSION HubExtension, @@ -2070,6 +2150,7 @@ USBH_ChangeIndicationWorker(IN PUSBHUB_FDO_EXTENSION HubExtension, PUSBHUB_PORT_PDO_EXTENSION LowerPortExtension; PUSBHUB_STATUS_CHANGE_CONTEXT WorkItem; USB_PORT_STATUS_AND_CHANGE PortStatus; + USB_HUB_STATUS_AND_CHANGE HubStatus; NTSTATUS Status; USHORT Port = 0; @@ -2169,13 +2250,13 @@ Enum: Status = USBH_SyncGetPortStatus(HubExtension, Port, &PortStatus, - sizeof(USB_PORT_STATUS_AND_CHANGE)); + sizeof(PortStatus)); } else { - DPRINT1("USBH_ChangeIndicationWorker: USBH_SyncGetHubStatus() UNIMPLEMENTED. FIXME\n"); - DbgBreakPoint(); - Status = STATUS_ASSERTION_FAILURE; + Status = USBH_SyncGetHubStatus(HubExtension, + &HubStatus, + sizeof(HubStatus)); } if (NT_SUCCESS(Status)) @@ -2188,8 +2269,8 @@ Enum: } else { - DPRINT1("USBH_ChangeIndicationWorker: USBH_ProcessHubStateChange() UNIMPLEMENTED. FIXME\n"); - DbgBreakPoint(); + USBH_ProcessHubStateChange(HubExtension, + &HubStatus); } } else diff --git a/drivers/usb/usbhub/usbhub.h b/drivers/usb/usbhub/usbhub.h index d0f25537f57..5aada11883d 100644 --- a/drivers/usb/usbhub/usbhub.h +++ b/drivers/usb/usbhub/usbhub.h @@ -85,8 +85,8 @@ #define USBHUB_ENUM_FLAG_GHOST_DEVICE 0x02 /* Hub Class Feature Selectors */ -#define USBHUB_FEATURE_USBHUB_FEATURE_C_HUB_LOCAL_POWER 0 -#define USBHUB_FEATURE_C_HUB_OVER_CURRENT 1 +#define USBHUB_FEATURE_C_HUB_LOCAL_POWER 0 +#define USBHUB_FEATURE_C_HUB_OVER_CURRENT 1 #define USBHUB_FEATURE_PORT_CONNECTION 0 #define USBHUB_FEATURE_PORT_ENABLE 1
4 years, 9 months
1
0
0
0
[reactos] 01/02: [USBHUB] Fix recipient in USBH_SyncClearPortStatus. CORE-16704
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=76a075867ee3b736788b3…
commit 76a075867ee3b736788b300ac8e6a7d7ede67f05 Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Sat Feb 22 10:31:40 2020 +0100 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Mon Mar 2 20:46:56 2020 +0100 [USBHUB] Fix recipient in USBH_SyncClearPortStatus. CORE-16704 --- drivers/usb/usbhub/usbhub.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/usbhub/usbhub.c b/drivers/usb/usbhub/usbhub.c index b14529d201c..33d9259b905 100644 --- a/drivers/usb/usbhub/usbhub.c +++ b/drivers/usb/usbhub/usbhub.c @@ -25,7 +25,7 @@ USBH_Wait(IN ULONG Milliseconds) LARGE_INTEGER Interval; DPRINT("USBH_Wait: Milliseconds - %x\n", Milliseconds); - Interval.QuadPart = -10000LL * Milliseconds - ((ULONGLONG)KeQueryTimeIncrement() - 1); + Interval.QuadPart = -10000LL * Milliseconds - ((ULONGLONG)KeQueryTimeIncrement() - 1); return KeDelayExecutionThread(KernelMode, FALSE, &Interval); } @@ -1399,7 +1399,7 @@ USBH_SyncClearPortStatus(IN PUSBHUB_FDO_EXTENSION HubExtension, RequestValue); RequestType.B = 0; - RequestType.Recipient = BMREQUEST_TO_DEVICE; + RequestType.Recipient = BMREQUEST_TO_OTHER; RequestType.Type = BMREQUEST_CLASS; RequestType.Dir = BMREQUEST_HOST_TO_DEVICE; @@ -3122,7 +3122,7 @@ USBH_HubCompletePortIdleIrps(IN PUSBHUB_FDO_EXTENSION HubExtension, VOID NTAPI -USBH_HubCancelIdleIrp(IN PUSBHUB_FDO_EXTENSION HubExtension, +USBH_HubCancelIdleIrp(IN PUSBHUB_FDO_EXTENSION HubExtension, IN PIRP IdleIrp) { DPRINT("USBH_HubCancelIdleIrp ... \n"); @@ -3218,7 +3218,7 @@ Wait: VOID NTAPI -USBH_FdoWaitWakeIrpCompletion(IN PDEVICE_OBJECT DeviceObject, +USBH_FdoWaitWakeIrpCompletion(IN PDEVICE_OBJECT DeviceObject, IN UCHAR MinorFunction, IN POWER_STATE PowerState, IN PVOID Context, @@ -3683,7 +3683,7 @@ USBH_FdoSubmitIdleRequestIrp(IN PUSBHUB_FDO_EXTENSION HubExtension) KeSetEvent(&HubExtension->IdleEvent, EVENT_INCREMENT, FALSE); return Status; } - + IoStack = IoGetNextIrpStackLocation(Irp); IoStack->MajorFunction = IRP_MJ_INTERNAL_DEVICE_CONTROL;
4 years, 9 months
1
0
0
0
[reactos] 06/06: [CONSRV] Fix a corruption of the CONSRV memory when converting read input events back to ANSI.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e8df1a38bd09e0416a1de…
commit e8df1a38bd09e0416a1de7006615abfd1c845c9c Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Mon Mar 2 00:56:33 2020 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Mar 2 01:08:41 2020 +0100 [CONSRV] Fix a corruption of the CONSRV memory when converting read input events back to ANSI. This fixes a 6-year old copy-paste bug introduced by commit b47d51c6 (r64004). --- win32ss/user/winsrv/consrv/coninput.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/win32ss/user/winsrv/consrv/coninput.c b/win32ss/user/winsrv/consrv/coninput.c index 8c2e0e82adb..b4b3061e1a3 100644 --- a/win32ss/user/winsrv/consrv/coninput.c +++ b/win32ss/user/winsrv/consrv/coninput.c @@ -564,9 +564,10 @@ ReadInputBuffer(IN PGET_INPUT_INFO InputInfo, /* Now translate everything to ANSI */ if (!GetInputRequest->Unicode) { - for (; NumEventsRead > 0; --NumEventsRead) + ULONG i; + for (i = 0; i < NumEventsRead; ++i) { - ConioInputEventToAnsi(InputBuffer->Header.Console, --InputRecord); + ConioInputEventToAnsi(InputBuffer->Header.Console, &InputRecord[i]); } } }
4 years, 9 months
1
0
0
0
[reactos] 05/06: [CONSRV] Some code simplification and tidy up.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7babd9310730a7804a9a7…
commit 7babd9310730a7804a9a74de0fc1f205a7633ef9 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Mar 1 17:22:05 2020 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Mar 2 01:08:41 2020 +0100 [CONSRV] Some code simplification and tidy up. --- win32ss/user/winsrv/consrv/condrv/console.c | 23 +++++++++------------ win32ss/user/winsrv/consrv/condrv/dummyterm.c | 2 +- win32ss/user/winsrv/consrv/condrv/graphics.c | 1 - win32ss/user/winsrv/consrv/condrv/text.c | 2 +- win32ss/user/winsrv/consrv/coninput.c | 25 +++++++++++++++++++++++ win32ss/user/winsrv/consrv/conoutput.c | 2 +- win32ss/user/winsrv/consrv/console.c | 4 ++-- win32ss/user/winsrv/consrv/frontends/input.c | 20 +++--------------- win32ss/user/winsrv/consrv/include/conio.h | 7 +++---- win32ss/user/winsrv/consrv/include/conio_winsrv.h | 8 ++++---- 10 files changed, 50 insertions(+), 44 deletions(-) diff --git a/win32ss/user/winsrv/consrv/condrv/console.c b/win32ss/user/winsrv/consrv/condrv/console.c index e763a812553..a3d7a13ea79 100644 --- a/win32ss/user/winsrv/consrv/condrv/console.c +++ b/win32ss/user/winsrv/consrv/condrv/console.c @@ -79,24 +79,21 @@ RemoveConsole(IN PCONSOLE Console) VOID NTAPI ConDrvPause(PCONSOLE Console) { - /* In case we already have a pause event, just exit... */ - if (Console->UnpauseEvent) return; + /* In case we are already paused, just exit... */ + if (Console->ConsolePaused) return; - /* ... otherwise create it */ - NtCreateEvent(&Console->UnpauseEvent, EVENT_ALL_ACCESS, - NULL, NotificationEvent, FALSE); + /* ... otherwise set the flag */ + Console->ConsolePaused = TRUE; } VOID NTAPI ConDrvUnpause(PCONSOLE Console) { - /* In case we already freed the event, just exit... */ - if (!Console->UnpauseEvent) return; + /* In case we are already unpaused, just exit... */ + if (!Console->ConsolePaused) return; - /* ... otherwise set and free it */ - NtSetEvent(Console->UnpauseEvent, NULL); - NtClose(Console->UnpauseEvent); - Console->UnpauseEvent = NULL; + /* ... otherwise reset the flag */ + Console->ConsolePaused = FALSE; } @@ -248,7 +245,7 @@ ConDrvInitConsole(OUT PCONSOLE* NewConsole, } /* Make the new screen buffer active */ Console->ActiveBuffer = NewBuffer; - Console->UnpauseEvent = NULL; + Console->ConsolePaused = FALSE; DPRINT("Console initialized\n"); @@ -409,7 +406,7 @@ ConDrvDeleteConsole(IN PCONSOLE Console) /* Deinitialize the input buffer */ ConDrvDeinitInputBuffer(Console); - if (Console->UnpauseEvent) NtClose(Console->UnpauseEvent); + Console->ConsolePaused = FALSE; DPRINT("ConDrvDeleteConsole - Unlocking\n"); LeaveCriticalSection(&Console->Lock); diff --git a/win32ss/user/winsrv/consrv/condrv/dummyterm.c b/win32ss/user/winsrv/consrv/condrv/dummyterm.c index 7261994f6c9..eaeb94561c7 100644 --- a/win32ss/user/winsrv/consrv/condrv/dummyterm.c +++ b/win32ss/user/winsrv/consrv/condrv/dummyterm.c @@ -61,7 +61,7 @@ DummyWriteStream(IN OUT PTERMINAL This, */ // /* Stop here if the console is paused */ - // if (Console->UnpauseEvent != NULL) return STATUS_PENDING; + // if (Console->ConsolePaused) return STATUS_PENDING; return STATUS_PENDING; } diff --git a/win32ss/user/winsrv/consrv/condrv/graphics.c b/win32ss/user/winsrv/consrv/condrv/graphics.c index 04341c6b663..694c2f52106 100644 --- a/win32ss/user/winsrv/consrv/condrv/graphics.c +++ b/win32ss/user/winsrv/consrv/condrv/graphics.c @@ -228,7 +228,6 @@ GRAPHICS_BUFFER_Initialize(OUT PCONSOLE_SCREEN_BUFFER* Buffer, } NewBuffer->ViewOrigin.X = NewBuffer->ViewOrigin.Y = 0; - NewBuffer->VirtualY = 0; NewBuffer->CursorBlinkOn = FALSE; NewBuffer->ForceCursorOff = TRUE; diff --git a/win32ss/user/winsrv/consrv/condrv/text.c b/win32ss/user/winsrv/consrv/condrv/text.c index d38317de29a..2b568652ec2 100644 --- a/win32ss/user/winsrv/consrv/condrv/text.c +++ b/win32ss/user/winsrv/consrv/condrv/text.c @@ -793,7 +793,7 @@ ConDrvWriteConsole(IN PCONSOLE Console, ASSERT((StringBuffer != NULL) || (StringBuffer == NULL && NumCharsToWrite == 0)); /* Stop here if the console is paused */ - if (Console->UnpauseEvent != NULL) return STATUS_PENDING; + if (Console->ConsolePaused) return STATUS_PENDING; /* Convert the string to UNICODE */ if (Unicode) diff --git a/win32ss/user/winsrv/consrv/coninput.c b/win32ss/user/winsrv/consrv/coninput.c index d8f5b24d9db..8c2e0e82adb 100644 --- a/win32ss/user/winsrv/consrv/coninput.c +++ b/win32ss/user/winsrv/consrv/coninput.c @@ -202,6 +202,31 @@ ConioProcessInputEvent(PCONSRV_CONSOLE Console, PINPUT_RECORD InputEvent) { ULONG NumEventsWritten; + + if (InputEvent->EventType == KEY_EVENT) + { + BOOL Down = InputEvent->Event.KeyEvent.bKeyDown; + UINT VirtualKeyCode = InputEvent->Event.KeyEvent.wVirtualKeyCode; + DWORD ShiftState = InputEvent->Event.KeyEvent.dwControlKeyState; + + /* Process Ctrl-C and Ctrl-Break */ + if ( (GetConsoleInputBufferMode(Console) & ENABLE_PROCESSED_INPUT) && + Down && (VirtualKeyCode == VK_PAUSE || VirtualKeyCode == 'C') && + (ShiftState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) ) + { + DPRINT1("Console_Api Ctrl-C\n"); + ConSrvConsoleProcessCtrlEvent(Console, 0, CTRL_C_EVENT); + + if (Console->LineBuffer && !Console->LineComplete) + { + /* Line input is in progress; end it */ + Console->LinePos = Console->LineSize = 0; + Console->LineComplete = TRUE; + } + return STATUS_SUCCESS; // STATUS_CONTROL_C_EXIT; + } + } + return ConioAddInputEvents(Console, InputEvent, 1, diff --git a/win32ss/user/winsrv/consrv/conoutput.c b/win32ss/user/winsrv/consrv/conoutput.c index 15fd4ff5ede..173926032ed 100644 --- a/win32ss/user/winsrv/consrv/conoutput.c +++ b/win32ss/user/winsrv/consrv/conoutput.c @@ -206,7 +206,7 @@ CSR_API(SrvCreateConsoleScreenBuffer) TEXTMODE_BUFFER_INFO TextModeInfo = {{80, 25}, {80, 25}, DEFAULT_SCREEN_ATTRIB, - DEFAULT_POPUP_ATTRIB , + DEFAULT_POPUP_ATTRIB, TRUE, CSR_DEFAULT_CURSOR_SIZE}; GRAPHICS_BUFFER_INFO GraphicsInfo; diff --git a/win32ss/user/winsrv/consrv/console.c b/win32ss/user/winsrv/consrv/console.c index 8b50465bfad..f838376204d 100644 --- a/win32ss/user/winsrv/consrv/console.c +++ b/win32ss/user/winsrv/consrv/console.c @@ -240,14 +240,14 @@ ConsoleFreeUnicodeString(IN PUNICODE_STRING UnicodeString) } VOID -ConioPause(PCONSRV_CONSOLE Console, UINT Flags) +ConioPause(PCONSRV_CONSOLE Console, UCHAR Flags) { Console->PauseFlags |= Flags; ConDrvPause((PCONSOLE)Console); } VOID -ConioUnpause(PCONSRV_CONSOLE Console, UINT Flags) +ConioUnpause(PCONSRV_CONSOLE Console, UCHAR Flags) { Console->PauseFlags &= ~Flags; diff --git a/win32ss/user/winsrv/consrv/frontends/input.c b/win32ss/user/winsrv/consrv/frontends/input.c index 8bc0ad0ffae..053e2006efb 100644 --- a/win32ss/user/winsrv/consrv/frontends/input.c +++ b/win32ss/user/winsrv/consrv/frontends/input.c @@ -34,17 +34,20 @@ ConioGetShiftState(PBYTE KeyState, LPARAM lParam) ssOut |= SCROLLLOCK_ON; if (KeyState[VK_SHIFT] & 0x80) + // || (KeyState[VK_LSHIFT] & 0x80) || (KeyState[VK_RSHIFT] & 0x80) ssOut |= SHIFT_PRESSED; if (KeyState[VK_LCONTROL] & 0x80) ssOut |= LEFT_CTRL_PRESSED; if (KeyState[VK_RCONTROL] & 0x80) ssOut |= RIGHT_CTRL_PRESSED; + // if (KeyState[VK_CONTROL] & 0x80) { ... } if (KeyState[VK_LMENU] & 0x80) ssOut |= LEFT_ALT_PRESSED; if (KeyState[VK_RMENU] & 0x80) ssOut |= RIGHT_ALT_PRESSED; + // if (KeyState[VK_MENU] & 0x80) { ... } /* See WM_CHAR MSDN documentation for instance */ if (lParam & 0x01000000) @@ -124,23 +127,6 @@ ConioProcessKey(PCONSRV_CONSOLE Console, MSG* msg) if (Fake) return; - /* Process Ctrl-C and Ctrl-Break */ - if ( (GetConsoleInputBufferMode(Console) & ENABLE_PROCESSED_INPUT) && - Down && (VirtualKeyCode == VK_PAUSE || VirtualKeyCode == 'C') && - (ShiftState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED) || KeyState[VK_CONTROL] & 0x80) ) - { - DPRINT1("Console_Api Ctrl-C\n"); - ConSrvConsoleProcessCtrlEvent(Console, 0, CTRL_C_EVENT); - - if (Console->LineBuffer && !Console->LineComplete) - { - /* Line input is in progress; end it */ - Console->LinePos = Console->LineSize = 0; - Console->LineComplete = TRUE; - } - return; - } - // // FIXME: Scrolling via keyboard shortcuts must be done differently, // without touching the internal VirtualY variable. diff --git a/win32ss/user/winsrv/consrv/include/conio.h b/win32ss/user/winsrv/consrv/include/conio.h index cff5de40975..dc68afc4898 100644 --- a/win32ss/user/winsrv/consrv/include/conio.h +++ b/win32ss/user/winsrv/consrv/include/conio.h @@ -93,8 +93,6 @@ struct _CONSOLE_SCREEN_BUFFER COORD ViewOrigin; /* Beginning offset for the actual display area */ /***** Put that VV in TEXTMODE_SCREEN_BUFFER ?? *****/ - USHORT VirtualY; /* Top row of buffer being displayed, reported to callers */ - COORD CursorPosition; /* Current cursor position */ BOOLEAN CursorBlinkOn; BOOLEAN ForceCursorOff; @@ -152,6 +150,7 @@ typedef struct _TEXTMODE_SCREEN_BUFFER { CONSOLE_SCREEN_BUFFER; /* Screen buffer base class - MUST BE IN FIRST PLACE */ + USHORT VirtualY; /* Top row of buffer being displayed, reported to callers */ PCHAR_INFO Buffer; /* Pointer to UNICODE screen buffer (Buffer->Char.UnicodeChar only is valid, not Char.AsciiChar) */ USHORT ScreenDefaultAttrib; /* Default screen char attribute */ @@ -333,7 +332,7 @@ typedef struct _CONSOLE CONSOLE_STATE State; /* State of the console */ TERMINAL TermIFace; /* Terminal-specific interface */ - HANDLE UnpauseEvent; /* When != NULL, event for pausing the console */ + BOOLEAN ConsolePaused; /* If TRUE, the console is paused */ /******************************** Input buffer ********************************/ CONSOLE_INPUT_BUFFER InputBuffer; /* Input buffer of the console */ @@ -367,7 +366,7 @@ ConSrvConsoleCtrlEvent(IN ULONG CtrlEvent, /* conoutput.c */ PCHAR_INFO ConioCoordToPointer(PTEXTMODE_SCREEN_BUFFER Buff, ULONG X, ULONG Y); -NTSTATUS ConioResizeBuffer(PCONSOLE /*PCONSRV_CONSOLE*/ Console, +NTSTATUS ConioResizeBuffer(PCONSOLE Console, PTEXTMODE_SCREEN_BUFFER ScreenBuffer, COORD Size); diff --git a/win32ss/user/winsrv/consrv/include/conio_winsrv.h b/win32ss/user/winsrv/consrv/include/conio_winsrv.h index 5057a31e4ad..a77bfcb0d39 100644 --- a/win32ss/user/winsrv/consrv/include/conio_winsrv.h +++ b/win32ss/user/winsrv/consrv/include/conio_winsrv.h @@ -152,7 +152,7 @@ typedef struct _WINSRV_CONSOLE BOOLEAN HasFocus; /* TRUE if the console has focus (is in the foreground) */ /******************************* Pausing support ******************************/ - BYTE PauseFlags; + UCHAR PauseFlags; LIST_ENTRY ReadWaitQueue; /* List head for the queue of unique input buffer read wait blocks */ LIST_ENTRY WriteWaitQueue; /* List head for the queue of current screen-buffer write wait blocks */ @@ -197,8 +197,8 @@ typedef struct _WINSRV_CONSOLE } WINSRV_CONSOLE; // , *PWINSRV_CONSOLE; /* console.c */ -VOID ConioPause(PCONSRV_CONSOLE Console, UINT Flags); -VOID ConioUnpause(PCONSRV_CONSOLE Console, UINT Flags); +VOID ConioPause(PCONSRV_CONSOLE Console, UCHAR Flags); +VOID ConioUnpause(PCONSRV_CONSOLE Console, UCHAR Flags); PCONSOLE_PROCESS_DATA NTAPI ConSrvGetConsoleLeaderProcess(IN PCONSRV_CONSOLE Console); @@ -227,7 +227,7 @@ ConioProcessInputEvent(PCONSRV_CONSOLE Console, /* conoutput.c */ PCHAR_INFO ConioCoordToPointer(PTEXTMODE_SCREEN_BUFFER Buff, ULONG X, ULONG Y); -NTSTATUS ConioResizeBuffer(PCONSOLE /*PCONSRV_CONSOLE*/ Console, +NTSTATUS ConioResizeBuffer(PCONSOLE Console, PTEXTMODE_SCREEN_BUFFER ScreenBuffer, COORD Size);
4 years, 9 months
1
0
0
0
[reactos] 04/06: [CONSRV] Use NtClearEvent() and NtClose() instead of the Win32 functions.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=31c13e89fe5942cfba167…
commit 31c13e89fe5942cfba167d4c5f3c6e41a191faaf Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sat Feb 29 20:11:09 2020 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Mar 2 01:08:40 2020 +0100 [CONSRV] Use NtClearEvent() and NtClose() instead of the Win32 functions. --- win32ss/user/winsrv/consrv/condrv/coninput.c | 8 ++++---- win32ss/user/winsrv/consrv/condrv/console.c | 2 +- win32ss/user/winsrv/consrv/frontends/terminal.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/win32ss/user/winsrv/consrv/condrv/coninput.c b/win32ss/user/winsrv/consrv/condrv/coninput.c index a2041a0eae9..63549ec4511 100644 --- a/win32ss/user/winsrv/consrv/condrv/coninput.c +++ b/win32ss/user/winsrv/consrv/condrv/coninput.c @@ -185,7 +185,7 @@ PurgeInputBuffer(IN PCONSOLE_INPUT_BUFFER InputBuffer) ConsoleFreeHeap(Event); } - // CloseHandle(Console->InputBuffer.ActiveEvent); + // NtClose(Console->InputBuffer.ActiveEvent); } NTSTATUS NTAPI @@ -221,7 +221,7 @@ VOID NTAPI ConDrvDeinitInputBuffer(IN PCONSOLE Console) { PurgeInputBuffer(&Console->InputBuffer); - CloseHandle(Console->InputBuffer.ActiveEvent); + NtClose(Console->InputBuffer.ActiveEvent); } @@ -317,7 +317,7 @@ ConDrvGetConsoleInput(IN PCONSOLE Console, if (IsListEmpty(&InputBuffer->InputEvents)) { - ResetEvent(InputBuffer->ActiveEvent); + NtClearEvent(InputBuffer->ActiveEvent); } // FIXME: If we add back UNICODE support, it's here that we need to do the translation. @@ -365,7 +365,7 @@ ConDrvFlushConsoleInputBuffer(IN PCONSOLE Console, /* Discard all entries in the input event queue */ PurgeInputBuffer(InputBuffer); - ResetEvent(InputBuffer->ActiveEvent); + NtClearEvent(InputBuffer->ActiveEvent); return STATUS_SUCCESS; } diff --git a/win32ss/user/winsrv/consrv/condrv/console.c b/win32ss/user/winsrv/consrv/condrv/console.c index 50542ec3025..e763a812553 100644 --- a/win32ss/user/winsrv/consrv/condrv/console.c +++ b/win32ss/user/winsrv/consrv/condrv/console.c @@ -409,7 +409,7 @@ ConDrvDeleteConsole(IN PCONSOLE Console) /* Deinitialize the input buffer */ ConDrvDeinitInputBuffer(Console); - if (Console->UnpauseEvent) CloseHandle(Console->UnpauseEvent); + if (Console->UnpauseEvent) NtClose(Console->UnpauseEvent); DPRINT("ConDrvDeleteConsole - Unlocking\n"); LeaveCriticalSection(&Console->Lock); diff --git a/win32ss/user/winsrv/consrv/frontends/terminal.c b/win32ss/user/winsrv/consrv/frontends/terminal.c index ece6bb29933..7cb89e6b221 100644 --- a/win32ss/user/winsrv/consrv/frontends/terminal.c +++ b/win32ss/user/winsrv/consrv/frontends/terminal.c @@ -365,7 +365,7 @@ ConSrvTermReadStream(IN OUT PTERMINAL This, CurrentEntry = RemoveHeadList(&InputBuffer->InputEvents); if (IsListEmpty(&InputBuffer->InputEvents)) { - ResetEvent(InputBuffer->ActiveEvent); + NtClearEvent(InputBuffer->ActiveEvent); } Input = CONTAINING_RECORD(CurrentEntry, ConsoleInput, ListEntry); @@ -430,7 +430,7 @@ ConSrvTermReadStream(IN OUT PTERMINAL This, CurrentEntry = RemoveHeadList(&InputBuffer->InputEvents); if (IsListEmpty(&InputBuffer->InputEvents)) { - ResetEvent(InputBuffer->ActiveEvent); + NtClearEvent(InputBuffer->ActiveEvent); } Input = CONTAINING_RECORD(CurrentEntry, ConsoleInput, ListEntry);
4 years, 9 months
1
0
0
0
[reactos] 03/06: [CONSRV] Tidy up lineinput.c by moving the History* helper prototypes to a suitable header file.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e624be1eb23b85f25e934…
commit e624be1eb23b85f25e93489ac8ccaf5706e6e691 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sat Feb 29 19:57:50 2020 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Mar 2 01:08:39 2020 +0100 [CONSRV] Tidy up lineinput.c by moving the History* helper prototypes to a suitable header file. --- win32ss/user/winsrv/consrv/history.h | 26 ++++++++++++++++++++++++++ win32ss/user/winsrv/consrv/lineinput.c | 24 +----------------------- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/win32ss/user/winsrv/consrv/history.h b/win32ss/user/winsrv/consrv/history.h index c3ee78a4a7e..b9615bb92d9 100644 --- a/win32ss/user/winsrv/consrv/history.h +++ b/win32ss/user/winsrv/consrv/history.h @@ -8,6 +8,32 @@ #pragma once +VOID +HistoryAddEntry(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName, + PUNICODE_STRING Entry); + +BOOL +HistoryFindEntryByPrefix(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName, + PUNICODE_STRING Prefix, + PUNICODE_STRING Entry); + +VOID +HistoryGetCurrentEntry(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName, + PUNICODE_STRING Entry); + +BOOL +HistoryRecallHistory(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName, + INT Offset, + PUNICODE_STRING Entry); + +VOID +HistoryDeleteCurrentBuffer(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName); + VOID HistoryDeleteBuffers(PCONSRV_CONSOLE Console); VOID diff --git a/win32ss/user/winsrv/consrv/lineinput.c b/win32ss/user/winsrv/consrv/lineinput.c index 32d799531f6..5d92d59ac49 100644 --- a/win32ss/user/winsrv/consrv/lineinput.c +++ b/win32ss/user/winsrv/consrv/lineinput.c @@ -9,6 +9,7 @@ /* INCLUDES *******************************************************************/ #include "consrv.h" +#include "history.h" #include "popup.h" #define NDEBUG @@ -31,29 +32,6 @@ ConvertInputUnicodeToAnsi(PCONSRV_CONSOLE Console, /*P*/USHORT TargetLength); -VOID -HistoryAddEntry(PCONSRV_CONSOLE Console, - PUNICODE_STRING ExeName, - PUNICODE_STRING Entry); -BOOL -HistoryRecallHistory(PCONSRV_CONSOLE Console, - PUNICODE_STRING ExeName, - INT Offset, - PUNICODE_STRING Entry); -VOID -HistoryGetCurrentEntry(PCONSRV_CONSOLE Console, - PUNICODE_STRING ExeName, - PUNICODE_STRING Entry); -VOID -HistoryDeleteCurrentBuffer(PCONSRV_CONSOLE Console, - PUNICODE_STRING ExeName); -BOOL -HistoryFindEntryByPrefix(PCONSRV_CONSOLE Console, - PUNICODE_STRING ExeName, - PUNICODE_STRING Prefix, - PUNICODE_STRING Entry); - - /* PRIVATE FUNCTIONS **********************************************************/ static VOID
4 years, 9 months
1
0
0
0
[reactos] 02/06: [KERNEL32:CONSOLE] Explicitly use _WIN32_WINNT_VISTA.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=98b58df2bff8502024ded…
commit 98b58df2bff8502024dedd7e36c68eedd222ad67 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sat Feb 29 19:55:52 2020 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Mar 2 01:08:36 2020 +0100 [KERNEL32:CONSOLE] Explicitly use _WIN32_WINNT_VISTA. --- dll/win32/kernel32/client/console/vista.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/win32/kernel32/client/console/vista.c b/dll/win32/kernel32/client/console/vista.c index f2bc55dc037..40fbd431ad7 100644 --- a/dll/win32/kernel32/client/console/vista.c +++ b/dll/win32/kernel32/client/console/vista.c @@ -16,7 +16,7 @@ /* PUBLIC FUNCTIONS ***********************************************************/ -#if _WIN32_WINNT >= 0x600 +#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA) /* * @implemented @@ -163,6 +163,6 @@ GetCurrentConsoleFontEx(IN HANDLE hConsoleOutput, return FALSE; } -#endif +#endif // (_WIN32_WINNT >= _WIN32_WINNT_VISTA) /* EOF */
4 years, 9 months
1
0
0
0
← Newer
1
...
12
13
14
15
16
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Results per page:
10
25
50
100
200