Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Add NTDll.NtQueryInformationProcess #468

Merged
merged 6 commits into from
Jul 1, 2020
Merged

Add NTDll.NtQueryInformationProcess #468

merged 6 commits into from
Jul 1, 2020

Conversation

qmfrederik
Copy link
Contributor

No description provided.

Copy link
Collaborator

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution. I found a few accuracy issues to please clean up before we merge.

src/NTDll/NTDll+PROCESSINFOCLASS.cs Show resolved Hide resolved
src/NTDll/NTDll+PROCESS_BASIC_INFORMATION.cs Outdated Show resolved Hide resolved
/// <summary>
/// The base address of the PEB structure in the process memory.
/// </summary>
public IntPtr PebBaseAddress;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since changing this from IntPtr to PEB* later will be a binary breaking change, can we do so now? This will involve defining the PEB structure. Let me know if you have any trouble doing that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Eww.. We know how to handle pointer size differences but that looks like a totally different layout. Well, we could define both and leave folks to cast the pointer to the right one, or we could define a ref assembly that only has the common fields and two per-architecture runtime assemblies to implement the right one for each. Both are a bit icky. The first is easier while the second one is probably the best world.
I don't have time for the latter option just now, so if you can figure it out, great. Otherwise the first option may be what we must go with.
I guess since the start out similarly, another option is to only define the first part as far as the two are common.

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 left it as void* at the moment; hope that works for you.

src/NTDll/NTDll.cs Outdated Show resolved Hide resolved
@qmfrederik
Copy link
Contributor Author

@AArnott, thanks for the feedback. I addressed some of your comments in the code & left some comments for the others.

@AArnott
Copy link
Collaborator

AArnott commented Jul 1, 2020

@qmfrederik How do you feel about my squashing your PRs on completion, given they are accumulating a lot of 'fix up' commits?

@qmfrederik
Copy link
Contributor Author

@qmfrederik How do you feel about my squashing your PRs on completion, given they are accumulating a lot of 'fix up' commits?

Sure, go for it!

Copy link
Collaborator

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

Looks good. I guess the test you added just needs to be updated.

@AArnott AArnott merged commit 64c6e7e into dotnet:master Jul 1, 2020
@qmfrederik qmfrederik deleted the features/more-ntdll-apis branch July 1, 2020 21:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants