Highlighted
Absent Member.
Absent Member.
150 views

[archive] Help with DISPLAY_REG_QUERY_VALUE, please

[Migrated content. Thread originally posted on 25 October 2007]

Below is code that we are trying to use to see the location of Internet Explorer on a PC. Can someone please help me in figuring out what is wrong with it? When it runs we get a WS-STATUS-CODE of "0", we get a WS-RETURN-SIZE of "57" but we get no value in the WS-RETURN-VALUE variable. One other change we have tried is removing the "DISPLAY" from the Call but that had no effect on the outcome.

MOVE SPACES TO WS-RETURN-VALUE.
MOVE ZEROS TO WS-STATUS-CODE
PTR.

CALL "DISPLAY_REG_QUERY_VALUE"
USING HKEY_CLASSES_ROOT,
WS-RETURN-VALUE,
WS-RETURN-SIZE,
"\HTTP\shell\open\command",
GIVING WS-STATUS-CODE.


Thanks for any help.
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Help with DISPLAY_REG_QUERY_VALUE, please

Full program source is always welcome. Makes it much easier to help.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Help with DISPLAY_REG_QUERY_VALUE, please

You can try the "REG_QUERY_VALUE_EX".
Sample code:


CALL "REG_OPEN_KEY_EX" USING HKEY_CLASSES_ROOT,
"HTTP\shell\open\command", KEY_QUERY_VALUE,
REG-SUBKEY-HANDLE GIVING REG-STATUS
IF REG-STATUS NOT = 0
EXIT PARAGRAPH
END-IF

CALL "REG_QUERY_VALUE_EX" USING REG-SUBKEY-HANDLE,
" ", REG_BINARY, KEY-VALUE, 128 GIVING REG-STATUS
IF REG-STATUS NOT = 0
DISPLAY MESSAGE BOX KEY-VALUE
END-IF

CALL "REG_CLOSE_KEY" USING REG-SUBKEY-HANDLE
GIVING REG-STATUS
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.