Windows NT registry

I am able to read and write to the registry using api but how do i retrieve the entire windows registry structure so i can load it into a tree view,this is for remote administration through my own application..so far ive solved most of my problems such as getting screen shots an sending them via Udp but this registry stuff gets very confusing...
thanks in advance
LVL 13
crazymanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

crazymanAuthor Commented:
Basically i need to know how to get a list of sub keys from the main key then i can just loop through.
0
caraf_gCommented:
You'll need some decent functionality to interact with the registry. I've got an example of a class module that lets you interact with the registry. (Thanks to waty)

 http://homepage.eircom.net/~carafa/VBSamples/VBAll/shellexecute.zip

I would suggest you write a recursive function to fill the treeview. You give it a registry key and let it enumerate the subkeys. Then you can use each concatenation of original key & "\" & subkey to feed into the function itself to do the branches of the tree.

0
caraf_gCommented:
Basically i need to know how to get a list of sub keys from the main key then i can just loop through.

Yep, my class module provides just that!
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

caraf_gCommented:
sorry - waty's class module ;-)
0
caraf_gCommented:
Look for the Enumerate* functions. They return arrays, that you can loop through.

Hope this helps! Good luck....

Pino
0
watyCommented:
:)
caraf_g, this class has been taken from Steve McMahon :)
0
crazymanAuthor Commented:
Wow man ur fast thanks a lot.!!!!!
0
watyCommented:
0
caraf_gCommented:
waty, do you mind if I lock this question then?

Good man Steve McMahon. Sounds Irish?
0
watyCommented:
Sure, take it, you answered, so you've find the right answer :)
Take it cata_g :)
0
caraf_gCommented:
Thanks.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.