18.3. Using the Win32 Registry APIs

This section describes the Win32 Registry API functions you can use to access and manipulate a wider range of Registry keys than you can with the inbuilt VBA functions. Before attempting this section, however, we strongly advise that you read Chapter 14, "Extending VBA with APIs."

The Win32 API provides all the functions you'll need to access the Registry. Of course, the scope of some functions is restricted for purely common-sense reasons; after all, there is little point in making changes to the temporary areas.

But, of course, this begs the question: Where do I find information about all these constants and functions? Welcome to the wonderful world of programming! Unfortunately, Microsoft has not published a definitive text on the Registry, or indeed the Win32 API, so you need to rely on the various books, web pages, and third-party software utilities that deal with these topics.

With regard to using the Registry, this section provides a real-world example of how to use the Registry API functions. In Appendix L, you will find a complete list of all the Registry functions, along with declarations of the Registry-related constants and user-defined types. Also, at the end of this chapter, we have listed the few resources that we believe are worth a look. The Resources section at the end of Chapter 13 also indicates where to source information about the Win32 API, which will also provide details about the many functions, constants, and user-defined ...

Get Access 2003 VBA Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.