First of all, good work! This looks like an excelent SDK!
I was making some tests using your Internet Explorer example using Delphi, where I wanted to change the location of the cookies.
This is in the registry under
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
in the Cookies value.
The test went OK inside the initialization area...
- Code: Select all
BoxedAppSDK_CreateVirtualRegKeyA ( HKEY_CURRENT_USER,
'Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders',
0,
nil,
REG_OPTION_NON_VOLATILE,
KEY_ALL_ACCESS,
nil,
phkResult,
0);
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
Reg.KeyExists('Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders');
if (Reg.OpenKey ('Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders', True)) then
begin
Reg.WriteInteger('aa', 1978);
Reg.WriteString('Cookies', 'D:\temp\Boxed\samples\Delphi\a');
if (Reg.ValueExists('Cookies')) then
ShowMessage ((Reg.ReadString('Cookies')))
else
ShowMessage ('Error');
end;
finally
Reg.Free;
end;
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if Reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders', False) then
showMessage( Reg.ReadString('Cookies'));
finally
Reg.CloseKey;
Reg.Free;
end;
However, in the browser window inside the application (under a button click, p.e.), the same code as before
- Code: Select all
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if Reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders', False) then
showMessage( Reg.ReadString('Cookies'));
finally
Reg.CloseKey;
Reg.Free;
end;
no longer works... What am I doing wrong?
Regards,
João
