Page 1 of 1

64 Bit harbour App : "disable" SysWOW64 ?

Posted: Mon Nov 01, 2021 10:31 pm
by AUGE_OHR
hi,

under 64 Bit App, calling OSK.EXE or WMI WEI, i need to "disable" SysWOW64 "Redirection" when call it

Code: Select all

   oWmi := WmiService()
   IF Is64Bit()
      HMG_CallDLL( "Kernel32.dll", DLL_OSAPI, "Wow64EnableWow64FsRedirection", .F. )                                                      // disable bevor API Call
   ENDIF

   BEGIN SEQUENCE
      FOR EACH oMemory IN oWmi:ExecQuery( "SELECT * FROM Win32_WinSAT" )
         IF VAL( VAR2CHAR( oMemory:CPUScore ) ) = 0
            EXECUTE FILE "winsat formal" WAIT
         ENDIF
         EXIT
      NEXT

      FOR EACH oMemory IN oWmi:ExecQuery( "SELECT * FROM Win32_WinSAT" )
         cInfo += "Processor            : " + VAR2CHAR( oMemory:CPUScore ) + CRLF
         cInfo += "Memory ( RAM )  : " + VAR2CHAR( oMemory:MemoryScore ) + CRLF
         cInfo += "Graphics              : " + VAR2CHAR( oMemory:GraphicsScore ) + CRLF
         cInfo += "Gameing graphics: " + VAR2CHAR( oMemory:D3DScore ) + CRLF
         cInfo += "Primary hard disk: " + VAR2CHAR( oMemory:DiskScore ) + CRLF
         cInfo += "            Base score: " + VAR2CHAR( oMemory:WinSPRLevel ) + CRLF
         EXIT
      NEXT
   END SEQUENCE
   ERRORBLOCK( bError )

   IF Is64Bit()
      HMG_CallDLL( "Kernel32.dll", DLL_OSAPI, "Wow64EnableWow64FsRedirection", .T. )                                                       // enable again
   ENDIF

RETURN cInfo
so my Question is : "why" and "when" do i need to "disable" SysWOW64 "Redirection" :?:

Re: 64 Bit harbour App : "disable" SysWOW64 ?

Posted: Tue Nov 02, 2021 12:16 am
by srvet_claudio