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

HIDP_ constants missing from metadata #964

Closed
AArnott opened this issue Jun 14, 2022 · 6 comments
Closed

HIDP_ constants missing from metadata #964

AArnott opened this issue Jun 14, 2022 · 6 comments
Assignees
Labels
missing api Some documented API is missing from the metadata

Comments

@AArnott
Copy link
Member

AArnott commented Jun 14, 2022

@Slion reports at microsoft/CsWin32#583

I'm trying to use HidP_GetUsageValueArray. The returned value is declared as NTSTATUS, are the constant values it can take declared somewhere? If I put them in NativeMethods.txt is says it can't find them.

Indeed, it appears that none of the return values documented for this API are declared in the metadata. Since the method itself is in the metadata, it seems the return values should be as well.

@AArnott AArnott added the missing api Some documented API is missing from the metadata label Jun 14, 2022
@Slion
Copy link

Slion commented Jun 17, 2022

@Slion
Copy link

Slion commented Jun 18, 2022

While you are at it, looks like DEVPROP_TYPE* are missing too.

@KalleOlaviNiemitalo
Copy link

Adding DEVPROP_TYPE* was requested in #958.

@mikebattista mikebattista self-assigned this Aug 1, 2022
@elachlan
Copy link
Contributor

Found them in the headers, I think.
generation\WinSDK\RecompiledIdlHeaders\shared\hidpi.h

@elachlan
Copy link
Contributor

elachlan commented Nov 4, 2022

This one will be hard I think since they are macros:

#define HIDP_ERROR_CODES(SEV, CODE) \
        ((NTSTATUS) (((SEV) << 28) | (FACILITY_HID_ERROR_CODE << 16) | (CODE)))

#define HIDP_STATUS_SUCCESS                  (HIDP_ERROR_CODES(0x0,0))

Does clangsharp handle that?

@mikebattista
Copy link
Collaborator

The ConstantsScraper handles this. We'd need to update it to handle this pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing api Some documented API is missing from the metadata
Projects
None yet
Development

No branches or pull requests

5 participants