Opens an existing registry key. FactoryGlobals provides the Declare statement in GlobalSubroutines so you can use this Windows API call without declaring it in your procedures.
NOTE: For Crystal XI users, use the PrintReport subroutine instead of using the RegOpenKeyEx and RegCloseKeyEx subroutines. The PrintReport subroutine will do all of the registry entries for you.
Syntax
RegOpenKeyEx (hKey, lpSubKey, ulOptions, samDesired, phkResult)
Properties
The RegOpenKeyEx subroutine syntax has these parts:
Part |
Description |
hKey |
Long. Handle of an open key or one of the standard
key names. |
lpSubKey |
String. Name of the key to open. |
ulOptions |
Long. Unused. Set to zero. |
samDesired |
Long. One or more constants with the prefix KEY_ that describes which operation are allowed for this key. |
phkResult |
Long. Variable to load with a handle to the open key. |
Return Value
Long. Zero on success. All other values indicate an error.
Remarks
RegOpenKeyEx is a Windows API call.