Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial implementation of Utility Manager (Accessibility) #1608

Merged
merged 1 commit into from Aug 19, 2019

Conversation

GeoB99
Copy link
Member

@GeoB99 GeoB99 commented Jun 3, 2019

Purpose

This is the implementation of Utility Manager. For people that don't remember what it is, it's a program to manage accessibility tools which it can be found on Windows XP and Server 2003. The basic functionality is already implemented therefore more has to come.

Presentation

URL Video: https://www.youtube.com/watch?v=6UCuiSpNAVg

JIRA

JIRA Issue: https://jira.reactos.org/browse/CORE-15974

@HBelusca
Copy link
Contributor

HBelusca commented Jun 3, 2019

[00:07:42] c:\reactos-cov\base\applications\utilman\process.c(77): error C4311: 'type cast': pointer truncation from 'HINSTANCE' to 'INT'

@HBelusca HBelusca added the enhancement For PRs with an enhancement/new feature. label Jun 3, 2019
@GeoB99
Copy link
Member Author

GeoB99 commented Jun 3, 2019

As per the documentation:

If the function succeeds, it returns a value greater than 32. If the function fails, it returns an error value that indicates the cause of the failure. The return value is cast as an HINSTANCE for backward compatibility with 16-bit Windows applications. It is not a true HINSTANCE, however. It can be cast only to an int and compared to either 32 or the following error codes below.

Either I am doing it wrong or it's the documentation that says it wrongly. If it's the latter is there an alternative way to catch the code value returned by ShellExecuteW()?

base/applications/utilman/process.c Outdated Show resolved Hide resolved
base/applications/utilman/process.c Outdated Show resolved Hide resolved
Copy link
Contributor

@amber8706 amber8706 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, it is necessary to take information from the registry?: "hklm\software\microsoft\windows nt\currentversion\accessibility"

base/applications/utilman/dialog.c Show resolved Hide resolved
base/applications/utilman/lang/en-US.rc Outdated Show resolved Hide resolved
base/applications/utilman/dialog.c Outdated Show resolved Hide resolved
base/applications/utilman/process.c Outdated Show resolved Hide resolved
base/applications/utilman/dialog.c Outdated Show resolved Hide resolved
base/applications/utilman/dialog.c Outdated Show resolved Hide resolved
base/applications/utilman/dialog.c Outdated Show resolved Hide resolved
base/applications/utilman/dialog.c Outdated Show resolved Hide resolved
base/applications/utilman/dialog.c Outdated Show resolved Hide resolved
base/applications/utilman/dialog.c Outdated Show resolved Hide resolved
@GeoB99
Copy link
Member Author

GeoB99 commented Jun 9, 2019

hard coded? Windows retrieve this values from registry: "hklm\software\microsoft\windows nt\currentversion\accessibility"

As said, this is an initial implementation of Utility Manager. Implementation of registry configuration handler will come later (see NOTES on commit files) as it'll take quite a couple of time to figure out the correct implementation.

Thank you for pointing out the registry key though. This will help me know where are the values which Utility Manager manages stored.

@HBelusca HBelusca self-assigned this Jun 9, 2019
@HBelusca HBelusca added the WIP label Jun 9, 2019
@tkreuzer tkreuzer added this to New PRs in ReactOS PRs Jun 16, 2019
@tkreuzer tkreuzer moved this from New PRs to WIP / Waiting on contributor in ReactOS PRs Jun 23, 2019
@GeoB99 GeoB99 requested a review from ThFabba as a code owner July 28, 2019 18:16
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_SHOWNORMAL;

if (!CreateProcessW(NULL,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for not always using ShellExecuteW?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be picky:
The OSK can be used also before logging in (in winlogon's secure desktop) and in other situations for example in Windows / NT installations where the shell (and thus, shell32) has not been installed yet.

* FALSE otherwise.
*
*/
BOOL CloseProcess(IN LPCWSTR lpProcessName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something to refactor on the next PR for this tool:
You can largely combine IsProcessRunning and CloseProcess, by creating one helper function that simply finds the process ID of the process you are interested, and returns that (or 0 if it's not found).
Then both functions do not need to walk the process list exactly the same way.

@learn-more learn-more merged commit df88ea8 into reactos:master Aug 19, 2019
ReactOS PRs automation moved this from WIP / Waiting on contributor to Done Aug 19, 2019
@HBelusca HBelusca removed the WIP label Aug 19, 2019
@GeoB99 GeoB99 deleted the utility-manager branch August 19, 2019 17:07
GeoB99 added a commit to GeoB99/reactos that referenced this pull request Feb 23, 2020
Implement a small helper, GetProcessID(), that will be used to return the process ID which we are interested in. This largely removes some duplicated code. The following patch addresses the Jansen's comment on reactos#1608 PR.
GeoB99 added a commit to GeoB99/reactos that referenced this pull request Feb 23, 2020
Implement a small helper, GetProcessID(), that will be used to return the process ID which we are interested in. This largely removes some duplicated code. The following patch addresses the Jansen's comment on reactos#1608 PR.
GeoB99 added a commit to GeoB99/reactos that referenced this pull request Feb 23, 2020
Implement a small helper, GetProcessID(), that will be used to return the process ID which we are interested in. This largely removes some duplicated code. The following patch addresses the Jansen's comment on reactos#1608 PR.
GeoB99 added a commit to GeoB99/reactos that referenced this pull request Feb 24, 2020
Implement a small helper, GetProcessID(), that will be used to return the process ID which we are interested in. This largely removes some duplicated code. The following patch addresses the Jansen's comment on reactos#1608 PR.
GeoB99 added a commit to GeoB99/reactos that referenced this pull request Feb 24, 2020
Implement a small helper, GetProcessID(), that will be used to return the process ID which we are interested in. This largely removes some duplicated code. The following patch addresses the Jansen's comment on reactos#1608 PR.
GeoB99 added a commit to GeoB99/reactos that referenced this pull request Feb 25, 2020
Implement a small helper, GetProcessID(), that will be used to return the process ID which we are interested in. This largely removes some duplicated code. The following patch addresses the Jansen's comment on reactos#1608 PR.
GeoB99 added a commit to GeoB99/reactos that referenced this pull request Feb 25, 2020
Implement a small helper, GetProcessID(), that will be used to return the process ID which we are interested in. This largely removes some duplicated code. The following patch addresses the Jansen's comment on reactos#1608 PR.
katahiromz pushed a commit that referenced this pull request Feb 27, 2020
Implement a small helper, GetProcessID(), that will be used to return the process ID which we are interested in. This largely removes some duplicated code. The following patch addresses the Jansen's comment on #1608 PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement For PRs with an enhancement/new feature.
Projects
ReactOS PRs
  
Done
4 participants