using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Reflection;
using System.Windows.Forms;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Threading;
using System.Diagnostics;
using Microsoft.Win32;
using System.Runtime.CompilerServices;
namespace Capture
{
[StructLayout(LayoutKind.Sequential)]
public class POINT
{
public int x;
public int y;
}
[StructLayout(LayoutKind.Sequential)]
public class MouseLLHookStruct
{
public POINT pt;
public int mouseData;
public int flags;
public int time;
public int dwExtraInfo;
}
public class MouseHook
{
[Flags]
public enum MouseEventFlags : uint
{
Move = 1,
LeftDown = 2,
LeftUp = 4,
RightDown = 8,
RightUp = 0x10,
MiddleDown = 0x20,
MiddleUp = 0x40,
h = 0x80,
i = 0x100,
Wheel = 0x800,
k = 0x4000,
Absolute = 0x8000
}
[MethodImpl(MethodImplOptions.Synchronized)]
public void MyRemove(MouseEventHandler A_0)
{
this.OnMouseActivity = (MouseEventHandler)Delegate.Remove(this.OnMouseActivity, A_0);
}
[MethodImpl(MethodImplOptions.Synchronized)]
public void MyCombine(MouseEventHandler A_0)
{
this.OnMouseActivity = (MouseEventHandler)Delegate.Combine(this.OnMouseActivity, A_0);
}
[DllImport("user32.dll")]
private static extern void mouse_event(MouseEventFlags A_0, int A_1, int A_2, uint A_3, UIntPtr A_4);
private const int WM_MOUSEMOVE = 0x200;
private const int WM_LBUTTONDOWN = 0x201;
private const int WM_RBUTTONDOW