Beispiel #1
0
        protected override void OnStart()
        {
            msgID_Shell_HookReplaced        = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_SHELL_REPLACED");
            msgID_Shell_ActivateShellWindow = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HSHELL_ACTIVATESHELLWINDOW");
            msgID_Shell_GetMinRect          = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HSHELL_GETMINRECT");
            msgID_Shell_Language            = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HSHELL_LANGUAGE");
            msgID_Shell_Redraw          = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HSHELL_REDRAW");
            msgID_Shell_Taskman         = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HSHELL_TASKMAN");
            msgID_Shell_WindowActivated = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HSHELL_WINDOWACTIVATED");
            msgID_Shell_WindowCreated   = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HSHELL_WINDOWCREATED");
            msgID_Shell_WindowDestroyed = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HSHELL_WINDOWDESTROYED");

            if (Environment.OSVersion.Version.Major >= 6)
            {
                NativeMethods.ChangeWindowMessageFilter(msgID_Shell_HookReplaced, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_Shell_ActivateShellWindow, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_Shell_GetMinRect, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_Shell_Language, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_Shell_Redraw, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_Shell_Taskman, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_Shell_WindowActivated, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_Shell_WindowCreated, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_Shell_WindowDestroyed, NativeConstants.MSGFLT_ADD);
            }
            NativeHookMethods.InitializeShellHook(0, handle);
        }
        protected override void OnStart()
        {
            msgID_KeyboardLL = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_KEYBOARDLL");
            msgID_KeyboardLL_HookReplaced = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_KEYBOARDLL_REPLACED");

            if (Environment.OSVersion.Version.Major >= 6)
            {
                NativeMethods.ChangeWindowMessageFilter(msgID_KeyboardLL, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_KeyboardLL_HookReplaced, NativeConstants.MSGFLT_ADD);
            }
            NativeHookMethods.InitializeKeyboardLLHook(0, handle);
        }
Beispiel #3
0
        protected override void OnStart()
        {
            _msgIdGetMsg       = RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_GETMSG");
            _msgIdGetMsgParams = RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_GETMSG_PARAMS");

            if (Environment.OSVersion.Version.Major >= 6)
            {
                ChangeWindowMessageFilter(_msgIdGetMsg, Constants.MSGFLT_ADD);
                ChangeWindowMessageFilter(_msgIdGetMsgParams, Constants.MSGFLT_ADD);
            }
            NativeHookMethods.InitializeGetMsgHook(0, _handle, _dragByMouseMenuItem);
        }
