|
Just like any other simple tree search algorithm, you would have to write a recursive function (a function that calls itself), passing in the path you want it to search. Here's a little pseudo code to get you started.
Private Function SearchRegistryPath(ByVal rootPath As String, ByVal value As String) As String
' Start by opening the rootPath key that was passed in
' Iterate the values in this key
' If you find the value your looking for
' Close the rootPath key we opened
' Return rootPath
' End If
' Next
' Iterate through the keys in the rootPath that was passed in
' returnValue = SearchRegistryPath( rootPath & SubKey, value )
' If returnValue <> "" Then
' Close the rootPath key we opened
' Return returnValue
' End If
' Next
' Close the rootPath key we opened
' Return String.Empty
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Awesome, thx for the input.. This will be my first real delve into the Registry. I'm trying to get back into Programming and have quite a project setup for myself. I've not used VB since '98 and .NET is a little different. I'm sure I'll have some more questions later, but for now I'll try to do some tinkering around and build off of the pseudo code you gave. Thanks again!
|
|
|
|
|
Will this also work if I want to be more specific and say, rather than going by just the Value name, I want the Value's Data to be a specific string? I'm looking for a Key that Contains a Value called "DisplayName", but it's "DisplayName" has to equal "MyProgram", or whatever.
|
|
|
|
|
Sure, just pass the value as a third parameter to the function. Then when you find the value name your looking for, compare the value to the one you pass into the function.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I know this question comes up all too frequently on CodeProject. "How do I pass data from one form to another?" Well, here's an article on MSDN about working with multiple Forms in VB.NET!
Working with Multiple Forms in Visual Basic .NET: Upgrading to .NET[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm new to Vb.Net and I was just wondering, how do I have two forms pass dat....
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
Thanks Dave! Very helpful.;)
|
|
|
|
|
Do you realise you will have to post this once every couple of days, because once this has disappeared off the front page people won't see it any more. In fact, I'm not sure they even bother looking at the first page of posts on the forum before posting their question.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
My Blog
|
|
|
|
|
Yes, I do.
Maybe we can get a list of helpful articles NOT hosted on CodeProject listed on the front page.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
No kidding. Unfortunately, few people ever search the message boards before asking a question. If they did, they would find a wealth of info just on the forums. Not to mention Google or MSDN.
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
Colin Angus Mackay wrote:
In fact, I'm not sure they even bother looking at the first page of posts on the forum before posting their question.
he he he.. You're probably right! I'm a n00b to the board, but am very familiar with Forums and that is ALL too common. I'll admit that I didn't read ALL of the previous pages before I posted my question about Registry Searching, BUT I did use the Search feature..
|
|
|
|
|
JeremiahSA wrote:
I did use the Search feature
Well done. If only more people would at least make the attempt to find out for themselves. Usually when I've gone searching for information I find lots of other useful stuff on the way that I may not need at that moment, so I just make a mental note of where I saw it so I can go back for it if I ever need it (or if I'm just looking for something new to learn). If I ever do need it I know the infomation exists already and can get it reasonably quickly - or I've got a better idea of the search terms I need to use to find similar information.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
My Blog
|
|
|
|
|
Hi
Can anyone please tell me how can I convert a dataset into foxpro dbf file.
C, I have a grid which is associated with a dataset. There are options of exporting grid data to differenet format, like pdf, xml, excel etc. This grid provides the feature whereby all mentioned format's file can be created.
There is one more requirement of exporting the grid data into foxpro dbf.
Please let me know if anyone has an idea regarding this
Thanks in advance -
Somesh
Always I am here to share all my pleasures with Code
|
|
|
|
|
can some body mail me character segmentatio
code for OCR
saud
|
|
|
|
|
No... Because it's very dependant on your implementation of OCR. How does your implementation learn what a character image looks like? (Don't answer, I'm not really asking...) Don't know? Start digging into neural networks...
Look, if you want to write an OCR application, it's not as simple as pasting together code snippets from various apps and articles. There is no one method of determining the boundries of paragraphs, sentenances, words, and characters. This is something you going to have to do A LOT of research on before hand and then come up with your own implementation and design your app with the features you want to support and that you NEED to support based on your requirements.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
This is a piece of information for serious mobile application developers who tired of writing complicated code that runs only in one platform.A new language for creating mobile applications for PDAs is out, it is so simple that after programming in codewarrior and J2me this language will seem like childs play to you. Not only is it simple but the applications built using this tool run on all platorms ranging from PALM, POCKET PC, SYMBIAN,NOKIA . The language - GBasic comes bundeled with simulators for all platforms , IDE and sync server for for developing server side sync logic . The mobile application development tool is called GoDB.
www.consigntech.com/20.htm[^]
|
|
|
|
|
Spammer...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can you tell?
Still coaxing software out of the can after all these years...
|
|
|
|
|
He joined CP yesterday and posted two messages, both exactly the same. The contents of the message just describe a product, no real question was ever asked.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello first of all its a SHE not a HE. Secondly is it so bad that a person shares a piece of information about a new product with others . If you dont find it interesting then its not my fault. But there are others who have been mailing me and want the link to the product they want to know about the new products in the market. Like it was mentioned in my thread the information was ONLY for SERIOUS programmers. So if you do not belong to this category then please IGNORE.
www.consigntech.com
|
|
|
|
|
I'm as SERIOUS as the next guy/gal. But instead of posting your AD in the Forums for free, why not SUPPORT this site and PAY to advertise on it, like other SERIOUS vendors.
[EDIT]
Opps! I forgot to include the link to the MediaKit[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
A serious programmer is interested in the information, not where or why it is posted.
www.consigntech.com
|
|
|
|
|
Nobody I know likes Code Warrior.
Still coaxing software out of the can after all these years...
|
|
|
|
|
Hi,
I'm not ease with the multithreading and i have a lot of difficulties to understand how a program run with this kind of things.
What i want to do :
1- My class will be accessed by multi - threads and than thread safe
2- Allow a connect and disconnect and reconnect (the reconnect occurs only when the socket is closed by the remote host or an error occurs)
3- When a user want close the socket all tasks made by threads will stop (Race condition to avoid)
4- Will be Synchronous and very efficient.
My problems :
1- (See point 2 and 3 before)
a) We can imagine that a thread close the socket (user action) and at the same time i lost the connection and than my receive thread or send thread or both will raise an error or close event also. Than It could be occurs that the error or close event come from the application launch a reconnect but the user want to stop.
b) the user call a connect juste after an error occurs and the reconnect is started but not finished. We can imagine the connect from the user is managed before the reconnect or it won't be possible.
c) and all the others cases that i can't not yet imagine.
-->I think taht all these problems are caledl race condition
Please help me it's very important and very urgent.
PS : Sorry for my poor english but it's not my natural language. All advices on my coding are welcome:
The code is to large to be posted. If you think you can help me. Ask and i will send you the class that i made
|
|
|
|
|
I've got this cute little vbn ap I put together that I wanted to be able to run on someone else's PC. I tried to move a copy of the thing over there but it wouldn't recognize the file extensions.
I thought for certain that as long as someone had the .NET framework, they would be able to run an ap, but this does not seem to be the case.
Is there an easy way to use Visual Studio .NET to pack up an ap so it can be installed on a PC with just the Framework?
Still coaxing software out of the can after all these years...
|
|
|
|