[PATCH v4] user32/tests: Add more tests for GetMouseMovePointsEx.

Myah Caron qsniyg at protonmail.com
Mon Sep 14 13:43:35 CDT 2020


> Though I haven't tested this yet, according to what I understood from MSDN, the list of points is stored in
> user space, not kernel space:
>
> > The GetMouseMovePointsEx function will return points that eventually were dispatched not only to the calling
> > thread but also to other threads.

With Arkadiusz's patch being server-side, I got curious about this so I created a small test:


#include <windows.h>
#include <stdio.h>

int main() {
  MOUSEMOVEPOINT in;
  MOUSEMOVEPOINT out[200];
  int retval, i;

  memset(&in, 0, sizeof(MOUSEMOVEPOINT));

  SetCursorPos(6, 6);
  SetCursorPos(7, 7);

  in.x = 7;
  in.y = 7;

  retval = GetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, 64, GMMP_USE_DISPLAY_POINTS);
  printf("%d\n", retval); // returns 64, not 2

  for (i = 0; i < retval; i++)
    printf("[%d]: .x=%d, .y=%d, .time=%d\n", i, out[i].x, out[i].y, out[i].time);

  return 0;
}


It appears the list of points is not stored in user-space (for the application running it), so please ignore my assumption :)



More information about the wine-devel mailing list