Beispiel #4
0
        protected override void OnStart()
        {
            _msgIdKeyboard             = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_KEYBOARD");
            _msgIdKeyboardHookReplaced = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_KEYBOARD_REPLACED");

            if (Environment.OSVersion.Version.Major >= 6)
            {
                NativeMethods.ChangeWindowMessageFilter(_msgIdKeyboard, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(_msgIdKeyboardHookReplaced, NativeConstants.MSGFLT_ADD);
            }
            NativeHookMethods.InitializeKeyboardHook(0, _handle, _dragByMouseMenuItem);
        }
Beispiel #5
0
        protected override void OnStart()
        {
            _msgIdMouseLL             = RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_MOUSELL");
            _msgIdMouseLLHookReplaced = RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_MOUSELL_REPLACED");

            if (Environment.OSVersion.Version.Major >= 6)
            {
                ChangeWindowMessageFilter(_msgIdMouseLL, MSGFLT_ADD);
                ChangeWindowMessageFilter(_msgIdMouseLLHookReplaced, MSGFLT_ADD);
            }
            NativeHookMethods.InitializeMouseLLHook(0, _handle, _dragByMouseMenuItem);
        }
Beispiel #6
0
        protected override void OnStart()
        {
            _msgIdCallWndProc       = RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_CALLWNDPROC");
            _msgIdCallWndProcParams = RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_CALLWNDPROC_PARAMS");

            if (Environment.OSVersion.Version.Major >= 6)
            {
                ChangeWindowMessageFilter(_msgIdCallWndProc, Constants.MSGFLT_ADD);
                ChangeWindowMessageFilter(_msgIdCallWndProcParams, Constants.MSGFLT_ADD);
            }
            NativeHookMethods.InitializeCallWndProcHook(0, _handle, _dragByMouseMenuItem);
        }
Beispiel #7
0
        protected override void OnStart()
        {
            _msgIdShellWindowCreated   = RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HSHELL_WINDOWCREATED");
            _msgIdShellWindowDestroyed = RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HSHELL_WINDOWDESTROYED");

            if (Environment.OSVersion.Version.Major >= 6)
            {
                ChangeWindowMessageFilter(_msgIdShellWindowCreated, Constants.MSGFLT_ADD);
                ChangeWindowMessageFilter(_msgIdShellWindowDestroyed, Constants.MSGFLT_ADD);
            }
            NativeHookMethods.InitializeShellHook(0, _handle, _dragByMouseMenuItem);
        }
Beispiel #8
0
        protected override void OnStart()
        {
            msgID_GetMsg_HookReplaced = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_GETMSG_REPLACED");
            msgID_GetMsg        = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_GETMSG");
            msgID_GetMsg_Params = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_GETMSG_PARAMS");

            if (Environment.OSVersion.Version.Major >= 6)
            {
                NativeMethods.ChangeWindowMessageFilter(msgID_GetMsg_HookReplaced, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_GetMsg, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_GetMsg_Params, NativeConstants.MSGFLT_ADD);
            }
            NativeHookMethods.InitializeGetMsgHook(0, handle);
        }
        protected override void OnStart()
        {
            msgID_CallWndProc_HookReplaced = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_CALLWNDPROC_REPLACED");
            msgID_CallWndProc        = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_CALLWNDPROC");
            msgID_CallWndProc_Params = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_CALLWNDPROC_PARAMS");

            if (Environment.OSVersion.Version.Major >= 6)
            {
                NativeMethods.ChangeWindowMessageFilter(msgID_CallWndProc_HookReplaced, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_CallWndProc, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_CallWndProc_Params, NativeConstants.MSGFLT_ADD);
            }
            NativeHookMethods.InitializeCallWndProcHook(0, handle);
        }
Beispiel #10
0
        protected override void OnStart()
        {
            _msgIdCbtCreateWnd  = RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HCBT_CREATEWND");
            _msgIdCbtDestroyWnd = RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HCBT_DESTROYWND");
            _msgIdCbtMinMax     = RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HCBT_MINMAX");
            _msgIdCbtMoveSize   = RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HCBT_MOVESIZE");

            if (Environment.OSVersion.Version.Major >= 6)
            {
                ChangeWindowMessageFilter(_msgIdCbtCreateWnd, Constants.MSGFLT_ADD);
                ChangeWindowMessageFilter(_msgIdCbtDestroyWnd, Constants.MSGFLT_ADD);
                ChangeWindowMessageFilter(_msgIdCbtMinMax, Constants.MSGFLT_ADD);
                ChangeWindowMessageFilter(_msgIdCbtMoveSize, Constants.MSGFLT_ADD);
            }
            NativeHookMethods.InitializeCbtHook(0, _handle, _dragByMouseMenuItem);
        }
Beispiel #11
0
        protected override void OnStart()
        {
            msgID_CBT_HookReplaced = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_CBT_REPLACED");
            msgID_CBT_Activate = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HCBT_ACTIVATE");
            msgID_CBT_CreateWnd = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HCBT_CREATEWND");
            msgID_CBT_DestroyWnd = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HCBT_DESTROYWND");
            msgID_CBT_MinMax = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HCBT_MINMAX");
            msgID_CBT_MoveSize = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HCBT_MOVESIZE");
            msgID_CBT_SetFocus = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HCBT_SETFOCUS");
            msgID_CBT_SysCommand = NativeMethods.RegisterWindowMessage("SMART_SYSTEM_MENU_HOOK_HCBT_SYSCOMMAND");

            if (Environment.OSVersion.Version.Major >= 6)
            {
                NativeMethods.ChangeWindowMessageFilter(msgID_CBT_HookReplaced, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_CBT_Activate, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_CBT_CreateWnd, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_CBT_DestroyWnd, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_CBT_MinMax, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_CBT_MoveSize, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_CBT_SetFocus, NativeConstants.MSGFLT_ADD);
                NativeMethods.ChangeWindowMessageFilter(msgID_CBT_SysCommand, NativeConstants.MSGFLT_ADD);
            }
            NativeHookMethods.InitializeCbtHook(0, handle);
        }
 protected override void OnStop()
 {
     NativeHookMethods.UninitializeKeyboardLLHook();
 }
Beispiel #13
0
 protected override void OnStop()
 {
     NativeHookMethods.UninitializeGetMsgHook();
 }
Beispiel #14
0
 protected override void OnStop()
 {
     NativeHookMethods.UninitializeMouseLLHook();
 }
Beispiel #15
0
 protected override void OnStop()
 {
     NativeHookMethods.UninitializeCallWndProcHook();
 }