-
Notifications
You must be signed in to change notification settings - Fork 120
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
MOUSEINPUT
is of the wrong type
#1865
Comments
typedef struct tagMOUSEINPUT {
LONG dx;
LONG dy;
DWORD mouseData;
DWORD dwFlags;
DWORD time;
ULONG_PTR dwExtraInfo;
} MOUSEINPUT, *PMOUSEINPUT, FAR* LPMOUSEINPUT; The metadata defines it as follows: public struct MOUSEINPUT
{
public int dx;
public int dy;
public uint mouseData;
public MOUSE_EVENT_FLAGS dwFlags;
public uint time;
public UIntPtr dwExtraInfo;
} So |
It looks like there is a lot of going back and forth between the two types (https://github.com/microsoft/win32metadata/issues?q=is%3Aissue+mouseinput+is%3Aclosed). It was changed to i32 because you have to be able to use negative values to scroll up (#933) and a special case was added to the metadata. Later that seems to have been reverted. |
Yes, it seems that way. I haven't been tracking that, but I believe the value is correct as of now. I'll transfer to the Win32 metadata repo for their input. |
As long as we're ok deviating from the headers, we can change it back to int. |
The type is clearly |
I originally marked it as Metadata currently has this listed as |
Everything looks correct to me in the latest builds. |
Okay, thank you for the quick response. I will cast the values. |
Summary
It is the same issue as microsoft/windows-rs#2708. Even after updating the metadata in microsoft/windows-rs@b62b802, the issue still persists.
In version 0.51,
windows::Win32::UI::Input::KeyboardAndMouse::MOUSEINPUT.mouseData
was of typei32
. Starting in version 0.52, it is of typeu32
. According to the documentation, the type is DWORD. However it also states:(source).
Crate manifest
No response
Crate code
No response
The text was updated successfully, but these errors were encountered: