示例#1
0
        public void Start()
        {
            Task.Factory.StartNew( () =>
            {
                _hookWin = new NativeWindowEx();
                _hookWin.CreateHandle( new CreateParams() );

                if ( User32.RegisterShellHookWindow( _hookWin.Handle ) == false )
                    throw new Exception( "Win32 error" );

                _wmShellhookmessage = (int)WUser32.RegisterWindowMessage( "SHELLHOOK" );
                _hookWin.MessageRecieved += ShellWinProc;
            } );
        }
示例#2
0
        public void Start()
        {
            Task.Factory.StartNew(() =>
            {
                _hookWin = new NativeWindowEx();
                _hookWin.CreateHandle(new CreateParams());

                if (User32.RegisterShellHookWindow(_hookWin.Handle) == false)
                {
                    throw new Exception("Win32 error");
                }

                _wmShellhookmessage       = (int)WUser32.RegisterWindowMessage("SHELLHOOK");
                _hookWin.MessageRecieved += ShellWinProc;
            });
        }