473,569 Members | 2,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Monitor or hook a call to the Registry, and swap the returned value

Hi,

Is there any way in which I can monitor / hook the Registry, and upon a
call to a specific key from a specific application - swap the returned
value?

I was thinking of using this method to overcome the "click" sound of
the WebBrowser, without having to affect the Registry permanently. This
way I could monitor the call for the sound file to be played (located
in
HKEY_CURRENT_US ER\AppEvents\Sc hemes\Apps\Expl orer\Navigating \.Current)
and hope to return an empty or null string instead.

Any idea on how to do this?

Thanks.

Sep 25 '06 #1
6 2519
Just a thought.....

Wouldn't it be easier to use System.Diagnost ics.Process to watch for the
application to start - change the value in the registry to a non-clicking
sound - then, when the app closes, change it back?

You'd probably want this solution running as a service.

Even easier (and no service needed) would be to write a tiny app that
changes the registry key, launches the webbrowser and replaces the registry
key when the browser closes.

Just a thought.....


"ewolfman" <ew******@yahoo .comwrote in message
news:11******** **************@ h48g2000cwc.goo glegroups.com.. .
Hi,

Is there any way in which I can monitor / hook the Registry, and upon a
call to a specific key from a specific application - swap the returned
value?

I was thinking of using this method to overcome the "click" sound of
the WebBrowser, without having to affect the Registry permanently. This
way I could monitor the call for the sound file to be played (located
in
HKEY_CURRENT_US ER\AppEvents\Sc hemes\Apps\Expl orer\Navigating \.Current)
and hope to return an empty or null string instead.

Any idea on how to do this?

Thanks.

Sep 25 '06 #2
Yeah, but thats the easy solution. Although it has its downsides too,
because it affects all navigation till the app closes, plus you can
never know if the app will not crash before it resets the Registry back
to its original value.

That's why I was looking for a different solution.
smerf wrote:
Just a thought.....

Wouldn't it be easier to use System.Diagnost ics.Process to watch for the
application to start - change the value in the registry to a non-clicking
sound - then, when the app closes, change it back?

You'd probably want this solution running as a service.

Even easier (and no service needed) would be to write a tiny app that
changes the registry key, launches the webbrowser and replaces the registry
key when the browser closes.

Just a thought.....


"ewolfman" <ew******@yahoo .comwrote in message
news:11******** **************@ h48g2000cwc.goo glegroups.com.. .
Hi,

Is there any way in which I can monitor / hook the Registry, and upon a
call to a specific key from a specific application - swap the returned
value?

I was thinking of using this method to overcome the "click" sound of
the WebBrowser, without having to affect the Registry permanently. This
way I could monitor the call for the sound file to be played (located
in
HKEY_CURRENT_US ER\AppEvents\Sc hemes\Apps\Expl orer\Navigating \.Current)
and hope to return an empty or null string instead.

Any idea on how to do this?

Thanks.
Sep 25 '06 #3
As you said, "you can never know if the app will not crash before it resets
the Registry back to its original value." This holds true for the easy
approach as well as hooking system events. In fact, it is even more of a
danger when hooking system events. If an app crashes while hooking system
events, this can cause the system to behave in unforeseen ways, even
crashing the system.

There are registry events that you can hook into using WMI or C++ at
http://windowssdk.msdn.microsoft.com.../ms747845.aspx but it does
not work for the HKEY_CURRENT_US ER hive and only monitors changes - not
reads.

And, although I know you don't like doing things the easy way, you could
always simply open the Windows Control Panel, then open sound properties
dialog and either choose silent sound scheme or just set no sound for start
navigation event.

Is there a reason for not setting this property permanently via the sound
properties control panel applet? After all, that sound sure is annoying.

"ewolfman" <ew******@yahoo .comwrote in message
news:11******** *************@h 48g2000cwc.goog legroups.com...
Yeah, but thats the easy solution. Although it has its downsides too,
because it affects all navigation till the app closes, plus you can
never know if the app will not crash before it resets the Registry back
to its original value.

That's why I was looking for a different solution.
smerf wrote:
>Just a thought.....

Wouldn't it be easier to use System.Diagnost ics.Process to watch for the
application to start - change the value in the registry to a non-clicking
sound - then, when the app closes, change it back?

You'd probably want this solution running as a service.

Even easier (and no service needed) would be to write a tiny app that
changes the registry key, launches the webbrowser and replaces the
registry
key when the browser closes.

Just a thought.....


"ewolfman" <ew******@yahoo .comwrote in message
news:11******* *************** @h48g2000cwc.go oglegroups.com. ..
Hi,

