Pascal Scripting: RegQueryDWordValue

Inno Setup

Pascal Scripting: RegQueryDWordValue

Prototype:

function RegQueryDWordValue(const RootKey: Integer; const SubKeyName, ValueName: String; var ResultDWord: Cardinal): Boolean;

Description:

Queries the specified REG_DWORD-type registry value, and returns the data in ResultDWord. Returns True if successful. When False is returned, ResultDWord is unmodified.

Example:
var
  HistoryBufferSize: Cardinal;
begin
  if RegQueryDWordValue(HKEY_CURRENT_USER, 'Console',
     'HistoryBufferSize', HistoryBufferSize) then
  begin
    // Successfully read the value
    MsgBox('Console history buffer size: ' + IntToStr(HistoryBufferSize),
      mbInformation, MB_OK);
  end;
end;