KarachiKing555
Jan 16 2004, 10:40 PM
hi,
i cant edit manipulate registry in delphi7 !! even using REGISTRY in uses !
i get registry.dcu not found error in console !! i searched for registry.dcu and found it in \LIB folder i think ! wat should i doo to get it work ! some1 adviced me to re-install delphi i did twice still no luck !!
n any1 knows a toutrial or chart which tells u wat to use in USES headers when doing certain job ! thx
eXeco
Feb 5 2004, 02:30 PM
The registry DCU is a large one.
If you are concern with the Size of your exe you should use the Win32 Reg API.
For example here is a Delphi procedure to write a Key with that APIs :
| CODE |
procedure WriteRegString(Root :HKey; thepath, thkey, thevalue :string); var HK :HKEY; DW: Dword;
begin
RegOpenKey(Root,PChar(thepath),HK);
if HK = 0 then RegCreateKeyEx(Root,PChar(thepath),0,nil,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,nil,HK,@DW);
RegSetValueEx(HK,PChar(thekey),0, REG_SZ, Pchar(thevalue),Length(thevalue));
RegCloseKey(HK);
end;
|
You could write the same type of procedure to delete or read etc etc (and it will save you undreds of bits

).