Is there any way in which I can monitor / hook the Registry, and upon a
call to a specific key from a specific application - swap the returned
value?

I was thinking of using this method to overcome the "click" sound of
the WebBrowser, without having to affect the Registry permanently. This
way I could monitor the call for the sound file to be played (located
in
HKEY_CURRENT_US ER\AppEvents\Sc hemes\Apps\Expl orer\Navigating \.Current)
and hope to return an empty or null string instead.

Any idea on how to do this?

Thanks.

Sep 26 '06 #4
I'm aware of the WMI capabilities, and this is why I asked the question
in the first place.

Its not that I don't like the easy way - of course I'd like to find an
easy way. The thing is that I don't think that switching the navigation
sound off, globaly, for the purpose of a single client application
instance, is the correct choice (unless I don't have any other choice,
and in this case I will ask the user for permission to do so).

Sep 26 '06 #5
There is one other option for your user... You can use AutoIT (freeware) to
give your user a simple icon to double click to turn the sound on or off.
You can get it at http://www.autoitscript.com/autoit3/. You can even make
compiled executable scripts that can be run without having to install AutoIT
on the users system.

Sorry I couldn't be of more help. Good luck to you.
"ewolfman" <ew******@yahoo .comwrote in message
news:11******** *************@e 3g2000cwe.googl egroups.com...
I'm aware of the WMI capabilities, and this is why I asked the question
in the first place.

Its not that I don't like the easy way - of course I'd like to find an
easy way. The thing is that I don't think that switching the navigation
sound off, globaly, for the purpose of a single client application
instance, is the correct choice (unless I don't have any other choice,
and in this case I will ask the user for permission to do so).

Sep 26 '06 #6
Sorry I couldn't be of more help. Good luck to you.

Thanks for trying.

Sep 27 '06 #7

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

Similar topics

5
3838
by: bughunter | last post by:
Hi, Consider this code: ---- Monitor.Pulse(oLock); Monitor.Exit(oLock); ---- If a thread was waiting on oLock then will the current thread
11
2920
by: Michi Henning | last post by:
Hi, I'm calling Monitor.Wait() from a console event handler. It's not working -- the call to Wait() immediately causes the process to exit. Is it impossible for some reason to call Wait() from an event handler? Small code example attached. Thanks,
4
2191
by: msnews.micorsoft.com | last post by:
i want to receive a message when a window was activated. I use the WH_CBT type hook to process,the code is following: LRESULT CALLBACK CBTProc(int nCode,WPARAM wParam, LPARAM lParam) { HWND hWnd; if(nCode < 0) return CallNextHookEk(hHook,nCode,wParam,lParam); if(nCode == HCBT_ACTIVATE) {
9
4718
by: Jesse | last post by:
Hi All, I want to be able to make an engine in VB.Net which creates a bridge between applications and the system registry, so before it's processed by the O/S, I want to be able to have the request analysed (read/write/enumerate etc.) and reject the request if it doesn't meet certain parameters. I was trying to do this in VB 6 and had a...
11
6612
by: Yelena Varshal via AccessMonster.com | last post by:
Hello, I have a problem with one of msaccess.exe API calls that work on my desctop but does not work on the laptop from within MS ACCESS. There is a lot of differences between 2 computers including one running Office 2000 and another running Office 2003. This code was created by a previous developer. I need to find the description and...
12
5248
by: Perecli Manole | last post by:
I am having some strange thread synchronization problems that require me to better understand the intricacies of Monitor.Wait/Pulse. I have 3 threads. Thread 1 does a Monitor.Wait in a SyncLock block protecting a resource. Thread 2 and 3 also have a SyncLock block protecting the same resource and after executing some code in their blocks...
10
1790
by: RobinS | last post by:
Hello to all, and happy new year! I have this application that someone wrote that I'm sort of checking out. The forms look fine in design mode, but when I run the application, it crops off the bottom of almost every form. I haven't figured out yet if there's a pattern to it. I compared two forms -- one that looks okay and one that gets...
2
2790
by: TwistedPair | last post by:
All, This is sort of a continuation of a previous post of mine. The code below basically reads a registry key to get a path to a folder and it watches for files created in that folder (only created). It also reads another registry key for another path which is a destination path. When a file shows up, it copies it off. It actually works...
0
1189
by: TwistedPair | last post by:
All, I had some great advice about this a bit ago, but I'm just not good enough with this code to put together all the pieces. The way the code below works is as a service. When it is started, it watches a folder that is set in a registry key, and if there is a file created in that folder, it copies it to a destination folder, also defined...
0
7612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
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
8122
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...
0
6284
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
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2113
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
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.