Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than user32, prefix the name with the module name and a period.
GetMouseMovePointsEx (user32)
.
C# Signature:
[DllImport("user32.dll")]
static extern int GetMouseMovePointsEx(uint cbSize, [In] ref MOUSEMOVEPOINT
lppt, [Out] MOUSEMOVEPOINT [] lpptBuf, int nBufPoints, uint resolution);
User-Defined Types:
None.
Notes:
None.
Tips & Tricks:
Please add some!
Sample Code:
Please add some!
public const int GMMP_USE_DISPLAY_POINTS = 1;
public const int GMMP_USE_HIGH_RESOLUTION_POINTS = 2;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] // For GetMouseMovePointsEx
public struct MOUSEMOVEPOINT {
public int x ; //Specifies the x-coordinate of the mouse
public int y ; //Specifies the y-coordinate of the mouse
public int time ; //Specifies the time stamp of the mouse coordinate
public IntPtr dwExtraInfo; //Specifies extra information associated with this coordinate.
}
MOUSEMOVEPOINT mp_in = new MOUSEMOVEPOINT();
MOUSEMOVEPOINT[] mp_out = new MOUSEMOVEPOINT[64];
int nNumPointsRequired = 20 ; // set number of points to desired value less than 64
// Set the Current Position in currentPosition, of type POINT
mp_in.x = ((int)currentPosition.X) & 0x0000FFFF; //Ensure that this number will pass through.
mp_in.y = ((int)currentPosition.Y) & 0x0000FFFF;
int cpt = GetMouseMovePointsEx((uint)(Marshal.SizeOf(mp_in)), ref mp_in, mp_out, nNumPointsRequired, mode);
if (cpt == -1)
{
int win32Error = Marshal.GetLastWin32Error(); // Dance around FxCop.
throw new System.ComponentModel.Win32Exception(win32Error);
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] // For GetMouseMovePointsEx
public struct MOUSEMOVEPOINT {
public int x ; //Specifies the x-coordinate of the mouse
public int y ; //Specifies the x-coordinate of the mouse
public int time ; //Specifies the time stamp of the mouse coordinate
public IntPtr dwExtraInfo; //Specifies extra information associated with this coordinate.
}
Alternative Managed API:
Do you know one? Please contribute it!
The GetMouseMovePointsEx API
6/6/2013 11:36:44 PM - -131.107.71.227
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).