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

Exposed ProcessId on WindowHandle #6

Open
palenshus opened this issue Mar 24, 2022 · 0 comments
Open

Exposed ProcessId on WindowHandle #6

palenshus opened this issue Mar 24, 2022 · 0 comments

Comments

@palenshus
Copy link

palenshus commented Mar 24, 2022

In my usage I need to lookup the process ID from the window handle, which I imagine might be a common task. It'd be cool if the WindowHandle already exposed that as a property. I use this to get it:

[DllImport("user32.dll", SetLastError = true)]
public static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint processId);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant