skip to main content

Library Routines : REG_ENUM_VALUE, DISPLAY_REG_ENUM_VALUE

REG_ENUM_VALUE, DISPLAY_REG_ENUM_VALUE
The REG_ENUM_VALUE library routine removes a named value from the specified registry key. Note that value names are not case sensitive.
To perform this action on the Windows client machine in an Application Server architecture, use DISPLAY_REG_ENUM_VALUE instead of REG_ENUM_VALUE.
Syntax:
 CALL "REG_ENUM_VALUE" 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 - Enumarate the values of a key
working-storage section.
copy "isreg.def".
01  open-key-handle         usage unsigned-long.
01  subkey-key-handle       usage unsigned-long.
77  ndx                     pic 9(3).
77  status-code             pic 9(3).
01  subkey-name             pic x(40).
01  name-size               usage unsigned-long.
01  data-type               usage unsigned-long.
01  value-data              pic x(40).
01  data-size               usage unsigned-long.
procedure division.
    set name-size to size of value-name
    set data-size to size of value-data
    perform varying ndx from 1 by 1 until 1 = 2
       call "reg_enum_value" using subkey-handle
            giving status-code
       if status-code not = 0   
          exit perform    
       display value-name
    end-perform.

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