View Single Post
Old 26th June 2018, 08:40   #6292  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
And this code works when you compile it as 32 bit application? Interesting. But also quite complex, I doubt many "leisure time programmers" will know all the involved system functions. It may not even be necessary.

I mean ... in general, most applications only need access to the system DLL's in the directory matching their own bitness. If you have a 32 bit application, simply use "system32" and trust in Windows mapping it to SysWoW64 if it is a 64 bit Windows. The application may not even need to know that the mapping happened at all. It is not interested in DLL's of the opposite bitness, anyway.

For MeGUI specifically, the main reason to report the path is to tell apart "the system directory" from "the application directory". When MeGUI x86, as a 32 bit process, tries to copy from "the system directory", Windows will ensure that "the 32 bit system directory" will be accessed (no choice in a 32 bit Windows, and mapped SysWoW64 in a 64 bit Windows). The reported directory may be not "physically" correct from the scope of a 64 bit system, but virtually correct from the scope of a 32 bit application running in a "Windows on Windows64" subsystem. Scope matters.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote