Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Registry Access with VB6

Posted on 2004-04-16
3
Medium Priority
?
1,120 Views
Last Modified: 2012-05-04
VB6 has a GetAllSettings function that returns all values of a key created with SaveSettings. When the number of values is large, this function can save the app from opening the key repeatedly in order to read each value.

However, SaveSettings only can put information in HKEY_CURRENT_USER, which makes it accessible only by the user who put it there (I need access to this info for all users.)

Secondly, there is no Win32 API that returns all values of a key; one can get all value names, but then the key needs to be opened and closed each time a value is read.

My question is, what would be an elegant way in VB6 to read all values of a key in one shot?
Can SaveSettings be made to write to HKEY_LOCAL_MACHINE, for instance?
0
Comment
Question by:campinas
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
Sethi earned 2000 total points
ID: 10847332
0
 

Author Comment

by:campinas
ID: 10851584
thanks!
0
 
LVL 18

Expert Comment

by:Sethi
ID: 10852126
:-) Anytime
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question