views:

3310

answers:

1

Hi Everyone,

I would like to know when do we need to place the file under

C:\Windows\System32 and C:\Windows\SysWOW64.

when I used 32 bit dll I placed it under syswow64 and when I used 64 bit dll I placed it in system32 the viseversa not working.

Please let me know the reason for that.

Thanks in Advance.

Ga

+8  A: 

I believe the intent was to rename System32, but so many applications hard-coded for that path, that it wasn't feasible to remove it.

SysWoW64 wasn't intended for the dlls of 64-bit systems, it's actually something like "Windows on Windows64", meaning the bits you need to run 32bit apps on a 64bit windows.

This article explains a bit:

"Windows x64 has a directory System32 that contains 64-bit DLLs (sic!). Thus native processes with a bitness of 64 find “their” DLLs where they expect them: in the System32 folder. A second directory, SysWOW64, contains the 32-bit DLLs. The file system redirector does the magic of hiding the real System32 directory for 32-bit processes and showing SysWOW64 under the name of System32."

Edit: If you're talking about an installer, you should really not hard-code the path to the system folder. Instead, let Windows take care of it for you based on whether or not your installer is running on the emulation layer.

Rytmis