- Sysnative папка в Windows 64-битной объяснил
- Папка SysWOW64 в 64-битной Windows
- Sysnative Folder в 64-битной Windows
- Sysnative folder in Windows 64-bit explained
- SysWOW64 Folder in Windows 64-bit
- Sysnative Folder in Windows 64-bit
- Разница между папками System32 и SysWOW64 в Windows 10
- Что такое папка System32
- Что такое папка SysWOW64
- Разница между папками System32 и SysWOW64
- WOW в SysWOW64
- System32 Folder on a 64-bit system
- 4 Answers 4
- Emulate 32-bit OS on 64-bit Windows
- 32-bit in a 64-bit world
Sysnative папка в Windows 64-битной объяснил
С выпуском 64-разрядной версии Windows 7 в обычное распределение папок в каталоге Windows были внесены небольшие изменения. В 64-разрядную версию Windows 7, Windows 8 и Windows 10 включены две новые папки. Это папки Sysnative и SysWOW64 . Это только в 64-битной Windows. Если вы используете 32-битную Windows на 64-битной машине, вы их не увидите. Также вы не увидите их при запуске 32-битной Windows на 32-битной машине.
За пределами каталога Windows есть еще одна папка, которая называется Program Files (x86) . Мы привыкли к имени папки Program Files, в которой находятся исполняемые файлы наших программ. В 64-разрядных системах 64-разрядные программы хранятся в папке Program Files, а 32-разрядные программы – в Program Files (x86). Однако Windows использует нечто вроде эмуляции для запуска 32-разрядных программ на 64-разрядной машине. И, следовательно, необходимо знать и понимать, какие системные папки в Windows (64-разрядные), чтобы вы знали, как получить нужный файл.
В отличие от 32-разрядных компьютеров, где 32-разрядные библиотеки DLL хранятся в папке System32 , 64-разрядная версия Windows хранит библиотеки DLL, связанные с 64-разрядными файлами, в папке System32. Это облегчает программирование и обеспечивает обратную совместимость. То есть, если 64-битная программа ссылается на System32 в своем коде, она автоматически получит 64-битную DLL при вызове. Это помогает разработчикам, поскольку им не нужно менять код в своих программах для Windows 64-bit.
Короче говоря, Windows переместила все 32-разрядные библиотеки DLL из папки System32 в каталоге Windows в какую-то другую папку, так что предыдущие программы не нужно перекодировать, чтобы получить нужные библиотеки DLL даже при использовании API – после обновления до 64-разрядной. Проблема возникает, когда 32-разрядное приложение пытается получить доступ к папке System32. В этом случае произойдет сбой программы, так как она не написана для обработки 64-битных DLL.
Папка SysWOW64 в 64-битной Windows
Все 32-разрядные библиотеки DLL были перемещены в новую папку SysWOW64 в 64-разрядной версии Windows 7, Windows 8 и Windows 10, поэтому, когда 32-разрядные программы вызывают 32-разрядные библиотеки DLL , они должны добраться до папки SysWOW64.
Вам может показаться, что разработчикам придется сканировать свои программы и приложения, чтобы указать функции DLL в папке SysWOW64. Но Microsoft уже позаботилась об этом. Если это 32-разрядная программа, которая вызывает C: \ Windows \ System32 , эмулятор перенаправит путь к C: \ Windows \ SysWOW64 . То есть для запуска 32-битных программ в 64-битной Windows используется эмулятор, чтобы обеспечить надлежащую обратную совместимость и избежать ошибок при вызове DLL-файлов.
Sysnative Folder в 64-битной Windows
Могут быть случаи, когда 32-битной программе или приложению может потребоваться 64-битная DLL. В этом случае вам придется использовать папку перенаправления Sysnative . Вы можете считать SysNative виртуальной папкой и псевдонимом, указывающим на папку System32. Он не существует физически в вашей системе как таковой. Поэтому, если вашей 32-разрядной программе требуется доступ к 64-разрядной библиотеке DLL, не используйте C: \ Windows \ System32 , поскольку эмулятор 32-разрядной программы перенесет ее в 32-разрядную папку DLL, которая называется SysWOW64. Вместо этого используйте C: \ Windows \ SysNative в качестве пути к программе DLL. Использование Sysnative в пути перенаправит его в папку System32 вместо папки SysWOW64.
Если вы откроете File Windows Explorer, вы не найдете папку Sysnative в C: \ Windows. Даже если вы установили параметры папки, чтобы показать скрытые и системные папки. Это связано с тем, что Windows File Explorer является 64-битной программой при работе в 64-битной Windows, а папка Sysnative видима и доступна только для 32-битных программ.
Подводя итог:
- Папки System32 содержат 64-битные файлы DLL.
- SysWOW64 содержит 32-разрядные файлы DLL, а 32-разрядные программы автоматически перенаправляются в эту папку
- Sysnative – это папка перенаправления, которая позволяет 32-разрядным программам вызывать 64-разрядные библиотеки DLL.
Дополнительное чтение: MSDN.
Хотите узнать разницу между папками System32 и SysWOW64?
Sysnative folder in Windows 64-bit explained
With the release of Windows 7 of 64-bits, there was a little change introduced in the normal allocation of folders in the Windows directory. Two new folders are included in the 64-bit edition of Windows 10, Windows 8, and Windows 70. They are Sysnative and SysWOW64 folders. This is only in 64-bit Windows. If you run a 32-bit Windows on a 64-bit machine, you won’t see them. Neither will you see them when running 32-bit Windows on a 32-bit machine.
There is another folder outside the Windows directory, and it is called Program Files (x86). We are used to the name of folder Program Files that houses the executables of our programs. In 64-bit systems, the 64-bit programs are stored in the Program Files folder while the 32-bit programs are housed in Program Files (x86). However, Windows uses something like an emulation for running 32-bit programs on a 64-bit machine. And hence, there is a need to know and understand what are the system folders under Windows (64 bit) so that you know how to reach the file you want.
Unlike the 32-bit machines, where the 32-bit DLLs are stored in the System32 folder, the 64-bit version of Windows stores DLLs related to 64-bits in the System32 folder. This is to ease the programming purposes and to provide backward compatibility. That is, if a 64-bit program refers to System32 in its code, it will get the 64-bit DLL automatically when called. This helps developers as they don’t have to change the code in their programs for Windows 64-bit.
In short, Windows moved all the 32-bit DLLs from the System32 folder in the Windows directory to some other folder so that previous programs need not be recoded to get the proper DLLs even when using APIs – after upgrading to 64-bit. The problem occurs when a 32-bit application tries to access the System32 folder. In this case, the program will crash as it is not written to handle 64-bit DLLs.
Read: What is the Panther folder?
SysWOW64 Folder in Windows 64-bit
All the 32-bit DLLs have been moved to the new SysWOW64 folder in the 64-bit version of Windows 10, Windows 8, and Windows 7, so when the 32-bit programs call upon 32-bit DLLs, they have to reach the SysWOW64 folder.
You may feel that the developers will have to scan their programs and applications to point the DLL functions to the SysWOW64 folder. But Microsoft has already taken care of it. If it is a 32-bit program that is calling C:\Windows\System32, an emulator will redirect the path to C:\Windows\SysWOW64. That is, to run 32-bit programs in Windows 64-bit, an emulator is used, so that there is proper backward compatibility and to avoid errors when calling DLL files.
Sysnative Folder in Windows 64-bit
There may be cases where a 32-bit program or application might need a 64-bit DLL. In that case, you will have to use the redirection folder Sysnative. You can consider the SysNative to be a virtual folder and an alias that points to the System32 folder. It doesn’t exist physically on your system, as such.
So if your 32-bit program needs to access a 64-bit DLL, do not use C:\Windows\System32 because the 32-bit program emulator will take it to the 32-bit DLL folder called SysWOW64. Instead, use C:\Windows\SysNative as the path to the DLL program. Using Sysnative in the path will redirect it to the System32 folder instead of the SysWOW64 folder.
If you open File Windows Explorer, you will not find the Sysnative folder in C:\Windows. Even if you set Folder Options to show hidden and system folders. This is because, Windows File Explorer is a 64-bit program when running in a 64-bit Windows, and the Sysnative folder is visible and accessible from 32-bit programs only.
To sum up:
- System32 folders contain 64-bit DLL files.
- SysWOW64 contains 32-bit DLL files, and the 32-bit programs are auto-redirected to this folder
- Sysnative is a redirection folder that allows 32-bit programs to call 64-bit DLLs.
Date: October 28, 2019 Tags: 64-bit, Folder
Разница между папками System32 и SysWOW64 в Windows 10
Если вы использовали ОС Windows в течение некоторого времени, я уверен, что вы видели эту папку System32. Однако, если вы работаете на 64-битном ПК, вы должно быть заметили, что в вашем каталоге C:\Windows есть две папки. Первая — это System32, а вторая — SysWOW64 . Разберем в чем разница между этими папками.
Что такое папка System32
В папке System32 находятся все системные файлы. Обычно это файлы DLL или библиотеки. Это наиболее распространенные программы, используемые приложениями для доступа к функциям Windows. Помимо этого, программы, которые устанавливаются на ваш компьютер, также могут хранить файлы внутри него.
При установке программы происходят две вещи. Основная программа (EXE) устанавливается в папку « Programs », а ее DLL (которая упаковывается в свои функции и т. Д.) Хранятся в папках System32. Это обычная практика.
Что такое папка SysWOW64
Вы заметили папку C:\Program Files (x86) на вашем 64-битном ПК? Здесь x86 означает 32-битный. Поэтому для установки 32-разрядных программ на 64-разрядную машину используется C:\Program Files (x86) . При этом папка C:\Program Files содержит 64-битные программы и их файлы.
Теперь вы можете подумать, что папка SysWOW64 должна содержать только 64-битные библиотеки DLL. Это не совсем так. Если вы проверите вручную, в папке System 32 много 64-битной DLL, и 32-битной DLL в папке SysWOW64.
Итак, почему 64-разрядная папка содержит все 32-разрядные библиотеки DLL? Затаривайтесь кофем, сейчас будет вынос мозга.
Разница между папками System32 и SysWOW64
Оба этих каталога являются системными папками и содержат общесистемные DLL или файлы. Тем не менее, они просто не придерживаются своего имени, благодаря жестко запрограммированному программированию.
На 64-битном компьютере хранилище 64-битных программ:
- Первичные файлы, такие как EXE в C:\Program Files.
- Общесистемные файлы, такие как DLL и т. Д. В папке C:\Windows\System32, содержат 64-битные библиотеки.
Тем не менее, 32-битные программы хранят:
- Первичные файлы в C:\Program Files (x86)
- Общесистемная папка C:\Windows\SysWOW64.
Когда 32-разрядная программа хочет установить свои 32-разрядные файлы DLL в C:\Windows\System32, она будет перенаправлена в C:\Windows\SysWOW64. Это по сути заставляет System32 хранить только 64-битные библиотеки. Microsoft не могла удалить его, потому что это сломало бы много программ.
Большинство разработчиков, которые развернули свои 32-разрядные приложения на 64-разрядной системе, все еще использует C:\Windows\System32. Это было жестко запрограммировано в их программе. Поскольку Microsoft не хотела ломать программы, они разработали это перенаправление.
Это гарантирует, что все происходит в фоновом режиме, и разработчикам не нужно много работать. Когда 32-разрядная программа запрашивает что-либо из папки System32, она автоматически перенаправляется в папку SysWOW64, в которой хранятся все 32-разрядные библиотеки DLL. Для 64-битной программы перенаправление не требуется, поскольку у них есть папки по умолчанию.
Вкратце: Windows x64 имеет папку System32, которая содержит 64-разрядные библиотеки DLL. Вторая папка SysWOW64 содержит 32-разрядные библиотеки DLL. Родные 64-битные процессы находят свои библиотеки DLL там, где они ожидают, а именно в папке System32. Для 32-битных процессов ОС перенаправляет запросы и показывает им папку SysWOW64.
То же самое было сделано и для реестра Windows -> 32-битные и 64-битные программы, разделены.
WOW в SysWOW64
Вместо того, чтобы называть его System64, Microsoft назвала эту папку SysWOW64. WOW означает Windows (32-разрядная версия) в Windows (64-разрядная версия) . 32-разрядные приложения могли работать на 64-разрядных приложениях, и именно так оно и получило свое название.
В то время как 32-разрядные системы постепенно выводятся из эксплуатации и заменяются 64-разрядными компьютерами, это займет некоторое время. Возможно, в будущем Microsoft может что-то с этим сделать. Надеемся, что в 64-битном кодировании нет жесткого кодирования.
System32 Folder on a 64-bit system
I have a cmd file that runs on 32 bit Vista system.
I notice that the code has references to the system32 driver folder.
I’m wondering whether the code could potentially run on a 64 bit Windows 7 system. So I guess my question is Does a 64 bit system contain a system32 folder?
Be very grateful for any replies.
4 Answers 4
The System32 folder in 64-bit Windows actually contains the 64-bit files, and 32-bit programs running under WOW64 would generally go looking in System32 for the 32-bit DLLs etc. that they can call — but they’ll find the 64-bit ones instead. Therefore the OS redirects all 32-bit applications’ requests for the System32 folder to the SysWOW64 folder, which contains 32-bit system files.
Windows has a technology called WoW 64 (Windows-on-Windows 64-bit) that allows 32-bit applications (even compiled ones written in C/C++, etc.) to run on 64-bit Windows.
In addition to the System32 folder, a 64-bit Windows installation has a SysWow64 folder that has 32-bit versions of the files that you’ll find in System32.
To be clear, references to System32 get redirected when running from a 32-bit process (unless the process disables this redirection, which is possible). As a result, if you have a .CMD file that references System32, it’s actually going to read from the SysWow64 directory.
System32 is the name of the folder that contains important operating system files.
Early versions of 64-bit Windows XP only ran 64-bit applications. This made sense:
- you run 16-bit applications on 16-bit Windows
- you run 32-bit applications on 32-bit Windows
- you run 64-bit applications on 64-bit Windows
And early versions of 64-bit Windows XP were 64-bit, and only supported running 64-bit applications.
And since all the folders names stay the same, you can simply recompile your application as 64-bit (and not have to change anything else — including your accidentally hard-coded paths), and it will just work.
Emulate 32-bit OS on 64-bit Windows
Very quickly it became obvious that only being able to run 64-bit applications on 64-bit Windows, would prevent some people from upgrading to 64-bit Windows. So an emulation layer was created to allow you to run 32-bit applications on a 64-bit operating system.
It was called WOW64: Windows on Windows64 :
- This emulation layer simulates the x86 architecture, virtualizing the CPU, the file system, the registry, the environment variables, the system information functions, all that stuff.
- If a 32-bit program tries to look at the system, it will see a 32-bit system.
- For example, if the program calls the GetSystemInfo function to see what processor is running, it will be told that it’s running on a 32-bit processor, with a 32-bit address space, in a world with a 32-bit sky and 32-bit birds in the 32-bit trees.
- And that’s the point of the emulation: To keep the 32-bit program happy by simulating a 32-bit execution environment.
The problem is where should these 32-bit applications store all their 32-bit files, and configure the locations of their 32-bit DLLs, and load 32-bit operating system support files?
We already know where native applications store their stuff.
This is all correct and right; if you simply recompile your 32-bit application as 64-bit: everything works. All these locations are still correct.
32-bit in a 64-bit world
But now since we’re going to bend-over backwards in order to accomdoate non-64 bit applications, we have to find someplace for them to have their old 32-bit OS files, and store their 32-bit data, and have their 32-bit programs, with 32-bit shared components:
A problem is that:
- if a 64-bit program asks for C:\Windows\System32 , it damn well better get 64-bit files
- if a 32-bit program asks for C:\Windows\System32 , it damn well better get 32-bit files
This means that if a 32-bit process ask for some of these file locations, Windows has to transparently redirect the call to the 32-bit folders and registry keys.
If a 32-bit program, that thinks it’s running on an old 32-bit operating system, asks for a 32-bit location, it needs to be given the «real» location:
If you don’t want your 32-bit application to be subject to all this emulation and thunking, then the solution is obvious:
- create a 64-bit application for a 64-bit operating system
Stop creating a 32-bit application, and then complaining when the emulation layer causes you to go through emulation. Your application is the misbehaving oddball; fix it.