Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 05-14-2016, 11:13 AM
lexd lexd is offline
Senior Member
 
Join Date: Feb 2015
Posts: 268
Default Accessing Windows 7 registry correctly

Reading this page
https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx

Have I made the correct interpretation to Delphi?


Function RegDisableReflectionKey(hKey: HKEY): Integer; stdcall;


implementation

{$R *.dfm}

function RegDisableReflectionKey; external advapi32.dll name 'RegDisableReflectionKey';
Reply With Quote
  #2  
Old 05-14-2016, 02:49 PM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,059
Default

If you need to read & write to the registry than have a look on the below link.

http://www.swissdelphicenter.ch/en/showcode.php?id=301
__________________
Regards,
Abdulaziz Jasser
Reply With Quote
  #3  
Old 05-14-2016, 10:13 PM
lexd lexd is offline
Senior Member
 
Join Date: Feb 2015
Posts: 268
Default

any one can write and read the registry

The MSDN link is about 32 bit and 64 bit access into the registry
with a feature that started in windows 7.

I realized
function RegDisableReflectionKey; external advapi32.dll name 'RegDisableReflectionKey';
should be
function RegDisableReflectionKey; external 'advapi32.dll' name 'RegDisableReflectionKey';
Reply With Quote
  #4  
Old 05-15-2016, 04:05 AM
lexd lexd is offline
Senior Member
 
Join Date: Feb 2015
Posts: 268
Default

RegDisableReflectionKey(HKEY_LOCAL_MACHINE)

It works perfectly and allows 32bit programs access in the old registry locations that 64 bit uses in windows 7 under the root key.
Reply With Quote
Reply

Tags
c++, delphi

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 05:01 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.