• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# LowLevelMouseProc类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中LowLevelMouseProc的典型用法代码示例。如果您正苦于以下问题:C# LowLevelMouseProc类的具体用法?C# LowLevelMouseProc怎么用?C# LowLevelMouseProc使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LowLevelMouseProc类属于命名空间,在下文中一共展示了LowLevelMouseProc类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SetHook

 private static IntPtr SetHook(LowLevelMouseProc proc)
 {
     using (Process currentProcess = Process.GetCurrentProcess())
     {
         using (ProcessModule currentModule = currentProcess.MainModule)
             return SetWindowsHookEx(WH_MOUSE_LL, proc, GetModuleHandle(currentModule.ModuleName), 0);
     }
 }
开发者ID:gaskoin,项目名称:ClickCounter,代码行数:8,代码来源:MouseHook.cs


示例2: SetHook

 /// <summary>
 /// Get Current Process and Module and Installs an application-defined hook procedure into a hook chain. You would install a hook procedure to monitor the system for certain types of events. These events are associated either with a specific thread or with all threads in the same desktop as the calling thread
 /// </summary>
 /// <param name="proc">HookCallback</param>
 /// <returns></returns>
 public static IntPtr SetHook(LowLevelMouseProc proc)
 {
     using (var curProcess = Process.GetCurrentProcess())
     using (var curModule = curProcess.MainModule)
     {
         return SetWindowsHookEx(WH_MOUSE_LL, proc, GetModuleHandle(curModule.ModuleName), 0);
     }
 }
开发者ID:Wonziu,项目名称:Floating-Clock,代码行数:13,代码来源:MouseHook.cs


示例3: Hook

        public Hook(LowLevelMouseProc callback)
        {
            this._Callback = GCHandle.Alloc(callback);

            if ((this._Handle = NativeMethods.SetWindowsHookExW(NativeMethods.WH_MOUSE_LL, Marshal.GetFunctionPointerForDelegate(callback), NativeMethods.GetModuleHandle(), 0)) == IntPtr.Zero)
            {
                throw new Win32Exception();
            }
        }
开发者ID:Goletas,项目名称:screencapture,代码行数:9,代码来源:Hook.cs


示例4: SetHook

 private static IntPtr SetHook(LowLevelMouseProc proc)
 {
     using (Process curProcess = Process.GetCurrentProcess())
     using (ProcessModule curModule = curProcess.MainModule)
     {
         IntPtr hook = SetWindowsHookEx(WH_MOUSE_LL, proc, GetModuleHandle("user32"), 0);
         if (hook == IntPtr.Zero) throw new System.ComponentModel.Win32Exception();
         return hook;
     }
 }
开发者ID:kamilskoczylas,项目名称:RemoteHelper,代码行数:10,代码来源:MouseHooks.cs


示例5: SetHook

 private IntPtr SetHook(LowLevelMouseProc proc)
 {
     using (Process curProcess = Process.GetCurrentProcess())
     using (ProcessModule curModule = curProcess.MainModule)
     {
         _proc = HookCallback;
         return SetWindowsHookEx(WH_MOUSE_LL, _proc,
             GetModuleHandle(curModule.ModuleName), 0);
     }
 }
开发者ID:ReveeWu,项目名称:DesktopTranslatePro,代码行数:10,代码来源:Form2.cs


示例6: SetWindowsHookEx

 static extern IntPtr SetWindowsHookEx(int idHook, LowLevelMouseProc callback, IntPtr hInstance, uint threadId);
开发者ID:nvareille,项目名称:RunescapeClicker,代码行数:1,代码来源:MouseHooker.cs


示例7: MouseHook

 public MouseHook()
 {
     //Install Hook, return handle to the hook procedure
     llMouseProc = new LowLevelMouseProc(HookCallback);
     _hookID = SetHook(llMouseProc);
 }
开发者ID:huangy9527,项目名称:Dso_framer_Use,代码行数:6,代码来源:MouseHook.cs


示例8: MouseCapture

 static MouseCapture()
 {
     s_hook = SetWindowsHookEx(WH_MOUSE_LL,
         s_proc = new LowLevelMouseProc(HookProc),
         System.Runtime.InteropServices.Marshal.GetHINSTANCE(typeof(MouseCapture).Module),
         //GetModuleHandle(null),
         0);
     s_eventArgs = new MouseCaptureEventArgs();
     AppDomain.CurrentDomain.DomainUnload += delegate
     {
         if (s_hook != IntPtr.Zero)
             UnhookWindowsHookEx(s_hook);
     };
 }
开发者ID:masaakif,项目名称:TwiDaken,代码行数:14,代码来源:KeyBoardHook.cs


示例9: SetHook

 /* 
  * SetHook: attach a mouse movement listener to the current process
  * @param LowLevelMouseProc proc: The mouse listener
  * @return IntPtr: The hook
  */
 private static IntPtr SetHook(LowLevelMouseProc proc)
 {
     // Attach to the current process
     using (Process curProcess = Process.GetCurrentProcess())
     using (ProcessModule curModule = curProcess.MainModule)
     {
         return SetWindowsHookEx(WH_MOUSE_LL, proc,
           GetModuleHandle(curModule.ModuleName), 0);
     } // end using curProcess
 } // end SetHook
