Treppenmeister
asked on
Registry OpenKey doesnt seem to work - Delphi 2010
I try to read the registry
This code worked with Delphi 2006 &Â Windows 7.
Printername would be in my case 'FreePDF'. The registry entry exists.
When i use it with Delphi 2010 then Openkey returns false (at least under Windows 7 - i didnt try other OS yet)
What am I missing?
var
Registry: TRegistry;
PrinterName : string ;
begin
Registry:=TRegistry.Create;
PrinterName := devMode^.dmDeviceName;
Registry.RootKey:=HKEY_LOCAL_MACHINE;
if Registry.OpenKey('System\ControlSet001\Control\Print\Printers\'+lPrinterName+'\DsDriver',False) then begin
....
end;
end;
This code worked with Delphi 2006 &Â Windows 7.
Printername would be in my case 'FreePDF'. The registry entry exists.
When i use it with Delphi 2010 then Openkey returns false (at least under Windows 7 - i didnt try other OS yet)
What am I missing?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.