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

CreateThread function (processthreadsapi.h) constants are missing #152

Closed
wieslawsoltes opened this issue Jan 22, 2021 · 3 comments
Closed
Labels
missing enum An enum is missing for constant parameters usability Touch-up to improve the user experience for a language projection

Comments

@wieslawsoltes
Copy link

https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createthread

e.g.: CREATE_SUSPENDED etc.

and are not generated when put in NativeMethods.txt

@wieslawsoltes wieslawsoltes changed the title CreateThread function (processthreadsapi.h)constants are missing CreateThread function (processthreadsapi.h) constants are missing Jan 22, 2021
@zgabi
Copy link

zgabi commented Jan 22, 2021

I checked in the winmd file. They can be found there, so this is more likely a CsWin32 issue.

@AArnott AArnott transferred this issue from microsoft/win32metadata Jan 22, 2021
@AArnott AArnott transferred this issue from microsoft/CsWin32 Jan 22, 2021
@AArnott
Copy link
Member

AArnott commented Jan 22, 2021

The CREATE_SUSPENDED constant is part of the PROCESS_CREATION_FLAGS enum. If you add PROCESS_CREATION_FLAGS to NativeMethods.txt you'll get it.

However you shouldn't have to add it if CreateThread is specified. You have to today because CreateThread uses uint for dwCreationFlags instead of the enum type. So that is what needs to be fixed (in the metadata).

@AArnott AArnott added the usability Touch-up to improve the user experience for a language projection label Jan 22, 2021
@mikebattista mikebattista added the missing enum An enum is missing for constant parameters label Jan 25, 2021
@sotteson1
Copy link
Contributor

I added a new enum THREAD_CREATION_FLAGS and mapped it to the parameter in CreateThread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing enum An enum is missing for constant parameters usability Touch-up to improve the user experience for a language projection
Projects
None yet
Development

No branches or pull requests

5 participants