Skip to content

Conversation

@DJm00n
Copy link
Contributor

@DJm00n DJm00n commented Jan 7, 2025

Buffer pointer should be aligned on a DWORD (32-bit) boundary.

@prmerger-automator
Copy link

@DJm00n : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@DJm00n DJm00n changed the title Update nf-winuser-getrawinputbuffer.md RawInput: Buffer should be aligned on a DWORD (32-bit) boundary Jan 7, 2025
@DJm00n DJm00n changed the title RawInput: Buffer should be aligned on a DWORD (32-bit) boundary RawInput: Pointer should be aligned on a DWORD (32-bit) boundary Jan 7, 2025
@DJm00n DJm00n changed the title RawInput: Pointer should be aligned on a DWORD (32-bit) boundary RawInput: Buffer pointer should be aligned on a DWORD (32-bit) boundary Jan 14, 2025
Copy link
Contributor

@riverar riverar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Microsoft is saying that the starting address of each RAWINPUT structure within the buffer must be aligned to a pointer boundary. The pointer itself doesn’t need special alignment.

Memory allocated with malloc or new will already handle this, so it's not clear why this warning is here. My guess is someone got burned after using a custom allocator (e.g., on say, the Xbox) and added a note for future developers.

@Karl-Bridge-Microsoft Karl-Bridge-Microsoft merged commit c9b89fb into MicrosoftDocs:docs Apr 29, 2025
1 check passed
@DJm00n DJm00n deleted the patch-8 branch April 29, 2025 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants