Guest User

dll imports

a guest
Jun 12th, 2021
844
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.00 KB | None | 0 0
  1. [DllImport("user32.dll")]
  2.         static extern void mouse_event(int a, int b, int c, int d, int swed);
  3.  
  4.         [DllImport("user32.dll", SetLastError = true)]
  5.         [return: MarshalAs(UnmanagedType.Bool)]
  6.         static extern bool GetWindowRect(IntPtr hWnd, ref RECT lpRect);
  7.  
  8.  
  9.  
  10.         [DllImport("user32.dll", EntryPoint = "FindWindow")]
  11.         static extern IntPtr FindWindowByCaption(IntPtr ZeroOnly, string lpWindowName);
  12.  
  13.         [DllImport("User32.Dll")]
  14.         public static extern long SetCursorPos(int x, int y);
  15.  
  16.         [DllImport("user32.dll")]
  17.         static extern short GetAsyncKeyState(Keys vkey);
  18.  
  19.  
  20.         [StructLayout(LayoutKind.Sequential)]
  21.         private struct RECT
  22.         {
  23.             public int Left;
  24.             public int Top;
  25.             public int Right;
  26.             public int Bottom;
  27.         }
  28.  
  29.         int x;
  30.         int y;
  31.         bool on = false;
  32.         const int leftDown = 0x02;
  33.         const int leftUp = 0x04;
  34.         Point pos = new Point(0, 0);
Advertisement
Add Comment
Please, Sign In to add comment