FWH32 cannot read 64bit Registry Keys
FWH32 cannot read 64bit Registry Keys
As subject.
To do so, you need to add the KEY_WOW64_64KEY flag to RegOpenKeyEx while now it only uses KEY_ALL_ACCESS in \source\winapi\regedit.c
Please see http://msdn.microsoft.com/en-us/library ... 85%29.aspx
I suggest adding a 4th optional parameter to RegOpenKey() to pass the desired additional flags when accessing the registry (so that the program CAN enable KEY_WOW64_64KEY if IsWow64() - the function I posted yesterday)
Thanks,
Davide
To do so, you need to add the KEY_WOW64_64KEY flag to RegOpenKeyEx while now it only uses KEY_ALL_ACCESS in \source\winapi\regedit.c
Please see http://msdn.microsoft.com/en-us/library ... 85%29.aspx
I suggest adding a 4th optional parameter to RegOpenKey() to pass the desired additional flags when accessing the registry (so that the program CAN enable KEY_WOW64_64KEY if IsWow64() - the function I posted yesterday)
Thanks,
Davide
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: FWH32 cannot read 64bit Registry Keys
Davide,
We will be back in our offices in just few days as we are having a (very short) holidays
As soon as we get back we will review it, thanks
We will be back in our offices in just few days as we are having a (very short) holidays
As soon as we get back we will review it, thanks
Re: FWH32 cannot read 64bit Registry Keys
Antonio,
The same problem is in reg32.prg too.
Have a nice holiday.
Davide
ok, no problem.Antonio Linares wrote:As soon as we get back we will review it, thanks
The same problem is in reg32.prg too.
Have a nice holiday.
Davide
Re: FWH32 cannot read 64bit Registry Keys
and perhaphs some top definitions are wrong in that prg:Davide wrote:The same problem is in reg32.prg too.
Code: Select all
***
*** Not sure how to handle the &'s and ~'s
***
#define KEY_READ 25 // ((STANDARD_RIGHTS_READ + KEY_QUERY_VALUE + KEY_ENUMERATE_SUB_KEYS + KEY_NOTIFY) & (~SYNCHRONIZE))
#define KEY_WRITE 6 // ((STANDARD_RIGHTS_WRITE + KEY_SET_VALUE + KEY_CREATE_SUB_KEY) & (~SYNCHRONIZE))
#define KEY_EXECUTE 25 // ((KEY_READ) & (~SYNCHRONIZE))
#define KEY_ALL_ACCESS 63 // ((STANDARD_RIGHTS_ALL + KEY_QUERY_VALUE + KEY_SET_VALUE + KEY_CREATE_SUB_KEY + KEY_ENUMERATE_SUB_KEYS + KEY_NOTIFY + KEY_CREATE_LINK) & (~SYNCHRONIZE))
Hi,
Davide
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: FWH32 cannot read 64bit Registry Keys
Davide
Try this way
Try this way
Code: Select all
#define KEY_READ nAnd( nOr( STANDARD_RIGHTS_READ, KEY_QUERY_VALUE, KEY_ENUMERATE_SUB_KEYS, KEY_NOTIFY ), nNot( SYNCHRONIZE ) )
#define KEY_WRITE nAnd( nOr( STANDARD_RIGHTS_WRITE, KEY_SET_VALUE, KEY_CREATE_SUB_KEY ), nNot( SYNCHRONIZE ) )
#define KEY_EXECUTE nAnd( KEY_READ, nNot( SYNCHRONIZE ) )
#define KEY_ALL_ACCESS nAnd( nOr( STANDARD_RIGHTS_ALL, KEY_QUERY_VALUE, KEY_SET_VALUE, KEY_CREATE_SUB_KEY, KEY_ENUMERATE_SUB_KEYS, KEY_NOTIFY, KEY_CREATE_LINK ), nNot( SYNCHRONIZE ) )
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Re: FWH32 cannot read 64bit Registry Keys
Dear Daniel,
Please find below a modified Treg32 class handling 64bit registry entries (by a 4th parameter "l64bit" in method New() that, if enabled, adds the KEY_WOW64_64KEY to the flags).
Functions in regedit.c still needs similar fixes.
Hi,
Davide
looks like it works, thanks.Daniel Garcia-Gil wrote:Try this way
Please find below a modified Treg32 class handling 64bit registry entries (by a 4th parameter "l64bit" in method New() that, if enabled, adds the KEY_WOW64_64KEY to the flags).
Functions in regedit.c still needs similar fixes.
Hi,
Davide
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: FWH32 cannot read 64bit Registry Keys
Thanks Davide
we will check yours modifies very soon...
the source code posted by you in last thread was suppressed, we can not to publish a entire class, only show partial code to modify
we will check yours modifies very soon...
the source code posted by you in last thread was suppressed, we can not to publish a entire class, only show partial code to modify
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Re: FWH32 cannot read 64bit Registry Keys
Dear Daniel,
Hi,
Davide
oh, ok! I'll keep it in mind in future.Daniel Garcia-Gil wrote:the source code posted by you in last thread was suppressed, we can not to publish a entire class, only show partial code to modify
Hi,
Davide
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: FWH32 cannot read 64bit Registry Keys
Davide...
Now, fallow your purpose with new function to detect 64bit OS and try maintain support in 32Bit applications running under 64Bit OS it are changes:
before define CLASS TReg32
and change all call to
for this
Now, fallow your purpose with new function to detect 64bit OS and try maintain support in 32Bit applications running under 64Bit OS it are changes:
before define CLASS TReg32
Code: Select all
#ifndef _WIN64
#define KEY_WOW64_64KEY If( IsWin64(), 256, 0 )
#else
#define KEY_WOW64_64KEY 0
#endif /*_WIN64*/
Code: Select all
RegOpenKeyEx( nKey, cRegKey, KEY_ALL_ACCESS, @nHandle )
Code: Select all
RegOpenKeyEx( nKey, cRegKey, KEY_ALL_ACCESS + KEY_WOW64_64KEY, @nHandle )
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Re: FWH32 cannot read 64bit Registry Keys
Daniel,
in my modified class I addedd a 4th parameter in method new() because if FWH32 is running on WIN64, you MAY want to access the 32bit mirrored registry entries (like it does now), or you MAY want to access the 64bit ones (installed programs may have different values in 64/32 bit registries). Both things are possible only by adding a parameter to manage programmatically.
Hi,
Davide
in my modified class I addedd a 4th parameter in method new() because if FWH32 is running on WIN64, you MAY want to access the 32bit mirrored registry entries (like it does now), or you MAY want to access the 64bit ones (installed programs may have different values in 64/32 bit registries). Both things are possible only by adding a parameter to manage programmatically.
Hi,
Davide
Re: FWH32 cannot read 64bit Registry Keys
Please see also to this topic when code of Treg is to modified:
http://forums.fivetechsupport.com/viewt ... =3&t=19331
http://forums.fivetechsupport.com/viewt ... =3&t=19331
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: FWH32 cannot read 64bit Registry Keys
What version do you use...??Davide wrote:Daniel,
in my modified class I addedd a 4th parameter in method new() because if FWH32 is running on WIN64, you MAY want to access the 32bit mirrored registry entries (like it does now), or you MAY want to access the 64bit ones (installed programs may have different values in 64/32 bit registries). Both things are possible only by adding a parameter to manage programmatically.
Hi,
Davide
one year ago the class and function was modified
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Re: FWH32 cannot read 64bit Registry Keys
Daniel,
As you can see at http://msdn.microsoft.com/en-us/library ... 85%29.aspx By default, a 32-bit application running on WOW64 accesses the 32-bit registry view and a 64-bit application accesses the 64-bit registry view.
The problem is that, for example the HKLM/Software tree is DIFFERENT on the 2 registries, and actually FWH32 can read just the 32bit one (a 64bit-only program installed on Win64 cannot be found in the 32bit registry tree, even though the FWH32 program could shellexecute it without problems). That's why I modified Treg32 to read EVEN the 64bit registry (if you specifically want to do it in the New() clause)
Hi,
Davide
P.S.: The same additional parameter is needed even in the registry functions included in \source\winapi\regedit.c
I'm still on FWH905 but, unless you've already provided that optional flag, the need is independent by the programming language/version.Daniel Garcia-Gil wrote:What version do you use...??
one year ago the class and function was modified
As you can see at http://msdn.microsoft.com/en-us/library ... 85%29.aspx By default, a 32-bit application running on WOW64 accesses the 32-bit registry view and a 64-bit application accesses the 64-bit registry view.
The problem is that, for example the HKLM/Software tree is DIFFERENT on the 2 registries, and actually FWH32 can read just the 32bit one (a 64bit-only program installed on Win64 cannot be found in the 32bit registry tree, even though the FWH32 program could shellexecute it without problems). That's why I modified Treg32 to read EVEN the 64bit registry (if you specifically want to do it in the New() clause)
Hi,
Davide
P.S.: The same additional parameter is needed even in the registry functions included in \source\winapi\regedit.c