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

AttachConsole supports only uint, no overload to attach to parent process. #1310

Open
SPWizard01 opened this issue Nov 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@SPWizard01
Copy link

Actual behavior

calling Windows.Win32.PInvoke.AttachConsole(-1) will result in error because of the source generation:
internal static extern winmdroot.Foundation.BOOL AttachConsole(uint dwProcessId);

Expected behavior

-1 Should probably be allowed as an overload based on documentation here:
https://learn.microsoft.com/en-us/windows/console/attachconsole#parameters

Repro steps

  1. NativeMethods.txt content:
AttachConsole
  1. NativeMethods.json content (if present):
  1. Any of your own code that should be shared?

Context

  • CsWin32 version: 0.3.106
  • Win32Metadata version (if explicitly set by project):
  • Target Framework: net9.0-windows10.0.26100.0
  • LangVersion (if explicitly set by project): [e.g. 9]
@SPWizard01 SPWizard01 added the bug Something isn't working label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant