REG_CLOSE_KEY, DISPLAY_REG_CLOSE_KEY

Closes a specified registry key by providing access to the Windows registry routine RegCloseKey.
Note: This ACUCOBOL-GT library routine is available in this COBOL version. Any compatibility issues in this COBOL system are in the Compatibility Issues section at the end of the topic.

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.

Compatibility Issues

  • DISPLAY_REG_CLOSE_KEY is not supported in this COBOL system.
  • Thin client technology is not supported in this COBOL system.