title: How to read Hexadecimal value from registry string
body: <p>I am having one Delphi XE2 Project to check one Hexadecimal Value from Registry Key <strong>MyCompanyName\1</strong>. If the <strong>Hexadecimal Value</strong> is <strong>13</strong>, then some message will be there else some other message will be there.
  <img src="https://i.stack.imgur.com/wWJUQ.jpg" alt="MyProject">    </p>
  
  <p>So I have defined the following codes:    </p>
  
  <pre><code>procedure TMainForm.BitBtn01Click(Sender: TObject);
  var
    RegistryEntry : TRegistry;
  begin
    RegistryEntry := TRegistry.Create(KEY_READ or KEY_WOW64_64KEY);
    RegistryEntry.RootKey := HKEY_LOCAL_MACHINE;
    if (RegistryEntry.KeyExists('SOFTWARE\MyCompanyName\1\')) then
      begin
        if (RegistryEntry.OpenKey('SOFTWARE\MyCompanyName\1\',true)) then
          begin
            if (RegistryEntry.ReadString('SettingValue') = '0x00000013')  then
              begin
                Memo01.Lines.Add('SettingHexadeciamlValue exist properly')
              end
            else
              begin
                Memo01.Lines.Add('SettingHexadeciamlValue does not exist properly')
              end;
          end
        else
          begin
            if (RegistryEntry.OpenKey('SOFTWARE\MyCompanyName\1\',false)) then
              begin
                Memo01.Lines.Add('Unable to read RegistryKey ''MyCompanyName''Exiting.......')
              end;
          end;
  
      end
    else
      begin
        Memo01.Lines.Add('RegistryKey ''MyCompanyName'' does not exist')
      end;
  end;  
  </code></pre>
  
  <p>After compilation, when I am running the application <strong>AsAdministrator</strong>, I am getting error mentioning <strong>Invalid data type for 'SettingValue'</strong>.</p>