skip to main content

Library Routines : REG_CREATE_KEY_EX, DISPLAY_REG_CREATE_KEY_EX

REG_CREATE_KEY_EX, DISPLAY_REG_CREATE_KEY_EX
The REG_CREATE_KEY_EX library routine creates the specified registry key. If the key already exists, it is opened. Note that key names are not case sensitive.
To perform this action on the Windows client machine in an Application Server architecture, use DISPLAY_REG_CREATE_KEY_EX instead of REG_CREATE_KEY_EX.
Syntax:
 CALL "REG_CREATE_KEY_EX" USING openKey 
Parameters:
This handle is returned by the REG_CREATE_KEY, REG_CREATE_KEY_EX, REG_OPEN_KEY or REG_OPEN_KEY_EX library routine, or it can be one of the following predefined keys, defined in isreg.def:
Return code:
returnCode can be any signed numeric data item and provides additional information:
Operation failed. Click here for a list of error codes.
Examples:
Example - Create a subkey
working-storage section.
copy "isreg.def".
01  open-key-handle         usage unsigned-long.
01  subkey-handle           usage unsigned-long.
01  subkey-to-be-created    pic x(40).
77  status-code             pic 9(3).
01  key-class               pic x(10value spaces.
01  key-options             usage unsigned-long
01  key-sam                 usage unsigned-long.
01  key-disposition         usage unsigned-long.
procedure division.
   move "iscobol-test-key" to subkey-to-be-created.
   move REG_OPTION_NON_VOLATILE to key-options
   move KEY_ALL_ACCESS          to key-sam
   call "reg_create_key_ex" using open-key-handle

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left