Skip to content

Commit

Permalink
RegQueryBinaryValue can now be used to query any type of registry val…
Browse files Browse the repository at this point in the history
…ue and not just REG_BINARY-type values. Closes #155.
  • Loading branch information
martijnlaan committed Jul 20, 2015
1 parent 8fdeb18 commit 03531e8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Projects/ScriptFunc_R.pas
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,9 @@ function CmnFunc2Proc(Caller: TPSExec; Proc: TPSExternalProcRec; Global, Stack:
S := Stack.GetString(PStart-2);
if RegOpenKeyExView(RegView, RootKey, PChar(S), 0, KEY_QUERY_VALUE, K) = ERROR_SUCCESS then begin
N := Stack.GetString(PStart-3);
if (RegQueryValueEx(K, PChar(N), nil, @Typ, nil, @Size) = ERROR_SUCCESS) and (Typ = REG_BINARY) then begin
if RegQueryValueEx(K, PChar(N), nil, @Typ, nil, @Size) = ERROR_SUCCESS then begin
SetLength(DataS, Size);
if (RegQueryValueEx(K, PChar(N), nil, @Typ, @DataS[1], @Size) = ERROR_SUCCESS) and (Typ = REG_BINARY) then begin
if RegQueryValueEx(K, PChar(N), nil, @Typ, @DataS[1], @Size) = ERROR_SUCCESS then begin
StackSetAnsiString(Stack, PStart-4, DataS);
Stack.SetBool(PStart, True);
end else
Expand Down
2 changes: 1 addition & 1 deletion ishelp/isxfunc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,7 @@ end;</pre></example>
<function>
<name>RegQueryBinaryValue</name>
<prototype>function RegQueryBinaryValue(const RootKey: Integer; const SubKeyName, ValueName: String; var ResultStr: AnsiString): Boolean;</prototype>
<description><p>Queries the specified REG_BINARY-type registry value, and returns the data in ResultStr. Returns True if successful. When False is returned, ResultStr is unmodified.</p></description>
<description><p>Queries the specified registry value, and returns the data in ResultStr. Returns True if successful. When False is returned, ResultStr is unmodified.</p></description>
</function>
</subcategory>
<subcategory>
Expand Down
6 changes: 6 additions & 0 deletions whatsnew.htm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
For conditions of distribution and use, see <a href="http://www.jrsoftware.org/files/is/license.txt">LICENSE.TXT</a>.
</p>

<p><a name="5.5.7"></a><span class="ver">5.5.7-dev </span><span class="date">(?)</span></p>
<ul>
<li>Pascal Scripting change: function <tt>RegQueryBinaryValue</tt> can now be used to query any type of registry value and not just <tt>REG_BINARY</tt>-type values.</li>
<li>Minor tweaks.</li>
</ul>

<p><a name="5.5.6"></a><span class="ver">5.5.6 </span><span class="date">(2015-07-16)</span></p>
<ul>
<li>Added the Windows 10 "compatibility" section to the various manifest resources used by Inno Setup. This enables any check for the operating system version to get the real version number (10.0) instead of getting the same version number as it did in Windows 8.1 (6.3).</li>
Expand Down

0 comments on commit 03531e8

Please sign in to comment.