I.3. Registry Function Declarations

There are 45 Win32 Registry functions that you can use from VBA. Some of these functions are included for 16-bit compatibility or requires special knowledge of Windows security and are not listed in this book. As such, this section describes only 34 of the 45 functions. In addition, many new Registry functions were added in Windows XP Professional x64 Edition, Windows Server 2003 SP1, and Windows Vista. These functions are also described in the following pages. The functions are arranged in alphabetical order and a brief description of what each function does is given. It also lists the functions declarations, and describes each of their parameters and their return values.

The following API functions are not included in this section:

  • RegCreateKey: Creates the specified Registry key. Supported for 16-bit compatibility. Applications should use RegCreateKeyEx.

  • RegDisablePredefinedCache: Disables the specified handle table for a process's HKEY_CURRENT_USER key.

  • RegDisablePredefinedCacheEx: Disables the specified handle table for a process's HKEY_CURRENT_USER key. This function requires Windows Vista or later.

  • RegEnumKey: Enumerates subkeys of the specified Registry key. Supported for 16-bit compatibility. Applications should use RegEnumKeyEx.

  • RegOpenCurrentUser: Returns a handle to HKEY_CURRENT_USER for the user for whom the current thread is impersonating.

  • RegOpenKey: Opens the specified Registry key. Supported for 16-bit compatibility. Applications ...

Get Access™ 2007 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.