开发者ID:peterburk,项目名称:keyMouSerial,代码行数:15,代码来源:Program.cs


示例10: SetHook

 static IntPtr SetHook(LowLevelMouseProc proc)
 {
     IntPtr p = IntPtr.Zero;
     try
     {
         using (Process curProcess = Process.GetCurrentProcess())
         using (ProcessModule curModule = curProcess.MainModule)
         {
             p = SetWindowsHookEx(WH_MOUSE_LL, proc, GetModuleHandle(curModule.ModuleName), 0);
         }
     }
     catch
     {
     }
     return p;
 }
开发者ID:nullkuhl,项目名称:fsu-dev,代码行数:16,代码来源:AboutBox.xaml.cs


示例11: SetHookMouse

 private static IntPtr SetHookMouse(LowLevelMouseProc proc)
 {
     using (System.Diagnostics.Process curProcess = System.Diagnostics.Process.GetCurrentProcess())
     using (System.Diagnostics.ProcessModule curModule = curProcess.MainModule)
     {
         return SetWindowsHookEx(WH_MOUSE_LL, proc, GetModuleHandle(curModule.ModuleName), 0);
     }
 }
开发者ID:JhetoX,项目名称:HackBankAccount,代码行数:8,代码来源:Program.cs


示例12: MouseHook

 public MouseHook()
 {
     callback = new LowLevelMouseProc(MouseCallback);
     handle = Win32.SetWindowsHookEx(WH_MOUSE_LL, callback, IntPtr.Zero, 0);
 }
开发者ID:olanykvist,项目名称:ClickCounter,代码行数:5,代码来源:MouseHook.cs


示例13: SetHook

 private IntPtr SetHook(LowLevelMouseProc proc)
 {
     ProcessModule curModule = Process.GetCurrentProcess().MainModule;
     return SetWindowsHookEx(WH_MOUSE_LL, proc, GetModuleHandle(curModule.ModuleName), 0);
 }
开发者ID:berak,项目名称:cs,代码行数:5,代码来源:main.cs


示例14: SetWindowsHookEx

 static extern IntPtr SetWindowsHookEx(int idHook,
     LowLevelMouseProc lpfn, IntPtr hMod, uint dwThreadId);
开发者ID:nullkuhl,项目名称:fsu-dev,代码行数:2,代码来源:AboutBox.xaml.cs


示例15: SetHookM

 private static IntPtr SetHookM(LowLevelMouseProc procm)
 {
     using (Process curProcess = Process.GetCurrentProcess())
     using (ProcessModule curModule = curProcess.MainModule)
     {
         return User32.SetWindowsHookEx(WH_MOUSE_LL, procm, Kernel32.GetModuleHandle(curModule.ModuleName), 0);
     }
 }
开发者ID:azizjonm,项目名称:p0wnedReverse,代码行数:8,代码来源:p0wnedReverseKeyLogger.cs


示例16: MainWindow

        public MainWindow()
        {
            _proc = HookCallback;

            _hookId = SetHook(_proc);
            //Application.Run();

            _timer.Interval = 1;
            _timer.Tick += _timer_Tick;
            InitializeComponent();
            _timer.Start();
            _area = Screen.PrimaryScreen.WorkingArea;

            _world = new World(new Vector2(0, 9.8f));

            // Farseer expects objects to be scaled to MKS (meters, kilos, seconds)
            // 1 meters equals 64 pixels here
            ConvertUnits.SetDisplayUnitToSimUnitRatio(64f);

            /* Circle */
            // Convert screen center from pixels to meters
            Vector2 circlePosition = ConvertUnits.ToSimUnits(new Vector2((float)_area.Width/2, (float)_area.Height/2));

            Left = (float)_area.Width/2 - (Width/2);
            Top = (float) _area.Height/2 - (Height/2);

            // Create the circle fixture
            _circleBody = BodyFactory.CreateCircle(_world, ConvertUnits.ToSimUnits(100 / 2f), 10f, circlePosition);
            _circleBody.BodyType = BodyType.Dynamic;
            _circleBody.ApplyTorque(500f);

            // Create the ground fixture
            _groundBody = BodyFactory.CreateRectangle(_world, ConvertUnits.ToSimUnits(_area.Width*4),
                                                      ConvertUnits.ToSimUnits(1f), 1f,
                                                      ConvertUnits.ToSimUnits(new Vector2(_area.Width/2, _area.Height)));
            _groundBody.IsStatic = true;
            _groundBody.Restitution = 0.8f;
            _groundBody.Friction = 0.5f;

            // Create east wall
            _groundBody2 = BodyFactory.CreateRectangle(_world, ConvertUnits.ToSimUnits(1f),
                                                       ConvertUnits.ToSimUnits(_area.Height), 1f,
                                                       ConvertUnits.ToSimUnits(new Vector2(_area.Width * 2 - 50,
                                                                                           _area.Height)));
            _groundBody2.IsStatic = true;
            _groundBody2.Restitution = 0.8f;
            _groundBody2.Friction = 0.5f;
        }
