Esempio n. 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);
        }
Esempio n. 2
0
 public static extern int SetWindowsHookEx(int idHook, WindowsHookProc lpfn, IntPtr hInstance, int threadId);
Esempio n. 3
0
 public static extern IntPtr SetWindowsHookEx(int idHook, WindowsHookProc lpfn, IntPtr hMod, int dwThreadId);
Esempio n. 4
0
 internal static extern int SetWindowsHookEx(int idHook, WindowsHookProc lpfn, IntPtr hInstance, int threadId);
Esempio n. 5
0
 public static extern IntPtr SetWindowsHookEx(int hookType, WindowsHookProc hookProc, IntPtr module, uint threadId);
Esempio n. 6
0
File: Win32.cs Progetto: prefab/code
 public static extern IntPtr SetWindowsHookEx(int idHook, WindowsHookProc lpfn, IntPtr hMod, uint dwThreadId);