473,386 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

how to install global WH_CBT hook



hi

why the following works only for windows initiated from the current
thread

SetWindowsHookEx(HookType.WH_CBT, HookProc,IntPtr.Zero,0)

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #1
1 6357

"tolisss" <no****@devdex.com> wrote in message
news:Oq**************@tk2msftngp13.phx.gbl...


hi

why the following works only for windows initiated from the current
thread

SetWindowsHookEx(HookType.WH_CBT, HookProc,IntPtr.Zero,0)

*** Sent via Developersdex http://www.developersdex.com ***


I assume HookProc is managed callback, so it's part of a managed assembly,
right?

Using managed callbacks, only WH_KEYBOARD_LL and WH_MOUSE_LL hooks can be
installed globally. All other hooks would requires the CLR (and the
HookProc's assembly) to be mapped in every process on the system, this is
not supported in .NET. Your only option is to implement your HookProc (and
preferably, also the registration/unregistration code too) in a native code
DLL (C/C++).

Willy.

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Richard Hanson | last post by:
Over the last few days, I reinstalled Win2kSP2 to a spare harddrive I had just swapped into my Fujitsu LifeBook P1120 (long story <wink>). Subsequently, I DL'ed the newest Python alpha (2.4a2), and...
3
by: paul francis | last post by:
Hi Please help because I'm really stuck: I'm trying to write an application in C# which can be used to track the mouse pointer position on any window. I'm trying to use a Global mouse hook to...
2
by: Tim | last post by:
Please advise if you can. Presumably initialisation of members in member initialisation lists is perfomed by 'C' run-time startup. If the CRT was never started-up would those members be garbage?...
0
by: sharp | last post by:
I've done enough reading through the groups to know that a Global Keyboard hook is not possible via C# (.NET) itself. From what I have seen proposed is that you need to write a global hook in a...
3
by: Arnold | last post by:
Hola, hace unos meses pregunte sobre hacer un hook global al teclado y me dieron varios articulos, uno de ellos estaba en VB .net y era el unico que atrapaba los accesos directos (CTRL + ESC, CTRL...
2
by: Víctor | last post by:
Hello, I'm doing a Taskbar like app and I need to show open application's buttons. I've chosen to use a global hook due to elevate resource comsumptions by using a timer that looks up running...
2
by: Bryan | last post by:
I am currently working on a project that I am interested in porting to Win32 or .NET, but I don't know where to get started. I have quite a bit of experience with MFC, and I have been working with...
1
by: Anonieko | last post by:
Global.asax? Use HttpModules Instead! In a previous post, I talked about HttpHandlers - an underused but incredibly useful feature of ASP.NET. Today I want to talk about HttpModules, which are...
1
by: JJ | last post by:
I'd like to know whether or not I can use a global WH_SHELL hook in Vista? Thanks
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.