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
April 2022
----- 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
22 participants
157 discussions
Start a n
N
ew thread
[reactos] 05/18: [WIN32SS] Remove useless prototype (function never existed)
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=333f3382f63cb87f66a81…
commit 333f3382f63cb87f66a818733fdf7cfb60c40302 Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Sun Jan 9 10:47:11 2022 +0100 Commit: hpoussin <32227662+hpoussin(a)users.noreply.github.com> CommitDate: Fri Apr 15 23:09:16 2022 +0200 [WIN32SS] Remove useless prototype (function never existed) --- win32ss/gdi/eng/ldevobj.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/win32ss/gdi/eng/ldevobj.h b/win32ss/gdi/eng/ldevobj.h index 7b2fc2065ee..f1fc624950d 100644 --- a/win32ss/gdi/eng/ldevobj.h +++ b/win32ss/gdi/eng/ldevobj.h @@ -64,11 +64,6 @@ LDEVOBJ_bProbeAndCaptureDevmode( _Out_ PDEVMODEW *pSelectedMode, _In_ BOOL bSearchClosestMode); -PLDEVOBJ -NTAPI -EngGetLDEV( - PDEVMODEW pdm); - CODE_SEG("INIT") NTSTATUS APIENTRY
2 years, 8 months
1
0
0
0
[reactos] 04/18: [WIN32SS] Rewrite PDEVOBJ_pdmMatchDevMode to LDEVOBJ_bProbeAndCaptureDevmode
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3cb1dd8ab20c8b29ed497…
commit 3cb1dd8ab20c8b29ed497518b5abb8656ac8354e Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Sun Jan 9 10:44:53 2022 +0100 Commit: hpoussin <32227662+hpoussin(a)users.noreply.github.com> CommitDate: Fri Apr 15 23:09:16 2022 +0200 [WIN32SS] Rewrite PDEVOBJ_pdmMatchDevMode to LDEVOBJ_bProbeAndCaptureDevmode - make it return a new allocated PDEVMODEW instead of a pointer into existing PGRAPHICS_DEVICE (usefull when available display modes can dynamically change: VirtualBox, RDP, ...) - update all callers --- win32ss/gdi/eng/device.c | 27 +++++----------- win32ss/gdi/eng/ldevobj.c | 71 +++++++++++++++++++++++++++++++++++++++++++ win32ss/gdi/eng/ldevobj.h | 8 +++++ win32ss/gdi/eng/pdevobj.c | 68 ++++++++++------------------------------- win32ss/gdi/eng/pdevobj.h | 6 ---- win32ss/user/ntuser/display.c | 17 ++++++++--- 6 files changed, 114 insertions(+), 83 deletions(-) diff --git a/win32ss/gdi/eng/device.c b/win32ss/gdi/eng/device.c index 8ad49ed5fd1..4f2284fa1e6 100644 --- a/win32ss/gdi/eng/device.c +++ b/win32ss/gdi/eng/device.c @@ -130,25 +130,18 @@ EngpPopulateDeviceModeList( _In_ PDEVMODEW pdmDefault) { PDEVMODEINFO pdminfo; - PDEVMODEW pdm; + PDEVMODEW pdm, pdmSelected; ULONG i; - BOOLEAN bModeMatch = FALSE; ASSERT(pGraphicsDevice->pdevmodeInfo == NULL); ASSERT(pGraphicsDevice->pDevModeList == NULL); - if (!LDEVOBJ_bBuildDevmodeList(pGraphicsDevice)) + if (!LDEVOBJ_bProbeAndCaptureDevmode(pGraphicsDevice, pdmDefault, &pdmSelected, TRUE)) { - ERR("LDEVOBJ_bBuildDevmodeList() failed\n"); + ERR("LDEVOBJ_bProbeAndCaptureDevmode() failed\n"); return FALSE; } - TRACE("Looking for mode %lux%lux%lu(%lu Hz)\n", - pdmDefault->dmPelsWidth, - pdmDefault->dmPelsHeight, - pdmDefault->dmBitsPerPel, - pdmDefault->dmDisplayFrequency); - /* Loop through all DEVMODEINFOs */ for (pdminfo = pGraphicsDevice->pdevmodeInfo, i = 0; pdminfo; @@ -159,20 +152,14 @@ EngpPopulateDeviceModeList( { pdm = pGraphicsDevice->pDevModeList[i].pdm; - /* Compare with the default entry */ - if (!bModeMatch && - pdm->dmBitsPerPel == pdmDefault->dmBitsPerPel && - pdm->dmPelsWidth == pdmDefault->dmPelsWidth && - pdm->dmPelsHeight == pdmDefault->dmPelsHeight) + /* Compare with the selected entry */ + if (pdm->dmSize == pdmSelected->dmSize && + RtlCompareMemory(pdm, pdmSelected, pdm->dmSize) == pdm->dmSize) { pGraphicsDevice->iDefaultMode = i; pGraphicsDevice->iCurrentMode = i; TRACE("Found default entry: %lu '%ls'\n", i, pdm->dmDeviceName); - if (pdm->dmDisplayFrequency == pdmDefault->dmDisplayFrequency) - { - /* Uh oh, even the display frequency matches. */ - bModeMatch = TRUE; - } + break; } } } diff --git a/win32ss/gdi/eng/ldevobj.c b/win32ss/gdi/eng/ldevobj.c index e2079da8178..db46a0dfbb6 100644 --- a/win32ss/gdi/eng/ldevobj.c +++ b/win32ss/gdi/eng/ldevobj.c @@ -558,6 +558,77 @@ LDEVOBJ_bBuildDevmodeList( return TRUE; } +BOOL +LDEVOBJ_bProbeAndCaptureDevmode( + _Inout_ PGRAPHICS_DEVICE pGraphicsDevice, + _In_ PDEVMODEW RequestedMode, + _Out_ PDEVMODEW *pSelectedMode, + _In_ BOOL bSearchClosestMode) +{ + PDEVMODEW pdmCurrent, pdm, pdmSelected = NULL; + ULONG i; + DWORD dwFields; + + if (!LDEVOBJ_bBuildDevmodeList(pGraphicsDevice)) + return FALSE; + + /* Search if requested mode exists */ + for (i = 0; i < pGraphicsDevice->cDevModes; i++) + { + pdmCurrent = pGraphicsDevice->pDevModeList[i].pdm; + + /* Compare asked DEVMODE fields + * Only compare those that are valid in both DEVMODE structs */ + dwFields = pdmCurrent->dmFields & RequestedMode->dmFields; + + /* For now, we only need those */ + if ((dwFields & DM_BITSPERPEL) && + (pdmCurrent->dmBitsPerPel != RequestedMode->dmBitsPerPel)) continue; + if ((dwFields & DM_PELSWIDTH) && + (pdmCurrent->dmPelsWidth != RequestedMode->dmPelsWidth)) continue; + if ((dwFields & DM_PELSHEIGHT) && + (pdmCurrent->dmPelsHeight != RequestedMode->dmPelsHeight)) continue; + if ((dwFields & DM_DISPLAYFREQUENCY) && + (pdmCurrent->dmDisplayFrequency != RequestedMode->dmDisplayFrequency)) continue; + + pdmSelected = pdmCurrent; + break; + } + + if (!pdmSelected) + { + WARN("Requested mode not found (%dx%dx%d %d Hz)\n", + RequestedMode->dmFields & DM_PELSWIDTH ? RequestedMode->dmPelsWidth : 0, + RequestedMode->dmFields & DM_PELSHEIGHT ? RequestedMode->dmPelsHeight : 0, + RequestedMode->dmFields & DM_BITSPERPEL ? RequestedMode->dmBitsPerPel : 0, + RequestedMode->dmFields & DM_DISPLAYFREQUENCY ? RequestedMode->dmDisplayFrequency : 0); + if (!bSearchClosestMode || pGraphicsDevice->cDevModes == 0) + return FALSE; + + /* FIXME: need to search the closest mode instead of taking the first one */ + pdmSelected = pGraphicsDevice->pDevModeList[0].pdm; + WARN("Replacing it by %dx%dx%d %d Hz\n", + pdmSelected->dmFields & DM_PELSWIDTH ? pdmSelected->dmPelsWidth : 0, + pdmSelected->dmFields & DM_PELSHEIGHT ? pdmSelected->dmPelsHeight : 0, + pdmSelected->dmFields & DM_BITSPERPEL ? pdmSelected->dmBitsPerPel : 0, + pdmSelected->dmFields & DM_DISPLAYFREQUENCY ? pdmSelected->dmDisplayFrequency : 0); + } + + /* Allocate memory for output */ + pdm = ExAllocatePoolZero(PagedPool, pdmSelected->dmSize + pdmSelected->dmDriverExtra, GDITAG_DEVMODE); + if (!pdm) + return FALSE; + + /* Copy selected mode */ + RtlCopyMemory(pdm, pdmSelected, pdmSelected->dmSize); + RtlCopyMemory((PVOID)((ULONG_PTR)pdm + pdm->dmSize), + (PVOID)((ULONG_PTR)pdmSelected + pdmSelected->dmSize), + pdmSelected->dmDriverExtra); + + *pSelectedMode = pdm; + return TRUE; +} + /** Exported functions ********************************************************/ HANDLE diff --git a/win32ss/gdi/eng/ldevobj.h b/win32ss/gdi/eng/ldevobj.h index cac2ec8f5e0..7b2fc2065ee 100644 --- a/win32ss/gdi/eng/ldevobj.h +++ b/win32ss/gdi/eng/ldevobj.h @@ -56,6 +56,14 @@ BOOL LDEVOBJ_bBuildDevmodeList( _Inout_ PGRAPHICS_DEVICE pGraphicsDevice); +/* This function selects the best available mode corresponding to requested mode */ +BOOL +LDEVOBJ_bProbeAndCaptureDevmode( + _Inout_ PGRAPHICS_DEVICE pGraphicsDevice, + _In_ PDEVMODEW RequestedMode, + _Out_ PDEVMODEW *pSelectedMode, + _In_ BOOL bSearchClosestMode); + PLDEVOBJ NTAPI EngGetLDEV( diff --git a/win32ss/gdi/eng/pdevobj.c b/win32ss/gdi/eng/pdevobj.c index e764dea384c..77b9a9fafc3 100644 --- a/win32ss/gdi/eng/pdevobj.c +++ b/win32ss/gdi/eng/pdevobj.c @@ -83,6 +83,8 @@ PDEVOBJ_vDeletePDEV( PPDEVOBJ ppdev) { EngDeleteSemaphore(ppdev->hsemDevLock); + if (ppdev->pdmwDev) + ExFreePoolWithTag(ppdev->pdmwDev, GDITAG_DEVMODE); if (ppdev->pEDDgpl) ExFreePoolWithTag(ppdev->pEDDgpl, GDITAG_PDEV); ExFreePoolWithTag(ppdev, GDITAG_PDEV); @@ -266,18 +268,13 @@ PDEVOBJ_vRefreshModeList( { PGRAPHICS_DEVICE pGraphicsDevice; PDEVMODEINFO pdminfo, pdmiNext; - DEVMODEW dmDefault; - DEVMODEW dmCurrent; + PDEVMODEW newDevMode; /* Lock the PDEV */ EngAcquireSemaphore(ppdev->hsemDevLock); pGraphicsDevice = ppdev->pGraphicsDevice; - /* Remember our default mode */ - dmDefault = *pGraphicsDevice->pDevModeList[pGraphicsDevice->iDefaultMode].pdm; - dmCurrent = *ppdev->pdmwDev; - /* Clear out the modes */ for (pdminfo = pGraphicsDevice->pdevmodeInfo; pdminfo; @@ -290,57 +287,17 @@ PDEVOBJ_vRefreshModeList( ExFreePoolWithTag(pGraphicsDevice->pDevModeList, GDITAG_GDEVICE); pGraphicsDevice->pDevModeList = NULL; - /* Now re-populate the list */ - if (!EngpPopulateDeviceModeList(pGraphicsDevice, &dmDefault)) + /* Search an available display mode */ + if (LDEVOBJ_bProbeAndCaptureDevmode(pGraphicsDevice, ppdev->pdmwDev, &newDevMode, TRUE)) { - DPRINT1("FIXME: EngpPopulateDeviceModeList failed, we just destroyed a perfectly good mode list\n"); + ExFreePoolWithTag(ppdev->pdmwDev, GDITAG_DEVMODE); + ppdev->pdmwDev = newDevMode; } - ppdev->pdmwDev = PDEVOBJ_pdmMatchDevMode(ppdev, &dmCurrent); - /* Unlock PDEV */ EngReleaseSemaphore(ppdev->hsemDevLock); } -PDEVMODEW -NTAPI -PDEVOBJ_pdmMatchDevMode( - PPDEVOBJ ppdev, - PDEVMODEW pdm) -{ - PGRAPHICS_DEVICE pGraphicsDevice; - PDEVMODEW pdmCurrent; - ULONG i; - DWORD dwFields; - - pGraphicsDevice = ppdev->pGraphicsDevice; - - for (i = 0; i < pGraphicsDevice->cDevModes; i++) - { - pdmCurrent = pGraphicsDevice->pDevModeList[i].pdm; - - /* Compare asked DEVMODE fields - * Only compare those that are valid in both DEVMODE structs */ - dwFields = pdmCurrent->dmFields & pdm->dmFields; - - /* For now, we only need those */ - if ((dwFields & DM_BITSPERPEL) && - (pdmCurrent->dmBitsPerPel != pdm->dmBitsPerPel)) continue; - if ((dwFields & DM_PELSWIDTH) && - (pdmCurrent->dmPelsWidth != pdm->dmPelsWidth)) continue; - if ((dwFields & DM_PELSHEIGHT) && - (pdmCurrent->dmPelsHeight != pdm->dmPelsHeight)) continue; - if ((dwFields & DM_DISPLAYFREQUENCY) && - (pdmCurrent->dmDisplayFrequency != pdm->dmDisplayFrequency)) continue; - - /* Match! Return the DEVMODE */ - return pdmCurrent; - } - - /* Nothing found */ - return NULL; -} - static PPDEVOBJ EngpCreatePDEV( @@ -349,6 +306,7 @@ EngpCreatePDEV( { PGRAPHICS_DEVICE pGraphicsDevice; PPDEVOBJ ppdev; + PDEVMODEW newDevMode; DPRINT("EngpCreatePDEV(%wZ, %p)\n", pustrDeviceName, pdm); @@ -410,7 +368,13 @@ EngpCreatePDEV( ppdev->hSpooler = ppdev->pGraphicsDevice->DeviceObject; // Should we change the ative mode of pGraphicsDevice ? - ppdev->pdmwDev = PDEVOBJ_pdmMatchDevMode(ppdev, pdm); + if (!LDEVOBJ_bProbeAndCaptureDevmode(pGraphicsDevice, pdm, &newDevMode, TRUE)) + { + DPRINT1("LDEVOBJ_bProbeAndCaptureDevmode() failed\n"); + PDEVOBJ_vRelease(ppdev); + return NULL; + } + ppdev->pdmwDev = newDevMode; /* FIXME! */ ppdev->flFlags = PDEV_DISPLAY; @@ -525,7 +489,7 @@ PDEVOBJ_bSwitchMode( DPRINT1("PDEVOBJ_bSwitchMode, ppdev = %p, pSurface = %p\n", ppdev, ppdev->pSurface); // Lookup the GraphicsDevice + select DEVMODE - // pdm = PDEVOBJ_pdmMatchDevMode(ppdev, pdm); + // pdm = LDEVOBJ_bProbeAndCaptureDevmode(ppdev, pdm); /* 1. Temporarily disable the current PDEV and reset video to its default mode */ if (!ppdev->pfn.AssertMode(ppdev->dhpdev, FALSE)) diff --git a/win32ss/gdi/eng/pdevobj.h b/win32ss/gdi/eng/pdevobj.h index 4d22c270aa7..af4973b60f6 100644 --- a/win32ss/gdi/eng/pdevobj.h +++ b/win32ss/gdi/eng/pdevobj.h @@ -213,10 +213,4 @@ PDEVOBJ_bSwitchMode( PPDEVOBJ ppdev, PDEVMODEW pdm); -PDEVMODEW -NTAPI -PDEVOBJ_pdmMatchDevMode( - PPDEVOBJ ppdev, - PDEVMODEW pdm); - #endif /* !__WIN32K_PDEVOBJ_H */ diff --git a/win32ss/user/ntuser/display.c b/win32ss/user/ntuser/display.c index df00c0e3974..81ed1bdb402 100644 --- a/win32ss/user/ntuser/display.c +++ b/win32ss/user/ntuser/display.c @@ -657,6 +657,7 @@ UserChangeDisplaySettings( PPDEVOBJ ppdev; WORD OrigBC; //PDESKTOP pdesk; + PDEVMODEW newDevMode = NULL; /* If no DEVMODE is given, use registry settings */ if (!pdm) @@ -707,8 +708,7 @@ UserChangeDisplaySettings( dm.dmDisplayFrequency = ppdev->pdmwDev->dmDisplayFrequency; /* Look for the requested DEVMODE */ - pdm = PDEVOBJ_pdmMatchDevMode(ppdev, &dm); - if (!pdm) + if (!LDEVOBJ_bProbeAndCaptureDevmode(ppdev->pGraphicsDevice, &dm, &newDevMode, FALSE)) { ERR("Could not find a matching DEVMODE\n"); lResult = DISP_CHANGE_BADMODE; @@ -729,7 +729,7 @@ UserChangeDisplaySettings( if (NT_SUCCESS(Status)) { /* Store the settings */ - RegWriteDisplaySettings(hkey, pdm); + RegWriteDisplaySettings(hkey, newDevMode); /* Close the registry key */ ZwClose(hkey); @@ -742,7 +742,9 @@ UserChangeDisplaySettings( } /* Check if DEVMODE matches the current mode */ - if (pdm == ppdev->pdmwDev && !(flags & CDS_RESET)) + if (newDevMode->dmSize == ppdev->pdmwDev->dmSize && + RtlCompareMemory(newDevMode, ppdev->pdmwDev, newDevMode->dmSize) == newDevMode->dmSize && + !(flags & CDS_RESET)) { ERR("DEVMODE matches, nothing to do\n"); goto leave; @@ -759,7 +761,7 @@ UserChangeDisplaySettings( pvOldCursor = UserSetCursor(NULL, TRUE); /* Do the mode switch */ - ulResult = PDEVOBJ_bSwitchMode(ppdev, pdm); + ulResult = PDEVOBJ_bSwitchMode(ppdev, newDevMode); /* Restore mouse pointer, no hooks called */ pvOldCursor = UserSetCursor(pvOldCursor, TRUE); @@ -781,6 +783,8 @@ UserChangeDisplaySettings( { /* Setting mode succeeded */ lResult = DISP_CHANGE_SUCCESSFUL; + ExFreePoolWithTag(ppdev->pdmwDev, GDITAG_DEVMODE); + ppdev->pdmwDev = newDevMode; UserUpdateFullscreen(flags); @@ -847,6 +851,9 @@ UserChangeDisplaySettings( } leave: + if (newDevMode && newDevMode != ppdev->pdmwDev) + ExFreePoolWithTag(newDevMode, GDITAG_DEVMODE); + /* Release the PDEV */ PDEVOBJ_vRelease(ppdev);
2 years, 8 months
1
0
0
0
[reactos] 03/18: [WIN32SS] Extract devmode list query to new function LDEVOBJ_bBuildDevmodeList
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=21ddeb76d91c851d95b6a…
commit 21ddeb76d91c851d95b6ab563517f5ee071b9848 Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Sun Jan 9 10:33:10 2022 +0100 Commit: hpoussin <32227662+hpoussin(a)users.noreply.github.com> CommitDate: Fri Apr 15 23:09:16 2022 +0200 [WIN32SS] Extract devmode list query to new function LDEVOBJ_bBuildDevmodeList LDEVOBJ_bBuildDevmodeList() only queries the available display modes, without choosing the one to use on the graphic device, and without immediately creating a PDEV. Replace first part of EngpPopulateDeviceModeList() function by a call to this new function LDEVOBJ_bBuildDevmodeList(). Keep second part of EngpPopulateDeviceModeList() function, which chooses the default display mode. --- win32ss/gdi/eng/device.c | 92 +++------------------------------------ win32ss/gdi/eng/ldevobj.c | 107 ++++++++++++++++++++++++++++++++++++++++++++++ win32ss/gdi/eng/ldevobj.h | 4 ++ 3 files changed, 118 insertions(+), 85 deletions(-) diff --git a/win32ss/gdi/eng/device.c b/win32ss/gdi/eng/device.c index 27edfe2a56e..8ad49ed5fd1 100644 --- a/win32ss/gdi/eng/device.c +++ b/win32ss/gdi/eng/device.c @@ -129,81 +129,17 @@ EngpPopulateDeviceModeList( _Inout_ PGRAPHICS_DEVICE pGraphicsDevice, _In_ PDEVMODEW pdmDefault) { - PWSTR pwsz; PDEVMODEINFO pdminfo; - PDEVMODEW pdm, pdmEnd; - ULONG i, cModes = 0; + PDEVMODEW pdm; + ULONG i; BOOLEAN bModeMatch = FALSE; - ULONG cbSize, cbFull; ASSERT(pGraphicsDevice->pdevmodeInfo == NULL); ASSERT(pGraphicsDevice->pDevModeList == NULL); - pwsz = pGraphicsDevice->pDiplayDrivers; - - /* Loop through the driver names - * This is a REG_MULTI_SZ string */ - for (; *pwsz; pwsz += wcslen(pwsz) + 1) - { - /* Get the mode list from the driver */ - TRACE("Trying driver: %ls\n", pwsz); - cbSize = LDEVOBJ_ulGetDriverModes(pwsz, pGraphicsDevice->DeviceObject, &pdm); - if (!cbSize) - { - WARN("Driver %ls returned no valid mode\n", pwsz); - continue; - } - - /* Add space for the header */ - cbFull = cbSize + FIELD_OFFSET(DEVMODEINFO, adevmode); - - /* Allocate a buffer for the DEVMODE array */ - pdminfo = ExAllocatePoolWithTag(PagedPool, cbFull, GDITAG_DEVMODE); - if (!pdminfo) - { - ERR("Could not allocate devmodeinfo\n"); - continue; - } - - pdminfo->pldev = LDEVOBJ_pLoadDriver(pwsz, LDEV_DEVICE_DISPLAY); - pdminfo->cbdevmode = cbSize; - RtlCopyMemory(pdminfo->adevmode, pdm, cbSize); - - /* Attach the mode info to the device */ - pdminfo->pdmiNext = pGraphicsDevice->pdevmodeInfo; - pGraphicsDevice->pdevmodeInfo = pdminfo; - - /* Loop all DEVMODEs */ - pdmEnd = (DEVMODEW*)((PCHAR)pdminfo->adevmode + pdminfo->cbdevmode); - for (pdm = pdminfo->adevmode; - (pdm + 1 <= pdmEnd) && (pdm->dmSize != 0); - pdm = (DEVMODEW*)((PCHAR)pdm + pdm->dmSize + pdm->dmDriverExtra)) - { - /* Count this DEVMODE */ - cModes++; - - /* Some drivers like the VBox driver don't fill the dmDeviceName - with the name of the display driver. So fix that here. */ - RtlStringCbCopyW(pdm->dmDeviceName, sizeof(pdm->dmDeviceName), pwsz); - } - - // FIXME: release the driver again until it's used? - } - - if (!pGraphicsDevice->pdevmodeInfo || cModes == 0) + if (!LDEVOBJ_bBuildDevmodeList(pGraphicsDevice)) { - ERR("No devmodes\n"); - return FALSE; - } - - /* Allocate an index buffer */ - pGraphicsDevice->cDevModes = cModes; - pGraphicsDevice->pDevModeList = ExAllocatePoolWithTag(PagedPool, - cModes * sizeof(DEVMODEENTRY), - GDITAG_GDEVICE); - if (!pGraphicsDevice->pDevModeList) - { - ERR("No devmode list\n"); + ERR("LDEVOBJ_bBuildDevmodeList() failed\n"); return FALSE; } @@ -218,20 +154,11 @@ EngpPopulateDeviceModeList( pdminfo; pdminfo = pdminfo->pdmiNext) { - /* Calculate End of the DEVMODEs */ - pdmEnd = (DEVMODEW*)((PCHAR)pdminfo->adevmode + pdminfo->cbdevmode); - /* Loop through the DEVMODEs */ - for (pdm = pdminfo->adevmode; - (pdm + 1 <= pdmEnd) && (pdm->dmSize != 0); - pdm = (PDEVMODEW)((PCHAR)pdm + pdm->dmSize + pdm->dmDriverExtra)) + for (i = 0; i < pGraphicsDevice->cDevModes; i++) { - TRACE(" %S has mode %lux%lux%lu(%lu Hz)\n", - pdm->dmDeviceName, - pdm->dmPelsWidth, - pdm->dmPelsHeight, - pdm->dmBitsPerPel, - pdm->dmDisplayFrequency); + pdm = pGraphicsDevice->pDevModeList[i].pdm; + /* Compare with the default entry */ if (!bModeMatch && pdm->dmBitsPerPel == pdmDefault->dmBitsPerPel && @@ -247,11 +174,6 @@ EngpPopulateDeviceModeList( bModeMatch = TRUE; } } - - /* Initialize the entry */ - pGraphicsDevice->pDevModeList[i].dwFlags = 0; - pGraphicsDevice->pDevModeList[i].pdm = pdm; - i++; } } return TRUE; diff --git a/win32ss/gdi/eng/ldevobj.c b/win32ss/gdi/eng/ldevobj.c index b1cdc7b1247..e2079da8178 100644 --- a/win32ss/gdi/eng/ldevobj.c +++ b/win32ss/gdi/eng/ldevobj.c @@ -450,6 +450,113 @@ leave: return pldev; } +BOOL +LDEVOBJ_bBuildDevmodeList( + _Inout_ PGRAPHICS_DEVICE pGraphicsDevice) +{ + PWSTR pwsz; + PDEVMODEINFO pdminfo; + PDEVMODEW pdm, pdmEnd; + ULONG i, cModes = 0; + ULONG cbSize, cbFull; + + if (pGraphicsDevice->pdevmodeInfo) + return TRUE; + ASSERT(pGraphicsDevice->pDevModeList == NULL); + + pwsz = pGraphicsDevice->pDiplayDrivers; + + /* Loop through the driver names + * This is a REG_MULTI_SZ string */ + for (; *pwsz; pwsz += wcslen(pwsz) + 1) + { + /* Get the mode list from the driver */ + TRACE("Trying driver: %ls\n", pwsz); + cbSize = LDEVOBJ_ulGetDriverModes(pwsz, pGraphicsDevice->DeviceObject, &pdm); + if (!cbSize) + { + WARN("Driver %ls returned no valid mode\n", pwsz); + continue; + } + + /* Add space for the header */ + cbFull = cbSize + FIELD_OFFSET(DEVMODEINFO, adevmode); + + /* Allocate a buffer for the DEVMODE array */ + pdminfo = ExAllocatePoolWithTag(PagedPool, cbFull, GDITAG_DEVMODE); + if (!pdminfo) + { + ERR("Could not allocate devmodeinfo\n"); + continue; + } + + pdminfo->cbdevmode = cbSize; + RtlCopyMemory(pdminfo->adevmode, pdm, cbSize); + + /* Attach the mode info to the device */ + pdminfo->pdmiNext = pGraphicsDevice->pdevmodeInfo; + pGraphicsDevice->pdevmodeInfo = pdminfo; + + /* Loop all DEVMODEs */ + pdmEnd = (DEVMODEW*)((PCHAR)pdminfo->adevmode + pdminfo->cbdevmode); + for (pdm = pdminfo->adevmode; + (pdm + 1 <= pdmEnd) && (pdm->dmSize != 0); + pdm = (DEVMODEW*)((PCHAR)pdm + pdm->dmSize + pdm->dmDriverExtra)) + { + /* Count this DEVMODE */ + cModes++; + + /* Some drivers like the VBox driver don't fill the dmDeviceName + with the name of the display driver. So fix that here. */ + RtlStringCbCopyW(pdm->dmDeviceName, sizeof(pdm->dmDeviceName), pwsz); + } + } + + if (!pGraphicsDevice->pdevmodeInfo || cModes == 0) + { + ERR("No devmodes\n"); + return FALSE; + } + + /* Allocate an index buffer */ + pGraphicsDevice->cDevModes = cModes; + pGraphicsDevice->pDevModeList = ExAllocatePoolWithTag(PagedPool, + cModes * sizeof(DEVMODEENTRY), + GDITAG_GDEVICE); + if (!pGraphicsDevice->pDevModeList) + { + ERR("No devmode list\n"); + return FALSE; + } + + /* Loop through all DEVMODEINFOs */ + for (pdminfo = pGraphicsDevice->pdevmodeInfo, i = 0; + pdminfo; + pdminfo = pdminfo->pdmiNext) + { + /* Calculate End of the DEVMODEs */ + pdmEnd = (DEVMODEW*)((PCHAR)pdminfo->adevmode + pdminfo->cbdevmode); + + /* Loop through the DEVMODEs */ + for (pdm = pdminfo->adevmode; + (pdm + 1 <= pdmEnd) && (pdm->dmSize != 0); + pdm = (PDEVMODEW)((PCHAR)pdm + pdm->dmSize + pdm->dmDriverExtra)) + { + TRACE(" %S has mode %lux%lux%lu(%lu Hz)\n", + pdm->dmDeviceName, + pdm->dmPelsWidth, + pdm->dmPelsHeight, + pdm->dmBitsPerPel, + pdm->dmDisplayFrequency); + + /* Initialize the entry */ + pGraphicsDevice->pDevModeList[i].dwFlags = 0; + pGraphicsDevice->pDevModeList[i].pdm = pdm; + i++; + } + } + return TRUE; +} /** Exported functions ********************************************************/ diff --git a/win32ss/gdi/eng/ldevobj.h b/win32ss/gdi/eng/ldevobj.h index 351328fe61e..cac2ec8f5e0 100644 --- a/win32ss/gdi/eng/ldevobj.h +++ b/win32ss/gdi/eng/ldevobj.h @@ -52,6 +52,10 @@ LDEVOBJ_pLoadDriver( _In_z_ LPWSTR pwszDriverName, _In_ ULONG ldevtype); +BOOL +LDEVOBJ_bBuildDevmodeList( + _Inout_ PGRAPHICS_DEVICE pGraphicsDevice); + PLDEVOBJ NTAPI EngGetLDEV(
2 years, 8 months
1
0
0
0
[reactos] 02/18: [WIN32SS] Implement LDEVOBJ_ulGetDriverModes
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7d93362f5aa002fe40366…
commit 7d93362f5aa002fe4036691976e1f092334f4857 Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Sun Jan 9 09:54:53 2022 +0100 Commit: hpoussin <32227662+hpoussin(a)users.noreply.github.com> CommitDate: Fri Apr 15 23:09:16 2022 +0200 [WIN32SS] Implement LDEVOBJ_ulGetDriverModes - implement LDEVOBJ_ulGetDriverModes (which get modes from a not yet loaded driver), and use it in EngpPopulateDeviceModeList - remove now useless LDEVOBJ_pdmiGetModes (replaced by LDEVOBJ_ulGetDriverModes) --- win32ss/gdi/eng/device.c | 23 ++++++---- win32ss/gdi/eng/ldevobj.c | 106 +++++++++++++++++++++++----------------------- win32ss/gdi/eng/ldevobj.h | 16 ++++--- 3 files changed, 80 insertions(+), 65 deletions(-) diff --git a/win32ss/gdi/eng/device.c b/win32ss/gdi/eng/device.c index f651c213b09..27edfe2a56e 100644 --- a/win32ss/gdi/eng/device.c +++ b/win32ss/gdi/eng/device.c @@ -130,11 +130,11 @@ EngpPopulateDeviceModeList( _In_ PDEVMODEW pdmDefault) { PWSTR pwsz; - PLDEVOBJ pldev; PDEVMODEINFO pdminfo; PDEVMODEW pdm, pdmEnd; ULONG i, cModes = 0; BOOLEAN bModeMatch = FALSE; + ULONG cbSize, cbFull; ASSERT(pGraphicsDevice->pdevmodeInfo == NULL); ASSERT(pGraphicsDevice->pDevModeList == NULL); @@ -145,23 +145,30 @@ EngpPopulateDeviceModeList( * This is a REG_MULTI_SZ string */ for (; *pwsz; pwsz += wcslen(pwsz) + 1) { - /* Try to load the display driver */ + /* Get the mode list from the driver */ TRACE("Trying driver: %ls\n", pwsz); - pldev = LDEVOBJ_pLoadDriver(pwsz, LDEV_DEVICE_DISPLAY); - if (!pldev) + cbSize = LDEVOBJ_ulGetDriverModes(pwsz, pGraphicsDevice->DeviceObject, &pdm); + if (!cbSize) { - ERR("Could not load driver: '%ls'\n", pwsz); + WARN("Driver %ls returned no valid mode\n", pwsz); continue; } - /* Get the mode list from the driver */ - pdminfo = LDEVOBJ_pdmiGetModes(pldev, pGraphicsDevice->DeviceObject); + /* Add space for the header */ + cbFull = cbSize + FIELD_OFFSET(DEVMODEINFO, adevmode); + + /* Allocate a buffer for the DEVMODE array */ + pdminfo = ExAllocatePoolWithTag(PagedPool, cbFull, GDITAG_DEVMODE); if (!pdminfo) { - ERR("Could not get mode list for '%ls'\n", pwsz); + ERR("Could not allocate devmodeinfo\n"); continue; } + pdminfo->pldev = LDEVOBJ_pLoadDriver(pwsz, LDEV_DEVICE_DISPLAY); + pdminfo->cbdevmode = cbSize; + RtlCopyMemory(pdminfo->adevmode, pdm, cbSize); + /* Attach the mode info to the device */ pdminfo->pdmiNext = pGraphicsDevice->pdevmodeInfo; pGraphicsDevice->pdevmodeInfo = pdminfo; diff --git a/win32ss/gdi/eng/ldevobj.c b/win32ss/gdi/eng/ldevobj.c index 7afbf1584fa..b1cdc7b1247 100644 --- a/win32ss/gdi/eng/ldevobj.c +++ b/win32ss/gdi/eng/ldevobj.c @@ -111,58 +111,6 @@ LDEVOBJ_vFreeLDEV( ExFreePoolWithTag(pldev, GDITAG_LDEV); } -PDEVMODEINFO -NTAPI -LDEVOBJ_pdmiGetModes( - _In_ PLDEVOBJ pldev, - _In_ HANDLE hDriver) -{ - ULONG cbSize, cbFull; - PDEVMODEINFO pdminfo; - - TRACE("LDEVOBJ_pdmiGetModes(%p, %p)\n", pldev, hDriver); - - /* Mirror drivers may omit this function */ - if (!pldev->pfn.GetModes) - { - return NULL; - } - - /* Call the driver to get the required size */ - cbSize = pldev->pfn.GetModes(hDriver, 0, NULL); - if (!cbSize) - { - ERR("DrvGetModes returned 0\n"); - return NULL; - } - - /* Add space for the header */ - cbFull = cbSize + FIELD_OFFSET(DEVMODEINFO, adevmode); - - /* Allocate a buffer for the DEVMODE array */ - pdminfo = ExAllocatePoolWithTag(PagedPool, cbFull, GDITAG_DEVMODE); - if (!pdminfo) - { - ERR("Could not allocate devmodeinfo\n"); - return NULL; - } - - pdminfo->pldev = pldev; - pdminfo->cbdevmode = cbSize; - - /* Call the driver again to fill the buffer */ - cbSize = pldev->pfn.GetModes(hDriver, cbSize, pdminfo->adevmode); - if (!cbSize) - { - /* Could not get modes */ - ERR("returned size %lu(%lu)\n", cbSize, pdminfo->cbdevmode); - ExFreePoolWithTag(pdminfo, GDITAG_DEVMODE); - pdminfo = NULL; - } - - return pdminfo; -} - static BOOL LDEVOBJ_bLoadImage( @@ -277,6 +225,60 @@ LDEVOBJ_bEnableDriver( return TRUE; } +ULONG +LDEVOBJ_ulGetDriverModes( + _In_ LPWSTR pwszDriverName, + _In_ HANDLE hDriver, + _Out_ PDEVMODEW *ppdm) +{ + PLDEVOBJ pldev = NULL; + ULONG cbSize = 0; + PDEVMODEW pdm = NULL; + + TRACE("LDEVOBJ_ulGetDriverModes('%ls', %p)\n", pwszDriverName, hDriver); + + pldev = LDEVOBJ_pLoadDriver(pwszDriverName, LDEV_DEVICE_DISPLAY); + if (!pldev) + goto cleanup; + + /* Mirror drivers may omit this function */ + if (!pldev->pfn.GetModes) + goto cleanup; + + /* Call the driver to get the required size */ + cbSize = pldev->pfn.GetModes(hDriver, 0, NULL); + if (!cbSize) + { + ERR("DrvGetModes returned 0\n"); + goto cleanup; + } + + /* Allocate a buffer for the DEVMODE array */ + pdm = ExAllocatePoolWithTag(PagedPool, cbSize, GDITAG_DEVMODE); + if (!pdm) + { + ERR("Could not allocate devmodeinfo\n"); + goto cleanup; + } + + /* Call the driver again to fill the buffer */ + cbSize = pldev->pfn.GetModes(hDriver, cbSize, pdm); + if (!cbSize) + { + /* Could not get modes */ + ERR("DrvrGetModes returned 0 on second call\n"); + ExFreePoolWithTag(pdm, GDITAG_DEVMODE); + pdm = NULL; + } + +cleanup: + if (pldev) + LDEVOBJ_vUnloadImage(pldev); + + *ppdm = pdm; + return cbSize; +} + static PVOID LDEVOBJ_pvFindImageProcAddress( diff --git a/win32ss/gdi/eng/ldevobj.h b/win32ss/gdi/eng/ldevobj.h index c7b803a9a4c..351328fe61e 100644 --- a/win32ss/gdi/eng/ldevobj.h +++ b/win32ss/gdi/eng/ldevobj.h @@ -34,11 +34,17 @@ NTSTATUS NTAPI InitLDEVImpl(VOID); -PDEVMODEINFO -NTAPI -LDEVOBJ_pdmiGetModes( - _In_ PLDEVOBJ pldev, - _In_ HANDLE hDriver); +/* Get all available device modes from a driver + * - pwszDriverName: name of the driver + * - hDriver: handle of the driver + * - ppdm: allocated memory containing driver modes or NULL on error + * Return value: number of bytes allocated for *ppdm buffer or 0 on error + */ +ULONG +LDEVOBJ_ulGetDriverModes( + _In_ LPWSTR pwszDriverName, + _In_ HANDLE hDriver, + _Out_ PDEVMODEW *ppdm); PLDEVOBJ APIENTRY
2 years, 8 months
1
0
0
0
[reactos] 01/18: [WIN32SS] Rename EngLoadDriverEx to LDEVOBJ_pLoadDriver
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3b234cce25191693e4a2d…
commit 3b234cce25191693e4a2d9903080ac6f46fceaac Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Sun Jan 9 09:42:23 2022 +0100 Commit: hpoussin <32227662+hpoussin(a)users.noreply.github.com> CommitDate: Fri Apr 15 23:09:16 2022 +0200 [WIN32SS] Rename EngLoadDriverEx to LDEVOBJ_pLoadDriver --- win32ss/gdi/eng/device.c | 2 +- win32ss/gdi/eng/ldevobj.c | 8 ++++---- win32ss/gdi/eng/ldevobj.h | 2 +- win32ss/gdi/eng/pdevobj.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/win32ss/gdi/eng/device.c b/win32ss/gdi/eng/device.c index 2777143bf9f..f651c213b09 100644 --- a/win32ss/gdi/eng/device.c +++ b/win32ss/gdi/eng/device.c @@ -147,7 +147,7 @@ EngpPopulateDeviceModeList( { /* Try to load the display driver */ TRACE("Trying driver: %ls\n", pwsz); - pldev = EngLoadImageEx(pwsz, LDEV_DEVICE_DISPLAY); + pldev = LDEVOBJ_pLoadDriver(pwsz, LDEV_DEVICE_DISPLAY); if (!pldev) { ERR("Could not load driver: '%ls'\n", pwsz); diff --git a/win32ss/gdi/eng/ldevobj.c b/win32ss/gdi/eng/ldevobj.c index 852c6822d25..7afbf1584fa 100644 --- a/win32ss/gdi/eng/ldevobj.c +++ b/win32ss/gdi/eng/ldevobj.c @@ -325,7 +325,7 @@ LDEVOBJ_pvFindImageProcAddress( PLDEVOBJ NTAPI -EngLoadImageEx( +LDEVOBJ_pLoadDriver( _In_z_ LPWSTR pwszDriverName, _In_ ULONG ldevtype) { @@ -336,7 +336,7 @@ EngLoadImageEx( SIZE_T cwcLength; LPWSTR pwsz; - TRACE("EngLoadImageEx(%ls, %lu)\n", pwszDriverName, ldevtype); + TRACE("LDEVOBJ_pLoadDriver(%ls, %lu)\n", pwszDriverName, ldevtype); ASSERT(pwszDriverName); /* Initialize buffer for the the driver name */ @@ -444,7 +444,7 @@ leave: /* Unlock loader */ EngReleaseSemaphore(ghsemLDEVList); - TRACE("EngLoadImageEx returning %p\n", pldev); + TRACE("LDEVOBJ_pLoadDriver returning %p\n", pldev); return pldev; } @@ -456,7 +456,7 @@ APIENTRY EngLoadImage( _In_ LPWSTR pwszDriverName) { - return (HANDLE)EngLoadImageEx(pwszDriverName, LDEV_IMAGE); + return (HANDLE)LDEVOBJ_pLoadDriver(pwszDriverName, LDEV_IMAGE); } diff --git a/win32ss/gdi/eng/ldevobj.h b/win32ss/gdi/eng/ldevobj.h index cd15f3cc823..c7b803a9a4c 100644 --- a/win32ss/gdi/eng/ldevobj.h +++ b/win32ss/gdi/eng/ldevobj.h @@ -42,7 +42,7 @@ LDEVOBJ_pdmiGetModes( PLDEVOBJ APIENTRY -EngLoadImageEx( +LDEVOBJ_pLoadDriver( _In_z_ LPWSTR pwszDriverName, _In_ ULONG ldevtype); diff --git a/win32ss/gdi/eng/pdevobj.c b/win32ss/gdi/eng/pdevobj.c index a9f959b4b23..e764dea384c 100644 --- a/win32ss/gdi/eng/pdevobj.c +++ b/win32ss/gdi/eng/pdevobj.c @@ -386,7 +386,7 @@ EngpCreatePDEV( } /* Try to get a diplay driver */ - ppdev->pldev = EngLoadImageEx(pdm->dmDeviceName, LDEV_DEVICE_DISPLAY); + ppdev->pldev = LDEVOBJ_pLoadDriver(pdm->dmDeviceName, LDEV_DEVICE_DISPLAY); if (!ppdev->pldev) { DPRINT1("Could not load display driver '%ls', '%ls'\n",
2 years, 8 months
1
0
0
0
[reactos] 01/01: [NTUSER][IMM32_APITEST] Associate HIMC to WND (#4451)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3820744a18cc4ea1b2a44…
commit 3820744a18cc4ea1b2a44d6c07f03c154f7e2796 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Apr 15 13:16:50 2022 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Fri Apr 15 13:16:50 2022 +0900 [NTUSER][IMM32_APITEST] Associate HIMC to WND (#4451) - Set the default input context to WND at IntCreateWindow function. - Add more tests to the himc testcase of imm32_apitest. CORE-11700 --- modules/rostests/apitests/imm32/himc.c | 43 +++++++++++++++++++++++++++++++++- win32ss/user/ntuser/window.c | 4 ++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/modules/rostests/apitests/imm32/himc.c b/modules/rostests/apitests/imm32/himc.c index 050bd324e10..d2e7104ba24 100644 --- a/modules/rostests/apitests/imm32/himc.c +++ b/modules/rostests/apitests/imm32/himc.c @@ -7,7 +7,7 @@ #include "precomp.h" -START_TEST(himc) +static void Test1(void) { DWORD style; HWND hwndEdit, hwndStatic; @@ -152,3 +152,44 @@ START_TEST(himc) DestroyWindow(hwndEdit); DestroyWindow(hwndStatic); } + +static void Test2(void) +{ + static const LPCSTR apszClasses[] = + { + "BUTTON", + "COMBOBOX", + "EDIT", + "LISTBOX", + "SCROLLBAR", + "STATIC" + }; + size_t i; + HIMC hIMC; + HWND hwnd; + + for (i = 0; i < _countof(apszClasses); ++i) + { + LPCSTR pszClass = apszClasses[i]; + hwnd = CreateWindowA(pszClass, NULL, WS_VISIBLE, 0, 0, 0, 0, NULL, NULL, + GetModuleHandle(NULL), NULL); + ok(hwnd != NULL, "CreateWindow failed\n"); + + hIMC = ImmGetContext(hwnd); + + if (lstrcmpiA(pszClass, "BUTTON") == 0) + ok(hIMC == NULL, "hIMC was %p\n", hIMC); + else + ok(hIMC != NULL, "hIMC was NULL\n"); + + ImmReleaseContext(hwnd, hIMC); + + DestroyWindow(hwnd); + } +} + +START_TEST(himc) +{ + Test1(); + Test2(); +} diff --git a/win32ss/user/ntuser/window.c b/win32ss/user/ntuser/window.c index 3cf1fd22a99..025e80e578f 100644 --- a/win32ss/user/ntuser/window.c +++ b/win32ss/user/ntuser/window.c @@ -1866,6 +1866,10 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs, pWnd->ExStyle = Cs->dwExStyle; pWnd->cbwndExtra = pWnd->pcls->cbwndExtra; pWnd->pActCtx = acbiBuffer; + + if (pti->spDefaultImc && Class->atomClassName != gpsi->atomSysClass[ICLS_BUTTON]) + pWnd->hImc = UserHMGetHandle(pti->spDefaultImc); + pWnd->InternalPos.MaxPos.x = pWnd->InternalPos.MaxPos.y = -1; pWnd->InternalPos.IconPos.x = pWnd->InternalPos.IconPos.y = -1;
2 years, 8 months
1
0
0
0
[reactos] 01/01: [IMM32] Improve ImmLockClientImc (#4450)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f848343bffa662c6c4fc8…
commit f848343bffa662c6c4fc81b0198256d1d1edcbbc Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Thu Apr 14 14:10:19 2022 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Thu Apr 14 14:10:19 2022 +0900 [IMM32] Improve ImmLockClientImc (#4450) CORE-11700 --- dll/win32/imm32/imm.c | 35 +++++++++++++++++------------------ dll/win32/imm32/utils.c | 1 + 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c index 4a440d9fb41..5d199630229 100644 --- a/dll/win32/imm32/imm.c +++ b/dll/win32/imm32/imm.c @@ -907,38 +907,37 @@ PCLIENTIMC WINAPI ImmLockClientImc(HIMC hImc) TRACE("(%p)\n", hImc); - if (hImc == NULL) + if (!hImc) return NULL; pIMC = ValidateHandleNoErr(hImc, TYPE_INPUTCONTEXT); - if (pIMC == NULL || !Imm32CheckImcProcess(pIMC)) + if (!pIMC || !Imm32CheckImcProcess(pIMC)) return NULL; pClientImc = (PCLIENTIMC)pIMC->dwClientImcData; - if (!pClientImc) + if (pClientImc) { - pClientImc = ImmLocalAlloc(HEAP_ZERO_MEMORY, sizeof(CLIENTIMC)); - if (!pClientImc) + if (pClientImc->dwFlags & CLIENTIMC_DESTROY) return NULL; + goto Finish; + } - RtlInitializeCriticalSection(&pClientImc->cs); - - pClientImc->dwCompatFlags = (DWORD)NtUserGetThreadState(THREADSTATE_IMECOMPATFLAGS); + pClientImc = ImmLocalAlloc(HEAP_ZERO_MEMORY, sizeof(CLIENTIMC)); + if (!pClientImc) + return NULL; - if (!NtUserUpdateInputContext(hImc, UIC_CLIENTIMCDATA, (DWORD_PTR)pClientImc)) - { - ImmLocalFree(pClientImc); - return NULL; - } + RtlInitializeCriticalSection(&pClientImc->cs); + pClientImc->dwCompatFlags = (DWORD)NtUserGetThreadState(THREADSTATE_IMECOMPATFLAGS); - pClientImc->dwFlags |= CLIENTIMC_UNKNOWN2; - } - else + if (!NtUserUpdateInputContext(hImc, UIC_CLIENTIMCDATA, (DWORD_PTR)pClientImc)) { - if (pClientImc->dwFlags & CLIENTIMC_DESTROY) - return NULL; + ImmLocalFree(pClientImc); + return NULL; } + pClientImc->dwFlags |= CLIENTIMC_UNKNOWN2; + +Finish: InterlockedIncrement(&pClientImc->cLockObj); return pClientImc; } diff --git a/dll/win32/imm32/utils.c b/dll/win32/imm32/utils.c index 26f6715f4fc..b3618536782 100644 --- a/dll/win32/imm32/utils.c +++ b/dll/win32/imm32/utils.c @@ -213,6 +213,7 @@ PWND FASTCALL ValidateHwndNoErr(HWND hwnd) return ValidateHandleNoErr(hwnd, TYPE_WINDOW); } +// Win: TestInputContextProcess BOOL APIENTRY Imm32CheckImcProcess(PIMC pIMC) { HIMC hIMC;
2 years, 8 months
1
0
0
0
[reactos] 01/01: [IMM32] Add Win: comments more (#4449)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e5f637f93f919667550eb…
commit e5f637f93f919667550eb43b66ff4189012e12fc Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Thu Apr 14 11:23:16 2022 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Thu Apr 14 11:23:16 2022 +0900 [IMM32] Add Win: comments more (#4449) CORE-11700 --- dll/win32/imm32/ime.c | 1 + dll/win32/imm32/precomp.h | 1 + dll/win32/imm32/utils.c | 3 +++ 3 files changed, 5 insertions(+) diff --git a/dll/win32/imm32/ime.c b/dll/win32/imm32/ime.c index 5b7720363aa..e9c80d195b5 100644 --- a/dll/win32/imm32/ime.c +++ b/dll/win32/imm32/ime.c @@ -355,6 +355,7 @@ Quit: return ret; } +// Win: ImmGetImeMenuItemsInterProcess DWORD APIENTRY Imm32GetImeMenuItemWCrossProcess(HIMC hIMC, DWORD dwFlags, DWORD dwType, LPVOID lpImeParentMenu, LPVOID lpImeMenu, DWORD dwSize) diff --git a/dll/win32/imm32/precomp.h b/dll/win32/imm32/precomp.h index f80fe47781c..82af0034e9b 100644 --- a/dll/win32/imm32/precomp.h +++ b/dll/win32/imm32/precomp.h @@ -102,6 +102,7 @@ static inline BOOL Imm32IsCrossThreadAccess(HIMC hIMC) return (dwImeThreadId != dwThreadId); } +// Win: TestWindowProcess static inline BOOL Imm32IsCrossProcessAccess(HWND hWnd) { return (NtUserQueryWindow(hWnd, QUERY_WINDOW_UNIQUE_PROCESS_ID) != diff --git a/dll/win32/imm32/utils.c b/dll/win32/imm32/utils.c index 810bd0acd58..26f6715f4fc 100644 --- a/dll/win32/imm32/utils.c +++ b/dll/win32/imm32/utils.c @@ -50,6 +50,7 @@ BOOL APIENTRY Imm32IsSystemJapaneseOrKorean(VOID) return (wPrimary == LANG_JAPANESE || wPrimary == LANG_KOREAN); } +// Win: IsAnsiIMC BOOL WINAPI Imm32IsImcAnsi(HIMC hIMC) { BOOL ret; @@ -166,6 +167,7 @@ static PVOID FASTCALL DesktopPtrToUser(PVOID ptr) return (PVOID)NtUserCallOneParam((DWORD_PTR)ptr, ONEPARAM_ROUTINE_GETDESKTOPMAPPING); } +// Win: HMValidateHandle LPVOID FASTCALL ValidateHandleNoErr(HANDLE hObject, UINT uType) { UINT index; @@ -223,6 +225,7 @@ BOOL APIENTRY Imm32CheckImcProcess(PIMC pIMC) return dwProcessID == (DWORD_PTR)NtCurrentTeb()->ClientId.UniqueProcess; } +// Win: ImmLocalAlloc LPVOID APIENTRY ImmLocalAlloc(DWORD dwFlags, DWORD dwBytes) { if (!ghImmHeap)
2 years, 8 months
1
0
0
0
[reactos] 01/01: [CMAKE] msvc.cmake: Enable C4090 warning as error
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0c5fc49f828a0dff16cbe…
commit 0c5fc49f828a0dff16cbe127d54d5e1ad22c40c9 Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr> AuthorDate: Mon Apr 11 21:07:19 2022 +0200 Commit: Victor Perevertkin <victor(a)perevertkin.ru> CommitDate: Tue Apr 12 02:08:45 2022 +0300 [CMAKE] msvc.cmake: Enable C4090 warning as error C4090: different 'modifier' qualifiers Follow-up to 42d2d5e (0.4.14-dev-847) and 41bc57d (0.4.15-dev-2952), which silenced affected modules. CORE-7538 --- sdk/cmake/msvc.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake index 9f6d4544003..af021129b22 100644 --- a/sdk/cmake/msvc.cmake +++ b/sdk/cmake/msvc.cmake @@ -114,7 +114,7 @@ else() # - C4022: pointer type mismatch for parameter # - C4028: formal parameter different from declaration # - C4047: different level of indirection -# - TODO: C4090: different 'modifier' qualifiers (for C programs only; +# - C4090: different 'modifier' qualifiers (for C programs only; # for C++ programs, the compiler error C2440 is issued) # - C4098: void function returning a value # - C4113: parameter lists differ @@ -130,7 +130,7 @@ else() # - C4700: uninitialized variable usage # - C4715: 'function': not all control paths return a value # - C4716: function must return a value -add_compile_options(/we4013 /we4020 /we4022 /we4028 /we4047 /we4098 /we4113 /we4129 /we4133 /we4163 /we4229 /we4311 /we4312 /we4313 /we4477 /we4603 /we4700 /we4715 /we4716) +add_compile_options(/we4013 /we4020 /we4022 /we4028 /we4047 /we4090 /we4098 /we4113 /we4129 /we4133 /we4163 /we4229 /we4311 /we4312 /we4313 /we4477 /we4603 /we4700 /we4715 /we4716) # - C4101: unreferenced local variable # - C4189: local variable initialized but not referenced
2 years, 8 months
1
0
0
0
[reactos] 01/01: [TASKMGR] Processes page: Add "Properties" and "Open File Location" context menu items (#4323)
by Thamatip Chitpong
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=59dcec1fafcb27ad18b24…
commit 59dcec1fafcb27ad18b246d34531e3373c8c1012 Author: Thamatip Chitpong <weedgamer131(a)gmail.com> AuthorDate: Mon Apr 11 23:28:28 2022 +0700 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Apr 11 19:28:28 2022 +0300 [TASKMGR] Processes page: Add "Properties" and "Open File Location" context menu items (#4323) Signed-off-by: Thamatip Chitpong <tangaming123456(a)outlook.com> Reviewed-by: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> Reviewed-by: Joachim Henze <joachim.henze(a)reactos.org> Reviewed-by: Mark Jansen <mark.jansen(a)reactos.org> --- base/applications/taskmgr/lang/bg-BG.rc | 3 + base/applications/taskmgr/lang/cs-CZ.rc | 3 + base/applications/taskmgr/lang/da-DK.rc | 3 + base/applications/taskmgr/lang/de-DE.rc | 3 + base/applications/taskmgr/lang/el-GR.rc | 3 + base/applications/taskmgr/lang/en-US.rc | 3 + base/applications/taskmgr/lang/es-ES.rc | 3 + base/applications/taskmgr/lang/et-EE.rc | 3 + base/applications/taskmgr/lang/fr-FR.rc | 3 + base/applications/taskmgr/lang/he-IL.rc | 3 + base/applications/taskmgr/lang/hu-HU.rc | 3 + base/applications/taskmgr/lang/id-ID.rc | 3 + base/applications/taskmgr/lang/it-IT.rc | 3 + base/applications/taskmgr/lang/ja-JP.rc | 3 + base/applications/taskmgr/lang/ko-KR.rc | 3 + base/applications/taskmgr/lang/nl-NL.rc | 3 + base/applications/taskmgr/lang/no-NO.rc | 3 + base/applications/taskmgr/lang/pl-PL.rc | 3 + base/applications/taskmgr/lang/pt-BR.rc | 3 + base/applications/taskmgr/lang/pt-PT.rc | 3 + base/applications/taskmgr/lang/ro-RO.rc | 3 + base/applications/taskmgr/lang/ru-RU.rc | 3 + base/applications/taskmgr/lang/sk-SK.rc | 3 + base/applications/taskmgr/lang/sq-AL.rc | 3 + base/applications/taskmgr/lang/sv-SE.rc | 3 + base/applications/taskmgr/lang/tr-TR.rc | 3 + base/applications/taskmgr/lang/uk-UA.rc | 3 + base/applications/taskmgr/lang/zh-CN.rc | 3 + base/applications/taskmgr/lang/zh-HK.rc | 3 + base/applications/taskmgr/lang/zh-TW.rc | 3 + base/applications/taskmgr/procpage.c | 285 ++++++++++++++++++++++++++++++++ base/applications/taskmgr/procpage.h | 2 + base/applications/taskmgr/resource.h | 2 + base/applications/taskmgr/taskmgr.c | 6 + 34 files changed, 385 insertions(+) diff --git a/base/applications/taskmgr/lang/bg-BG.rc b/base/applications/taskmgr/lang/bg-BG.rc index aae724a2114..9fda1404e35 100644 --- a/base/applications/taskmgr/lang/bg-BG.rc +++ b/base/applications/taskmgr/lang/bg-BG.rc @@ -135,6 +135,9 @@ BEGIN MENUITEM "&Ниско", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Установяване на с&родство...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/cs-CZ.rc b/base/applications/taskmgr/lang/cs-CZ.rc index 38a7817ee1e..31f352519d8 100644 --- a/base/applications/taskmgr/lang/cs-CZ.rc +++ b/base/applications/taskmgr/lang/cs-CZ.rc @@ -135,6 +135,9 @@ BEGIN MENUITEM "Ní&zká", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Nastavit &afinitu...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/da-DK.rc b/base/applications/taskmgr/lang/da-DK.rc index 47bab6303eb..3f4738d3c12 100644 --- a/base/applications/taskmgr/lang/da-DK.rc +++ b/base/applications/taskmgr/lang/da-DK.rc @@ -135,6 +135,9 @@ BEGIN MENUITEM "&Lav", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Sæt &Affinitet...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/de-DE.rc b/base/applications/taskmgr/lang/de-DE.rc index d226c017031..00fbd51bf18 100644 --- a/base/applications/taskmgr/lang/de-DE.rc +++ b/base/applications/taskmgr/lang/de-DE.rc @@ -137,6 +137,9 @@ BEGIN MENUITEM "N&iedrig", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "&Zugehörigkeit festlegen...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Eigenschaften", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "Übergeordneten Ordner ö&ffnen", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/el-GR.rc b/base/applications/taskmgr/lang/el-GR.rc index 4a40eadc75f..2144c926d86 100644 --- a/base/applications/taskmgr/lang/el-GR.rc +++ b/base/applications/taskmgr/lang/el-GR.rc @@ -137,6 +137,9 @@ BEGIN MENUITEM "&Low", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Set &Affinity...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/en-US.rc b/base/applications/taskmgr/lang/en-US.rc index 83239935a66..869c1a46453 100644 --- a/base/applications/taskmgr/lang/en-US.rc +++ b/base/applications/taskmgr/lang/en-US.rc @@ -135,6 +135,9 @@ BEGIN MENUITEM "&Low", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Set &Affinity...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/es-ES.rc b/base/applications/taskmgr/lang/es-ES.rc index 20a8225ebac..b60493e3516 100644 --- a/base/applications/taskmgr/lang/es-ES.rc +++ b/base/applications/taskmgr/lang/es-ES.rc @@ -137,6 +137,9 @@ BEGIN MENUITEM "&Baja", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Establecer &afinidad...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/et-EE.rc b/base/applications/taskmgr/lang/et-EE.rc index 4f35b67be91..c3579b81222 100644 --- a/base/applications/taskmgr/lang/et-EE.rc +++ b/base/applications/taskmgr/lang/et-EE.rc @@ -142,6 +142,9 @@ BEGIN MENUITEM "&Madal", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Määra &ühtivus...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/fr-FR.rc b/base/applications/taskmgr/lang/fr-FR.rc index fb738d84cd4..1963ca42aab 100644 --- a/base/applications/taskmgr/lang/fr-FR.rc +++ b/base/applications/taskmgr/lang/fr-FR.rc @@ -137,6 +137,9 @@ BEGIN MENUITEM "&Basse", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Définir l'&affinité...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/he-IL.rc b/base/applications/taskmgr/lang/he-IL.rc index 7d1f2ec00fa..de908030407 100644 --- a/base/applications/taskmgr/lang/he-IL.rc +++ b/base/applications/taskmgr/lang/he-IL.rc @@ -137,6 +137,9 @@ BEGIN MENUITEM "&נמוכה", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "הגדרת &קירבה", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/hu-HU.rc b/base/applications/taskmgr/lang/hu-HU.rc index 998691c1ac3..ecebcf4da12 100644 --- a/base/applications/taskmgr/lang/hu-HU.rc +++ b/base/applications/taskmgr/lang/hu-HU.rc @@ -137,6 +137,9 @@ BEGIN MENUITEM "A&lacsony", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "&Processzorok használata...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/id-ID.rc b/base/applications/taskmgr/lang/id-ID.rc index a5df46cc455..6bf41b18b5b 100644 --- a/base/applications/taskmgr/lang/id-ID.rc +++ b/base/applications/taskmgr/lang/id-ID.rc @@ -137,6 +137,9 @@ BEGIN MENUITEM "&Rendah", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Setel &Afinitas...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/it-IT.rc b/base/applications/taskmgr/lang/it-IT.rc index 982d29fa643..2c1dccf04c7 100644 --- a/base/applications/taskmgr/lang/it-IT.rc +++ b/base/applications/taskmgr/lang/it-IT.rc @@ -135,6 +135,9 @@ BEGIN MENUITEM "&Bassa", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Definisci &Affinità...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/ja-JP.rc b/base/applications/taskmgr/lang/ja-JP.rc index 4976fc37e83..e11322e632d 100644 --- a/base/applications/taskmgr/lang/ja-JP.rc +++ b/base/applications/taskmgr/lang/ja-JP.rc @@ -135,6 +135,9 @@ BEGIN MENUITEM "低(&L)", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "関係の設定(&A)...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/ko-KR.rc b/base/applications/taskmgr/lang/ko-KR.rc index 1398e58f38f..8186cfea508 100644 --- a/base/applications/taskmgr/lang/ko-KR.rc +++ b/base/applications/taskmgr/lang/ko-KR.rc @@ -137,6 +137,9 @@ BEGIN MENUITEM "낮음(&L)", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "선호도 설정(&A)", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/nl-NL.rc b/base/applications/taskmgr/lang/nl-NL.rc index 1c57984f1c6..cbca523ec00 100644 --- a/base/applications/taskmgr/lang/nl-NL.rc +++ b/base/applications/taskmgr/lang/nl-NL.rc @@ -135,6 +135,9 @@ BEGIN MENUITEM "&Laag", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "&Affiniteit instellen...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/no-NO.rc b/base/applications/taskmgr/lang/no-NO.rc index bb177f22cec..2b5eacbeff4 100644 --- a/base/applications/taskmgr/lang/no-NO.rc +++ b/base/applications/taskmgr/lang/no-NO.rc @@ -135,6 +135,9 @@ BEGIN MENUITEM "&Lav", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Sett &tiltrekning ...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/pl-PL.rc b/base/applications/taskmgr/lang/pl-PL.rc index f9cae39cc95..a39b0aa01a0 100644 --- a/base/applications/taskmgr/lang/pl-PL.rc +++ b/base/applications/taskmgr/lang/pl-PL.rc @@ -143,6 +143,9 @@ BEGIN MENUITEM "N&iski", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Ustaw &koligację...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/pt-BR.rc b/base/applications/taskmgr/lang/pt-BR.rc index 86419328a99..a6585c587c3 100644 --- a/base/applications/taskmgr/lang/pt-BR.rc +++ b/base/applications/taskmgr/lang/pt-BR.rc @@ -135,6 +135,9 @@ BEGIN MENUITEM "&Baixa", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Definir &afinidade...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/pt-PT.rc b/base/applications/taskmgr/lang/pt-PT.rc index 251214bd5aa..6e009f07280 100644 --- a/base/applications/taskmgr/lang/pt-PT.rc +++ b/base/applications/taskmgr/lang/pt-PT.rc @@ -137,6 +137,9 @@ BEGIN MENUITEM "&Baixa", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Definir &afinidade...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/ro-RO.rc b/base/applications/taskmgr/lang/ro-RO.rc index c1431a57ea8..987cd264e45 100644 --- a/base/applications/taskmgr/lang/ro-RO.rc +++ b/base/applications/taskmgr/lang/ro-RO.rc @@ -141,6 +141,9 @@ BEGIN MENUITEM "Prioritate &minimă", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "A&finitate…", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/ru-RU.rc b/base/applications/taskmgr/lang/ru-RU.rc index a357c524d34..7450c46138f 100644 --- a/base/applications/taskmgr/lang/ru-RU.rc +++ b/base/applications/taskmgr/lang/ru-RU.rc @@ -137,6 +137,9 @@ BEGIN MENUITEM "&Низкий", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Задать &соответствие...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/sk-SK.rc b/base/applications/taskmgr/lang/sk-SK.rc index 9f5b5c524fd..8598132e3cb 100644 --- a/base/applications/taskmgr/lang/sk-SK.rc +++ b/base/applications/taskmgr/lang/sk-SK.rc @@ -137,6 +137,9 @@ BEGIN MENUITEM "Níz&ka", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Nastaviť &afinitu...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/sq-AL.rc b/base/applications/taskmgr/lang/sq-AL.rc index 6d1fbb53eeb..2edbc0d78aa 100644 --- a/base/applications/taskmgr/lang/sq-AL.rc +++ b/base/applications/taskmgr/lang/sq-AL.rc @@ -139,6 +139,9 @@ BEGIN MENUITEM "Poshte", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Vendos prirje...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/sv-SE.rc b/base/applications/taskmgr/lang/sv-SE.rc index 4f16a45e804..99989a398d8 100644 --- a/base/applications/taskmgr/lang/sv-SE.rc +++ b/base/applications/taskmgr/lang/sv-SE.rc @@ -137,6 +137,9 @@ BEGIN MENUITEM "&Låg", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "Välj &källa (FIXME)...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/tr-TR.rc b/base/applications/taskmgr/lang/tr-TR.rc index 094f42b76f2..2874175e5a6 100644 --- a/base/applications/taskmgr/lang/tr-TR.rc +++ b/base/applications/taskmgr/lang/tr-TR.rc @@ -137,6 +137,9 @@ BEGIN MENUITEM "&Düşük", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "İ&lişkiyi Ayarla...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/uk-UA.rc b/base/applications/taskmgr/lang/uk-UA.rc index 6fb16a776d9..e92c321baf7 100644 --- a/base/applications/taskmgr/lang/uk-UA.rc +++ b/base/applications/taskmgr/lang/uk-UA.rc @@ -135,6 +135,9 @@ BEGIN MENUITEM "&Низький", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "У&становити відповідність...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/zh-CN.rc b/base/applications/taskmgr/lang/zh-CN.rc index e07daf6b781..cfb5e61f04c 100644 --- a/base/applications/taskmgr/lang/zh-CN.rc +++ b/base/applications/taskmgr/lang/zh-CN.rc @@ -142,6 +142,9 @@ BEGIN MENUITEM "低(&L)", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "关系设置(&A)...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/zh-HK.rc b/base/applications/taskmgr/lang/zh-HK.rc index e8d587a6f36..11ce3bdb867 100644 --- a/base/applications/taskmgr/lang/zh-HK.rc +++ b/base/applications/taskmgr/lang/zh-HK.rc @@ -143,6 +143,9 @@ BEGIN MENUITEM "低(&L)", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "親和性設定(&A)...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/lang/zh-TW.rc b/base/applications/taskmgr/lang/zh-TW.rc index f5e7e0ea3b7..40ab78b3465 100644 --- a/base/applications/taskmgr/lang/zh-TW.rc +++ b/base/applications/taskmgr/lang/zh-TW.rc @@ -143,6 +143,9 @@ BEGIN MENUITEM "低(&L)", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "親和性設定(&A)...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM SEPARATOR + MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION END END diff --git a/base/applications/taskmgr/procpage.c b/base/applications/taskmgr/procpage.c index 692c1bd66e5..caa344860a6 100644 --- a/base/applications/taskmgr/procpage.c +++ b/base/applications/taskmgr/procpage.c @@ -5,6 +5,7 @@ * * Copyright (C) 1999 - 2001 Brian Palmer <brianp(a)reactos.org> * Copyright (C) 2009 Maxime Vernier <maxime.vernier(a)gmail.com> + * Copyright (C) 2022 Thamatip Chitpong <tangaming123456(a)outlook.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -25,6 +26,10 @@ #include "proclist.h" +#include <strsafe.h> + +#include <ndk/psfuncs.h> + #define CMP(x1, x2)\ (x1 < x2 ? -1 : (x1 > x2 ? 1 : 0)) @@ -931,3 +936,283 @@ int CALLBACK ProcessPageCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lPara } return ret; } + +static BOOL DevicePathToDosPath(LPWSTR lpPath, DWORD dwSize) +{ + WCHAR cDrive; + + /* Check if lpPath is a device path */ + if (_wcsnicmp(lpPath, L"\\Device\\", 8) != 0) + { + return FALSE; + } + + for (cDrive = L'A'; cDrive <= L'Z'; cDrive++) + { + WCHAR szDrive[3]; + WCHAR szDevPath[MAX_PATH]; + + szDrive[0] = cDrive; + szDrive[1] = L':'; + szDrive[2] = UNICODE_NULL; + + if (QueryDosDeviceW(szDrive, szDevPath, _countof(szDevPath)) != 0) + { + size_t len = wcslen(szDevPath); + + if (_wcsnicmp(lpPath, szDevPath, len) == 0) + { + StringCbPrintfW(lpPath, dwSize, L"%s%s", szDrive, lpPath + len); + + return TRUE; + } + } + } + + return FALSE; +} + +static DWORD GetProcessExecutablePath(HANDLE hProcess, LPWSTR lpExePath, DWORD dwLength) +{ + BYTE StaticBuffer[sizeof(UNICODE_STRING) + (MAX_PATH * sizeof(WCHAR))]; + PVOID DynamicBuffer = NULL; + PUNICODE_STRING ImagePath = NULL; + LPWSTR pszExePath = NULL; + ULONG SizeNeeded; + NTSTATUS Status; + DWORD dwRet = 0; + + Status = NtQueryInformationProcess(hProcess, + ProcessImageFileName, + StaticBuffer, + sizeof(StaticBuffer) - sizeof(WCHAR), + &SizeNeeded); + + if (Status == STATUS_INFO_LENGTH_MISMATCH) + { + DynamicBuffer = HeapAlloc(GetProcessHeap(), 0, SizeNeeded + sizeof(WCHAR)); + + if (!DynamicBuffer) + { + return 0; + } + + Status = NtQueryInformationProcess(hProcess, + ProcessImageFileName, + DynamicBuffer, + SizeNeeded, + &SizeNeeded); + + ImagePath = (PUNICODE_STRING)DynamicBuffer; + } + else + { + ImagePath = (PUNICODE_STRING)StaticBuffer; + } + + if (!NT_SUCCESS(Status)) + { + goto Cleanup; + } + + pszExePath = HeapAlloc(GetProcessHeap(), 0, ImagePath->Length + sizeof(WCHAR)); + + if (!pszExePath) + { + goto Cleanup; + } + + StringCbCopyNW(pszExePath, ImagePath->Length + sizeof(WCHAR), ImagePath->Buffer, ImagePath->Length); + + if (!DevicePathToDosPath(pszExePath, ImagePath->Length + sizeof(WCHAR))) + { + goto Cleanup; + } + + dwRet = wcslen(pszExePath) + 1; + + if (dwLength >= dwRet) + { + StringCchCopyW(lpExePath, dwLength, pszExePath); + + dwRet -= 1; + } + +Cleanup: + + if (pszExePath) + { + HeapFree(GetProcessHeap(), 0, pszExePath); + } + + if (DynamicBuffer) + { + HeapFree(GetProcessHeap(), 0, DynamicBuffer); + } + + return dwRet; +} + +static DWORD GetProcessExecutablePathById(DWORD dwProcessId, LPWSTR lpExePath, DWORD dwLength) +{ + DWORD dwRet = 0; + + if (dwProcessId == 0) + { + return 0; + } + + /* PID = 4 or "System" */ + if (dwProcessId == 4) + { + static const WCHAR szKernelExe[] = L"\\ntoskrnl.exe"; + WCHAR szSystemDir[MAX_PATH]; + UINT uLength; + + uLength = GetSystemDirectoryW(szSystemDir, _countof(szSystemDir)); + + if (uLength != 0) + { + dwRet = uLength + _countof(szKernelExe); + + if (dwLength >= dwRet) + { + StringCchPrintfW(lpExePath, dwLength, L"%s%s", szSystemDir, szKernelExe); + + dwRet -= 1; + } + } + } + else + { + HANDLE hProcess; + + hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, dwProcessId); + + if (hProcess) + { + dwRet = GetProcessExecutablePath(hProcess, lpExePath, dwLength); + + CloseHandle(hProcess); + } + } + + return dwRet; +} + +void ProcessPage_OnProperties(void) +{ + DWORD dwProcessId; + WCHAR szPath[MAX_PATH]; + LPWSTR pszPath = NULL; + LPWSTR pszExePath = NULL; + DWORD dwLength; + SHELLEXECUTEINFOW info = { 0 }; + + dwProcessId = GetSelectedProcessId(); + dwLength = GetProcessExecutablePathById(dwProcessId, szPath, _countof(szPath)); + + if (dwLength == 0) + { + return; + } + else if (dwLength > _countof(szPath)) + { + pszPath = HeapAlloc(GetProcessHeap(), 0, dwLength * sizeof(WCHAR)); + + if (!pszPath) + { + return; + } + + if (GetProcessExecutablePathById(dwProcessId, pszPath, dwLength) == 0) + { + goto Cleanup; + } + + pszExePath = pszPath; + } + else + { + pszExePath = szPath; + } + + info.cbSize = sizeof(SHELLEXECUTEINFOW); + info.fMask = SEE_MASK_INVOKEIDLIST; + info.hwnd = NULL; + info.lpVerb = L"properties"; + info.lpFile = pszExePath; + info.lpParameters = L""; + info.lpDirectory = NULL; + info.nShow = SW_SHOW; + info.hInstApp = NULL; + + ShellExecuteExW(&info); + +Cleanup: + + if (pszPath) + { + HeapFree(GetProcessHeap(), 0, pszPath); + } +} + +void ProcessPage_OnOpenFileLocation(void) +{ + DWORD dwProcessId; + WCHAR szPath[MAX_PATH]; + LPWSTR pszPath = NULL; + LPWSTR pszExePath = NULL; + LPWSTR pszCmdLine = NULL; + DWORD dwLength; + + dwProcessId = GetSelectedProcessId(); + dwLength = GetProcessExecutablePathById(dwProcessId, szPath, _countof(szPath)); + + if (dwLength == 0) + { + return; + } + else if (dwLength > _countof(szPath)) + { + pszPath = HeapAlloc(GetProcessHeap(), 0, dwLength * sizeof(WCHAR)); + + if (!pszPath) + { + return; + } + + if (GetProcessExecutablePathById(dwProcessId, pszPath, dwLength) == 0) + { + goto Cleanup; + } + + pszExePath = pszPath; + } + else + { + pszExePath = szPath; + dwLength += 1; + } + + pszCmdLine = HeapAlloc(GetProcessHeap(), 0, (dwLength + 10) * sizeof(WCHAR)); + + if (!pszCmdLine) + { + goto Cleanup; + } + + StringCchPrintfW(pszCmdLine, dwLength + 10, L"/select,\"%s\"", pszExePath); + + /* Open file explorer and select the exe file */ + ShellExecuteW(NULL, L"open", L"explorer.exe", pszCmdLine, NULL, SW_SHOWNORMAL); + + HeapFree(GetProcessHeap(), 0, pszCmdLine); + +Cleanup: + + if (pszPath) + { + HeapFree(GetProcessHeap(), 0, pszPath); + } +} diff --git a/base/applications/taskmgr/procpage.h b/base/applications/taskmgr/procpage.h index ff244a9ab6a..2a22951bce8 100644 --- a/base/applications/taskmgr/procpage.h +++ b/base/applications/taskmgr/procpage.h @@ -31,3 +31,5 @@ extern HWND hProcessPageShowAllProcessesButton; /* Process Show All Processes c INT_PTR CALLBACK ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); void RefreshProcessPage(void); DWORD GetSelectedProcessId(void); +void ProcessPage_OnProperties(void); +void ProcessPage_OnOpenFileLocation(void); diff --git a/base/applications/taskmgr/resource.h b/base/applications/taskmgr/resource.h index b7b7e7e9d31..c5b9e84ebcf 100644 --- a/base/applications/taskmgr/resource.h +++ b/base/applications/taskmgr/resource.h @@ -179,6 +179,8 @@ #define ID_PROCESS_PAGE_SETPRIORITY_NORMAL 32812 #define ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL 32813 #define ID_PROCESS_PAGE_SETPRIORITY_LOW 32814 +#define ID_PROCESS_PAGE_PROPERTIES 32825 +#define ID_PROCESS_PAGE_OPENFILELOCATION 32826 #define ID_SHUTDOWN_STANDBY 32816 #define ID_SHUTDOWN_HIBERNATE 32817 diff --git a/base/applications/taskmgr/taskmgr.c b/base/applications/taskmgr/taskmgr.c index 12cec3bcb52..1c754858efa 100644 --- a/base/applications/taskmgr/taskmgr.c +++ b/base/applications/taskmgr/taskmgr.c @@ -324,6 +324,12 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) case ID_PROCESS_PAGE_SETPRIORITY_LOW: DoSetPriority(IDLE_PRIORITY_CLASS); break; + case ID_PROCESS_PAGE_PROPERTIES: + ProcessPage_OnProperties(); + break; + case ID_PROCESS_PAGE_OPENFILELOCATION: + ProcessPage_OnOpenFileLocation(); + break; /* ShutDown items */ case ID_SHUTDOWN_STANDBY:
2 years, 8 months
1
0
0
0
← Newer
1
...
8
9
10
11
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