Does 64-bit Windows use KERNEL64?
Asked Answered
A

2

27

I was looking at some libraries with dumpbin and I noticed that all the 64-bit versions were linked to KERNEL32. Is there no KERNEL64 on 64-bit Windows? If not, why?

All my operating systems are 32-bit so I can't just look. A google search brings up nothing worthwhile so I suspect that there is no KERNEL64 but I'm still curious as to why this is.

EDIT: I found this later which is pretty useful. MSDN guide to x64

Anaconda answered 1/9, 2009 at 21:29 Comment(1)
This is a far fetch but it could be related to that the Windows API is still the same. The kernel is still definitely 64-bit.Gilmagilman
M
32

It's always called kernel32.dll, even on 64-bit windows. This is for the same compatibility reasons that system32 contains 64-bit binaries, while syswow64 contains 32-bit binaries.

Mesotron answered 1/9, 2009 at 21:36 Comment(3)
What compatibility reasons?Tonsorial
@Martin Here's a great answer: #950459Mesotron
Pretty sure its to keep code like this working in 16bit, 32bit and 64 bit modes without changing code: ((BOOL (WINAPI *)(DWORD, DWORD))GetProcAddress(GetModuleHandle("kernel32"), "Beep"))(1000, 300);. Pretty sure if Microsoft was to go back in time, they'd just name it Kernel.dll, goes to show the cost of changing an interface after publication.Oldie
B
5

On the 64-bit versions of Windows one of the "kernel32.dll"s contains 64-bit code but is still called kernel32.dll. This is at least misleading

Hope the following links will give the solution for this

http://www.howzatt.demon.co.uk/articles/DebuggingInWin64.html

http://www.viva64.com/en/l/0002/

http://blogs.msdn.com/b/aaron_margosis/archive/2012/12/10/using-ntfs-junctions-to-fix-application-compatibility-issues-on-64-bit-editions-of-windows.aspx

64-bit Windows provides such an environment "out of the box" and supports 32-bit applications using the 'Windows on Windows 64' subsystem, abbreviated to WOW64, which runs in user mode and maps the 32-bit calls to the operating system kernel into an equivalent 64-bit call. This is normally almost invisible to the calling program.Windows provides a set of 64-bit DLLs in %windir%\system32 and an equivalent set of 32-bit DLLs in %windir%\syswow64. In fact the bulk of the binary images in this directory are identical to the same files in the system32 directory on a 32-bit Windows installation. (It seems to me an unfortunate naming issue that the 64-bit DLLs live in system32 and the 32-bit ones live in syswow64, but there it is)

Bi answered 6/5, 2014 at 10:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.