473,698 Members | 2,841 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System Wide Registry Hook

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 C++ Dll engine loaded in to
Memory to only "buffer" the requests but it's not efficient enough. I
have heard there are better functions etc. to do this better in .Net
but I need some guidence.

Please help. Any advice will be HUGELY appreciated :o).

Jesse.
Nov 20 '05 #1
9 4727
Cor
Hi Jesse,

Using the registry is very easy in VB.net I would not start with thinking
about a Hook, read this first

http://msdn.microsoft.com/library/de...ClassTopic.asp

I hope this helps?

Cor
Nov 20 '05 #2
* je**********@md snews.com (Jesse) scripsit:
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 C++ Dll engine loaded in to
Memory to only "buffer" the requests but it's not efficient enough. I
have heard there are better functions etc. to do this better in .Net
but I need some guidence.


I doubt that this can be done "better" in .NET.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Cor
Hi Herfried,
I doubt that this can be done "better" in .NET.


I do not know how it is in the German language, but in my language people
say sometimes.

You can better do it in X. (Je kan het beter doen in X)

And the meaning of it is than, it is less work.

Cor
Nov 20 '05 #4
Cor,

* "Cor" <no*@non.com> scripsit:
I doubt that this can be done "better" in .NET.
I do not know how it is in the German language, but in my language people
say sometimes.

You can better do it in X. (Je kan het beter doen in X)


"Du kannst das besser tun in X"

;-)

I thought that the main problem was the performance issue and the OP
wanted to find a faster solution in .NET.
And the meaning of it is than, it is less work.


:-)

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #5
Hey Cor,
Using the registry is very easy in VB.net I would not start with thinking
about a Hook, read this first

http://msdn.microsoft.com/library/de...ClassTopic.asp

I hope this helps?


Unfortunately this page wasn't really what I was after. Although it
will help with later stages of writing an engine to modify the
registry yourself from within the program.

I think the hook is one of the most important fundamentals of writing
this so I know how it's going to work and then be able to build around
it. I have heard of a function from .Net which produces an event when
an application makes an adjustment to the registry. This would be
REALLY ideal. The information I'd like to retrieve is the filename of
the program, what key it's accessing, and what it's doing (adding,
deleting, modifying etc.).

For the sake of everyone else, I'll keep you updated with what I find
because I can see a lot of uses in this kind of data retrieval.

Jesse.
Nov 20 '05 #6
Hey Again,

I think this page would be more like what I'm after:

http://msdn.microsoft.com/library/de...classtopic.asp

But, can this be applied to a service that manipulates the registry?
I can't find out enough about it yet. If you can then I'll be able to
start, pause and stop the service which is just what I'm after.

Please help,

Jesse.
Nov 20 '05 #7
Cor
Hi Jesse,

I do not believe it is a service that does the registry, I think it is the
deep in Win32 and that should for you throw an event everytime there was a
change, something as the filesystemwatch er a registrysystemw atcher.

I think that you can look here if there is something what will help you in
that direction.

http://msdn.microsoft.com/library/de..._functions.asp

(Not that I know)

Cor
Nov 20 '05 #8
Hey Cor, Thanks for sticking with me on this subject! :o)
I do not believe it is a service that does the registry, I think it is the
deep in Win32 and that should for you throw an event everytime there was a
change, something as the filesystemwatch er a registrysystemw atcher.
Yeah, I think your right aye - So I've explored different avenues.
When I initially started this project, I came across code which
basically repeats a function that tells you when there's a change but
because it's just repeating and repeating, slowed down the system
HEAPS aye... was a nightmare.
I think that you can look here if there is something what will help you in
that direction.

http://msdn.microsoft.com/library/de..._functions.asp


Yeah, these functions won't help, unless I can somehow run the same
functions, then hook the task that does the job? I don't know. I'm
quite certain now that the link below will be the closest, if not only
way I'm going to be able to pull this task off. I'm bummed I can't
seem to find a way I can't halt a program altogether when my program
needs to analyse the registry change going through, but yeah, I think
I'm going to have to work around it.

http://msdn.microsoft.com/library/de...try_events.asp

What do you think dude?

Jesse.
Nov 20 '05 #9
Cor
Hi Jesse,

Seeing this I think you would look at this.

http://msdn.microsoft.com/library/de...classtopic.asp

I hope this helps?

Cor
Nov 20 '05 #10

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

Similar topics

1
1444
by: Christian Wittern | last post by:
> Wide unicode is currently not supported on Windows. A number of > internal APIs (in particular for the registry, and for the "mbcs" > codec) assume that sizeof(Py_UNICODE) is 2. Contributions are > welcome. >Even with that fixed, Pythonwin would still need a major rework > to support wide Unicode. Thanks Martin for your reply. So this looks rather dim. I usually work on a Mac, where wide support is just a matter of
2
14307
by: Alex | last post by:
I am trying to determine if C# has the capabilities to listen for system events when the application does not have the window's focus. I am writing a windows application that I would like to run in the background when I am using my computer. I would like this windows application to utilize the clipboard, and determine when data has changed on the clipboard. I would also like my app to listen for Ctrl+C and Ctrl+V events, as well as mouse...
5
1932
by: Jim Hubbard | last post by:
I don't think you can hook system events outside your application in .Net without using an unmanaged DLL, but I thought I'd ask. Jim Hubbard
1
2466
by: Michael Roper | last post by:
Well, actually I'm not sure that's what I need. What I'd like to do is write an app for the tray that can monitor any app that gets launched and do a 'window size and position' on it based on whatever info is available for it (like say, its command line). This is part exercise, and part annoyance rectification. Any tips on how best to proceed would be appreciated. Michael Roper
10
2341
by: Niall | last post by:
I'm not quite sure which groups to post this to, so short of a massive crosspost, I decided on these two. I am running into troubles with resource usage of our app on Win2k and above systems. In several places, I have seen it said that the WinNT model only limits resources to available memory. However, I have seen errors caused by running out of resources on a machine with over 1GB of free memory (running Win2k server), as well as on my...
6
2595
by: Vic.Dong | last post by:
Hello. all: I want to inject a DLL of my custome hook dll to system serice SERVICES.EXE application as every OS restart? B.R. VIC
6
2524
by: ewolfman | last post by:
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
17
3767
by: ARC | last post by:
I've dealt with blue screens that frequently occur while developing in MS Access (really bad in Access 97, not quite as bad in later versions of Access). Finally, I had a blue screen that mentioned a driver: Vetefile.sys, and I tracked that down to CA Anti-virus. After searching on google, I tried a suggestion of disabling the real-time AV scanner, and have yet to encounter a blue screen while developing. I know I should just ditch CA, but...
22
6415
by: schneider | last post by:
I need to hook the system mouse down event. I'm trying to replicate how a context menu hides when the mouse clicks outside of the control. Thanks, Schneider
0
8683
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9170
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9031
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8901
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 most users, this new feature is actually very convenient. If you want to control the update process,...
1
6528
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4371
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3052
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
2
2336
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.