Wed, 18 Jun 1902 08:00:00 GMT
Windows Registry
Hi Folks, I am trying to read and write some values in the Windows Registry, but I just can't! Whenever I try to open the key HKEY_LOCAL_MACHINE I get an Access Violation message... But, if I open the HKEY_USERS it doesn't happen... What should I do to read a value in the following key: \HKEY_LOCAL_MACHINE\SAGN\URL the name of the key is CadConta (I have created it with RegEdit)... I've tried to use the following code but I allway got that Acess Violation Message... procedure TCadCliente.ReadRegistryValues (FileName : String); var Reg : TRegistry; URL_CadConta : String; begin Reg.Create; Reg.OpenKey('HKEY_USERS/SAGN/URL',True) URL_CadConta := Reg.ReadString('CadConta'); Reg.CloseKey; Reg.Free; end; What should I do about that??????? []s Rafael Guimaraes
|