Пример #1
0
        /// <summary>
        ///     入力ログファイルを指定して,インスタンスを初期化します.
        /// </summary>
        /// <param name="inputLogFile">入力のログファイル</param>
        /// <param name="shellHook">シェルフックウィンドウ</param>
        /// <param name="config">設定</param>
        public UserInputWindow(string inputLogFile, ShellHookWindow shellHook, UserInputConfig config)
        {
            _logFile   = inputLogFile;
            _shellHook = shellHook;
            _config    = config;
            shellHook.WindowActivated += shellHook_WindowActivated;

            InitializeComponent();

            // フックの開始
            _hookProc = HookCallback; // アンマネージに渡すデリゲートのライフタイムは自分で管理する!
            _hHook    = User.SetWindowsHookEx(WindowsHook.KeyboardLL, _hookProc, IntPtr.Zero, 0);
        }
Пример #2
0
 public static extern int SetWindowsHookEx(int idHook, WindowsHookProc lpfn, IntPtr hInstance, int threadId);
Пример #3
0
 public static extern IntPtr SetWindowsHookEx(int idHook, WindowsHookProc lpfn, IntPtr hMod, int dwThreadId);
Пример #4
0
 internal static extern int SetWindowsHookEx(int idHook, WindowsHookProc lpfn, IntPtr hInstance, int threadId);
Пример #5
0
 public static extern IntPtr SetWindowsHookEx(int hookType, WindowsHookProc hookProc, IntPtr module, uint threadId);
Пример #6
0
 public static extern IntPtr SetWindowsHookEx(int idHook, WindowsHookProc lpfn, IntPtr hMod, uint dwThreadId);