8000 [NTOS:PS] Implement `ProcessImageFileNameWin32` information class by RatinCN · Pull Request #7942 · reactos/reactos · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[NTOS:PS] Implement ProcessImageFileNameWin32 information class #7942

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RatinCN
Copy link
Contributor
@RatinCN RatinCN commented Apr 26, 2025

Purpose

Implement ProcessImageFileNameWin32 information class of NtQueryInformationProcess.

JIRA issue: CORE-16145.
This issue is about QueryFullProcessImageName, but this PR is the key to fix it.

Proposed changes

  • Support ProcessImageFileNameWin32 on NT6+ target.

TODO

Apitest will be added on the further PR (about QueryFullProcessImageName, WIP, not submitted yet).

Testbot runs (Filled in by Devs)

  • KVM x86:
  • KVM x64:

@github-actions github-actions bot added the kernel&hal Code changes to the ntoskrnl and HAL label Apr 26, 2025
@binarymaster binarymaster added enhancement For PRs with an enhancement/new feature. NT6+ For PRs that aim at implementing NT6+ functionality. labels Apr 26, 2025
@github-project-automation github-project-automation bot moved this to New PRs in ReactOS PRs Apr 26, 2025
ObjectNameInformation->Name.MaximumLength);
} else
{
ImageName->Buffer = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe set also ImageName->Length = 0; just to be sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's unnecessary, because if MaximumLength is zero but Length is nonzero, this means IoQueryFileDosDeviceName went wrong.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is ReactOS, anything can go wrong :). Please put an ASSERT here.

@RatinCN RatinCN force-pushed the Impl_ProcessImageFileNameWin32 branch from f555d6a to 10a2aac Compare April 27, 2025 16:49
@RatinCN
Copy link
Contributor Author
RatinCN commented Apr 27, 2025
D:\a\reactos\reactos\src\sdk\include\crt\string.h(53): fatal error C1090: PDB API call failed, error code '23': (0x000006BA)
ninja: build stopped: subcommand failed.
Error: Process completed with exit code 1.

This build error seems not related to code.

@HBelusca
Copy link
Contributor
D:\a\reactos\reactos\src\sdk\include\crt\string.h(53): fatal error C1090: PDB API call failed, error code '23': (0x000006BA)
ninja: build stopped: subcommand failed.
Error: Process completed with exit code 1.

This build error seems not related to code.

It's a usual glitch, we just need to retry the build.

Comment on lines +784 to +785
Length = ObjectNameInformation->Name.MaximumLength + sizeof(OBJECT_NAME_INFORMATION);
if (Length <= ProcessInformationLength)
Copy link
Contributor

Choose a reason for hiding this comment

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

This calculates the required size as string length + sizeof(OBJECT_NAME_INFORMATION), but below it copies a UNICODE_STRING + the string data.

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. kernel&hal Code changes to the ntoskrnl and HAL NT6+ For PRs that aim at implementing NT6+ functionality.
Projects
Status: New PRs
Development

Successfully merging this pull request may close these issues.

4 participants
0