473,586 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reverse P/Invoke in a DLL for global hooks?

Is using Reverse P/Invoke in a .NET DLL for installing global hooks
supported?

Jul 10 '07 #1
2 2609
On Jul 10, 8:45 am, yuhongbao_...@h otmail.com wrote:
Is using Reverse P/Invoke in a .NET DLL for installing global hooks
supported?
eg.
SetWindowsHookE x(WH_WHATEVER, <delegate to hook procedure in .net
dll>, <module handle of .net dll>, 0)

Notice that the .NET DLL's handle is passed to SetWindowsHookE x.

Jul 10 '07 #2
Hello yu***********@h otmail.com,

There is a sample http://pinvoke.net/default.aspx/user...owsHookEx.html

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Is using Reverse P/Invoke in a .NET DLL for installing global hooks
supported?

Jul 10 '07 #3

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

Similar topics

59
4280
by: Raymond Hettinger | last post by:
Please comment on the new PEP for reverse iteration methods. Basically, the idea looks like this: for i in xrange(10).iter_backwards(): # 9,8,7,6,5,4,3,2,1,0 <do something with i> The HTML version is much more readable than the ReST version. See: http://www.python.org/peps/pep-0322.html
3
12581
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 do this but with limited success. According to the documentation (as I understand it) you can only do Global hooks in ..Net if the delegate...
3
2243
by: cichy83 | last post by:
Hi! I have a problem with global hooks under these two OS. I'm using three following types of hooks: CBT Hokk, Keyboard Hook, Mouse Hooks. I'm using BCB 6, under Win XP everything works fine (functions are in dll of course, etc.). But under Win 98 my program (without any communicates) execute normal, but not working at all.
2
4216
by: tshad | last post by:
I am setting up Authentication that I want to put in multiple Web Sites on my server. I found a good article on this and am looking at moving my code from my Global.asax file to an HTTP Module. This works fine. But I was curious about what would happen if I left the Global.asax code in (which is identical to the HTTPModule code) as well...
2
4672
by: Lunchtimemama | last post by:
I am trying to modify another application's window (Google Talk) to insert some UI of my own. I think the best method would be to install a remote local hook in gtalk's thread that intercepts the paint message and injects the custom UI. From the reading I've done, it is possible to install a system hook with an unmanaged stub that passes...
0
2183
by: effone | last post by:
I have two addins installed in my Outlook 2003, both have their specific functionality, I would like to integrate the functionality of both thru global mouse hooks, here is my senerio 1) Lets say there is a button "abc" on toolbar "A" in outlook mail composing window 2) and there is a button "xyz" on toolbar "X" in the same mail composing...
23
2240
by: David Colliver | last post by:
Hi, using c#, 1.1 I know that we are not supposed to use global variables etc. in c# I am having a problem, but not sure how to resolve. I did have another post here, but may have over confused things, so I will start afresh. An example of what I want to do...
0
2633
by: ramon.talavera | last post by:
Hello, I am trying to read rawinput as I have to distinguish between two devices (mice), I have found several examples and I am able to detect Raw Input in the local window, but cannot intecept raw input messages in other windows, so I cannot track the mouse as soon as another window catches the mouse focus.
2
1567
by: yuhongbao_386 | last post by:
Is using Reverse P/Invoke in a .NET DLL for installing global hooks supported?
0
7911
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8200
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7954
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8215
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.