Chapter 18. Working with the Win32 Registry

The Registry is the heart and soul of the 32-bitWindows operating system. It maintains information about the hardware and software installed on a computer, configuration settings, user settings, and information that the operating system needs to function. In fact, 32-bitWindows cannot operate without it.

The ability to access and edit the information contained in the Registry is essential to all but the most basic software developer, and, if you plan to do any serious programming, understanding the Registry is essential.

As you'll see, VBA only supports four native Registry functions, which allow you to store, retrieve, and delete values from one specific area of the Registry. To do anything more advanced, you'll need to use the Windows Registry APIs. If you don't feel confident with API programming, you should first peruse Chapter 13, "Extending VBA with APIs," which will give you the background you'll need to understand the more advanced topics in this chapter.

Although it's true that you can't damage anything by poking about in the Registry, it's also true that making changes to Registry entries when you don't know what you're doing is like randomly pressing buttons in the control room of your local nuclear power station; press the wrong button and everything will melt down to a bubbling fluorescent ooze at your feet.

This chapter is not intended to provide highly detailed information about every key, subkey, and value in the Registry; to do so would require a book far larger than you could carry. Instead, our aim is to provide you with enough information so you can confidently find your way around the Registry and can write basic VBA code to create, retrieve, edit, and delete Registry values. We'll start by taking a basic look at what the Registry is, what's in it, how it is structured, how it works, and, finally, how programmers can make best use of it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.253.161