Re: [BLACKBOX] AW: [BLACKBOX] Trouble with Windows 7 Professional 64 Bit but not with 32 Bit

From: [at]} <Koen>
Date: Thu, 11 Oct 2012 11:20:53 +0200


Hello,

Things are a bit more complicated than I stated earlier.
Different values may be stored under the same key for 32 and 64 bit programs.
To enumerate all values, you would need two passes always, not just when a ERROR_FILE_NOT_FOUND error is encountered. Here is example code <http://msdn.microsoft.com/en-us/library/windows/desktop/aa384182%28v=vs.85%29.aspx> from msdn.
A normal 32bit program would only access a 64bit key if the 32bit key does not exist.
A normal 64bit program would only access a 32bit key if the 64bit key does not exist.

Brgds,
Koen.


2012/10/10 Koen Desaeger <koen.desaeger2{([at]})nowhere.xy


        Helmut,
        
        I guess this would only be necessary if you would like to compile your program both as 32 and 64 bit from the same source.
        
        res := RegOpenKeyEx( ... sam + KEY_WOW64_64KEY ...)
        IF res = NO_ERROR THEN => Access a 64-bit (or 32) key from BB32
           (* use this sam on child keys *)
        ELSIF res = ERROR_FILE_NOT_FOUND THEN
           res := RegOpenKeyEx( ... sam + KEY_WOW64_32KEY ...)
           IF res = NO_ERROR THEN => Access a 32-bit (or 64) key from BB64
              (* use this sam on child keys *)
        
        Will we ever have a 64bit BlackBox?
        
        Brgds,
        Koen.


        2012/10/9 Helmut Zinn <feedback{([at]})nowhere.xy
        

                Dear Koen,

                 

                thank you for the quick response. Your answer solves this problem.

                 

                There is a similar problem with enumerate all keys. The website says it should be done with two passes.

                Do have a solution for it too?

                 

                Regards

                Helmut Zinn

                 

                Von: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
                Gesendet: Dienstag, 9. Oktober 2012 12:42
                An: BLACKBOX{([at]})nowhere.xy
                Betreff: Re: [BLACKBOX] Trouble with Windows 7 Professional 64 Bit but not with 32 Bit


                 

                Hello Helmut,
                
                The problem can be solved by specifying in RegOpenKeyExW that you are accessing a 64bit registry from a 32bit program.

                CONST sam = WinApi.KEY_QUERY_VALUE + BITS(100H);

                More info here <http://msdn.microsoft.com/en-us/library/windows/desktop/ms724072%28v=vs.85%29.aspx> and here <http://msdn.microsoft.com/en-us/library/windows/desktop/aa384129%28v=vs.85%29.aspx> .
                
                Best regards;
                Koen.
                

                PS I have been working on Xy lately - do you want a preview?

                2012/10/9 Helmut Zinn <feedback{([at]})nowhere.xy

                Dear BB Users,

                 

                I work with BlackBox since 15 years

                and with Windows 7 Professional 32 Bit since 4 years successfully.

                 

                3 month ago I changed to Windows 7 Professional 64 Bit and the trouble starts.

                 

                My subsystems Dos & Benchmark don’t work well any more.

                Now I isolate my first problem in a small test program (see below).

                This program works with 32 bit but not with 64 bit.

                 

                Does someone know how to solve this problem?

                 

                With best regards

                Helmut Zinn

                 

                 

                 

---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy

---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy



---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
Received on Thu Oct 11 2012 - 11:20:53 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:29:55 UTC