CALL "REG_CLOSE_KEY" USING openKey GIVING returnCode |
openKey | USAGE UNSIGNED-LONG | Specifies the handle to the open key to be closed. The handle must have been opened by the REG_CREATE_KEY, REG_CREATE_KEY_EX, REG_OPEN_KEY or REG_OPEN_KEY_EX library routine. |
-1 | Invalid or missing parameters, or not running on Windows |
0 | Operation successful. |
Non zero | Operation failed. Click here for a list of error codes. |
working-storage section. copy "isreg.def". 01 open-key-handle usage unsigned-long. 01 subkey-handle usage unsigned-long. 77 status-code pic 9(3). ... procedure division. ... open-key. move hkey_local_machine to open-key-handle call "reg_open_key" using open-key-handle "SOFTWARE" subkey-handle giving status-code. close-key. call "reg_close_key" using open-key-handle giving status-code. |