Mega Search
23.2 Million


Sign Up

Make a donation  
Failed to get data from registry key  
News Group: embarcadero.public.delphi.nativeapi

I'm trying to read a registry key like this:

    Reg := TRegistry.Create;
    Reg.RootKey := HKEY_CURRENT_USER;
    try
      if Reg.OpenKeyReadOnly('\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\') then begin
        SecureProtocols := Reg.ReadInteger('SecureProtocols');
        Reg.CloseKey;
      end;
    finally
      Reg.Free;
    end;

and sometimes, not always, I get this error:

Failed to get data for 'SecureProtocols'

Any idea why this happens?

Thanks

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 8-Jan-2015, at 3:25 AM EST
From: Carlos Matos