Skip to content

bpo-34980: P/Invoke QueryFullProcessImageName to get process' name #9901

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

Merged
merged 4 commits into from
Oct 23, 2018

Conversation

jkloth
Copy link
Contributor

@jkloth jkloth commented Oct 15, 2018

allow the 32-bit MSBuild to access 64-bit processes names.
@willingc
Copy link
Contributor

Thanks for the PR @jkloth. I've added the skip news label so the Windows core devs can see that there are no failing tests 👍

try {
int pathLength = 32768;
StringBuilder pathBuilder = new StringBuilder(pathLength);
QueryFullProcessImageName(p.Handle, 0, pathBuilder, ref pathLength);
Copy link
Member

Choose a reason for hiding this comment

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

Weird indentation going on here, and would be nice to just continue here if it fails.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, some tabs crept in.

I'm unsure to what the continue you refer to. The return at the end is due to the change from type="Fragment" to type="Method".

Copy link
Member

Choose a reason for hiding this comment

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

If QueryFullProcessImageName returns false, we don't want to bother with anything else after it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, yes. Committed.

@zooba zooba merged commit fa53294 into python:master Oct 23, 2018
@miss-islington
Copy link
Contributor

Thanks @jkloth for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-10055 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 23, 2018
@bedevere-bot
Copy link

GH-10056 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 23, 2018
miss-islington added a commit that referenced this pull request Oct 23, 2018
miss-islington added a commit that referenced this pull request Oct 23, 2018
@jkloth jkloth deleted the issue34980 branch December 11, 2018 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants