REG_CLOSE_KEY, DISPLAY_REG_CLOSE_KEY

Closes a specified registry key by providing access to the Windows registry routine RegCloseKey.

Use DISPLAY_REG_CLOSE_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_CLOSE_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).

Usage

CALL "REG_CLOSE_KEY" 
    USING OPEN-KEY-HANDLE 
    GIVING STATUS-CODE

Parameters

OPEN-KEY-HANDLE Usage unsigned-long Handle of an open key to close.
STATUS-CODE Numeric data item. Receives the return status of the call to Microsoft's RegCloseKey function. A return status of zero indicates success; non-zero indicates that an error occurred.

Comments

Registry keys should not be left open any longer than necessary.