Use DISPLAY_REG_CREATE_KEY when you want the action to be performed on the display host's registry (the local host when the application is run with a standard runtime; the thin client when the application is run with the thin client). Use REG_CREATE_KEY when you want the action to be performed on the server host's registry (the local host when the application is run with a standard runtime, and the application host when the application is run with the thin client).
CALL "REG_CREATE_KEY" USING OPEN-KEY-HANDLE, SUBKEY-TO-BE-CREATED, SUBKEY-HANDLE GIVING STATUS-CODE
OPEN-KEY-HANDLE Usage unsigned-long |
Handle of a currently open key or one of the following predefined handles of keys that are always open (defined in
acugui.def):
The key created or opened by REG_CREATE_KEY is a subkey of the key identified by OPEN-KEY-HANDLE. |
SUBKEY-TO-BE-CREATED PIC X(n) | Name of the subkey to create or open. |
SUBKEY-HANDLE Usage unsigned-long | Data item to receive the handle of the newly created or opened key. |
STATUS-CODE Numeric data item. | Receives the return status of the call to Microsoft's RegCreateKey function. A return status of zero indicates success; non-zero indicates that an error occurred. |
REG_CREATE_KEY may be used to create several keys at once.
For example, by setting SUBKEY-TO-BE-CREATED to
"key1\key2\key3"
you could create three keys, where key3 is a subkey of key2, key2 is a subkey of key1, and key1 is a subkey of the key specified by OPEN-KEY-HANDLE. The lowest-level key (key3 in this example) is the one that is opened and has its handle returned in SUBKEY-HANDLE.