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

Unable to get constants from Reason.h defined #224

Closed
v-tbert opened this issue Feb 12, 2021 · 1 comment
Closed

Unable to get constants from Reason.h defined #224

v-tbert opened this issue Feb 12, 2021 · 1 comment
Labels
missing enum An enum is missing for constant parameters

Comments

@v-tbert
Copy link

v-tbert commented Feb 12, 2021

The constants used for shutdown/reboot functions are defined in reason.h and documented here:
https://docs.microsoft.com/en-us/windows/win32/shutdown/system-shutdown-reason-codes

Listing InitiateSystemShutdownEx in NativeMethods.txt works fine, but listing SHTDN_REASON_MAJOR_APPLICATION, for example, results in a build warning: Method or type "SHTDN_REASON_MAJOR_APPLICATION" not found.

What do I need to differently to import these?

Also, is there a way to automatically import them as an enum with flags attribute?

@AArnott AArnott transferred this issue from microsoft/CsWin32 Feb 13, 2021
@mikebattista mikebattista added the missing enum An enum is missing for constant parameters label Feb 16, 2021
@AArnott
Copy link
Member

AArnott commented Mar 9, 2021

This will require manual enum work.

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
Projects
None yet
Development

No branches or pull requests

3 participants