Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

64bit Windows registry read 1

Status
Not open for further replies.
There is a difference, see here:

But as far as I understand this has no impact, if you want to read keys you wrote yourself, they are not in the 64 bit registry.

If you want access to some registry key of windows or another 64 bit application.

Why don't you try? Or have you tried and if so, what happened?

In the code of faq184-4674, you should change this section:

Code:
nErrCode = RegOpenKey(nKey, cSubKey, @nKeyHandle)
        * If the error code isn't 0, then the key doesn't exist or can't be opened.
        IF (nErrCode # 0) THEN
            SET STEP ON
            RETURN ""
        ENDIF

This will suspend and start the debugger, if RegOpenKey() returns an error.

Note: MSDN says RegOpenKey is for compatibility with 16 bit apps. It might be time to migrate to usage of RegOpenKeyEx.

Even the registry.vcx of VFP in Home()+"FFC" does use RegOpenKey and not RegOPenKeyEx. I haven't loked into the FFC version of VFPX at
You might also simply use the wscript.shell object as demonstrated here:
Sorry, no time to create fully functional sample code. I also don't have a 64 bit Win7 installed. Maybe someone else will go for that.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top