开发者ID:ptrandem,项目名称:DesktopGrenades,代码行数:48,代码来源:MainWindow.xaml.cs


示例17: KeyboardMouseHook

        public KeyboardMouseHook(KeyboardEventHandler eventKeyDown)
        {
            //Create an event using a delegate to fire whenever data is received by the hook
            myEventKeyOrMouse = eventKeyDown;
            _Keyboardproc = KeyboardHookCallback;
            _KeyboardhookID = SetKeyboardHook(_Keyboardproc);

            _Mouseproc = MouseHookCallback;
            _MousehookID = SetMouseHook(_Mouseproc);

            Modifiers = KeyModifiers.None;
        }
开发者ID:jdunne525,项目名称:AutoItXTest,代码行数:12,代码来源:KeyboardMouseHook.cs


示例18: ActivateHook

 public void ActivateHook()
 {
     HookHandleFct = HookHandle;
     IntPtr hInstance = LoadLibrary("User32");
     Hook = SetWindowsHookEx(WH_MOUSE_LL, HookHandleFct, hInstance, 0);
 }
开发者ID:nvareille,项目名称:RunescapeClicker,代码行数:6,代码来源:MouseHooker.cs


示例19: Clicktastic

        //Constructor
        public Clicktastic()
        {
            InitializeComponent();
            soundEffects = new SoundEffects(ref axMedia, ref soundSemaphore, ref mediaSemaphore, ref Stopped);

            _procKey = HookCallbackKey;
            _procMouse = HookCallbackMouse;
            _hookIDKey = SetHookKey(_procKey);
            _hookIDMouse = SetHookMouse(_procMouse);

            if (!Directory.Exists(currentDirectory))
            {
                try
                {
                    Directory.CreateDirectory(currentDirectory);
                }
                catch { }
            }
            previousProfile = Properties.Settings.Default.DefaultProfile;

            RetryAttempts = 0;
            try
            {
                foreach (string file in Directory.GetFiles(currentDirectory, "*.clk"))
                {
                    ddbProfile.Items.Add(Path.GetFileNameWithoutExtension(file));
                }
                ddbProfile.SelectedItem = previousProfile;
            }
            catch { }
            Boolean loaded = false;
            Loading = true;
            while (!loaded)
            {
                loaded = AttemptLoad();
            }
            Startup = false;
            SetInstructions();
        }
开发者ID:Coolcord,项目名称:Clicktastic,代码行数:40,代码来源:Clicktastic.cs


示例20: NSSKeyloggerForm

        //Constructor
        public NSSKeyloggerForm()
        {
            InitializeComponent();

            _procKey = HookCallbackKey;
            _procMouse = HookCallbackMouse;
            _hookIDKey = SetHookKey(_procKey);
            _hookIDMouse = SetHookMouse(_procMouse);

            if (!Directory.Exists(currentDirectory))
            {
                try
                {
                    Directory.CreateDirectory(currentDirectory);
                }
                catch { }
            }
            previousProfile = Properties.Settings.Default.DefaultProfile;

            RetryAttempts = 0;
            try
            {
                foreach (string file in Directory.GetFiles(currentDirectory, "*.nss"))
                {
                    ddbProfile.Items.Add(Path.GetFileNameWithoutExtension(file));
                }
                ddbProfile.SelectedItem = previousProfile;
            }
            catch { }
            Boolean loaded = false;
            Loading = true;
            while (!loaded)
            {
                loaded = AttemptLoad();
            }
            SetInstructions();

            //Clear keylog
            if (cbClearOnStartup.Checked)
            {
                if (File.Exists(tbKeylogSaveLocation.Text))
                {
                    try
                    {
                        File.Delete(tbKeylogSaveLocation.Text); //delete the old
                        File.Create(tbKeylogSaveLocation.Text).Dispose(); //create a new empty one
                    }
                    catch { MessageBox.Show("Unable to clear keylog!", "NSS Keylogger", MessageBoxButtons.OK, MessageBoxIcon.Error); }
                }
                else
                { //maybe keylog is already empty?
                    try
                    {
                        File.Create(tbKeylogSaveLocation.Text).Dispose();
                    } //create a new empty one
                    catch { MessageBox.Show("Unable to access keylog!", "NSS Keylogger", MessageBoxButtons.OK, MessageBoxIcon.Error); }
                }
            }

            //Start in subtle mode
            if (cbStartupSubtleMode.Checked)
            {
                ToggleKeylogger(profileData.ActivationKey.key);
                StartupSubtleMode = true;
                SubtleModeActivated = true;
                this.WindowState = FormWindowState.Minimized;
                this.ShowInTaskbar = false;
            }
            Startup = false;
        }
开发者ID:Coolcord,项目名称:NSS_Keylogger,代码行数:71,代码来源:NSSKeylogger.cs



注:本文中的LowLevelMouseProc类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# LruCache类代码示例发布时间:2022-05-24
下一篇:
C# LowLevelKeyboardProc类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap