Esempio n. 1
0
        private static IntPtr HookCallback(

            int nCode, IntPtr wParam, IntPtr lParam)

        {
            if (nCode >= 0 && wParam == (IntPtr)WM_KEYDOWN)

            {
                int vkCode = Marshal.ReadInt32(lParam);

                KeyController kc = new KeyController();

                kc.KeyListenerCallback((Keys)vkCode);
            }

            return(CallNextHookEx(_hookID, nCode, wParam, lParam));
        }