Is the Win32 API still native in current versions of Windows?

If my program primarily uses the win32 API, my API calls that are emulated in Windows XP / Vista / 7?

+4
source share
3 answers

Inside this kernel is the Windows NT kernel, and applications with native NT use the (mostly undocumented) NT API to interact with it.

csrss.exe , the Client / Server Runtime Subsystem, is a native NT application that provides the Win32 subsystem in user mode, and win32k.sys the Win32 subsystem in kernel mode. Win32 applications cannot work without these two downloaded ones.

smss.exe , the "Session Manager Subsystem", is the first application to run at startup. As one of his tasks, he launches the Win32 subsystem.

What do you think is "native"? The kernel does not understand Win32 at all - all Win32 API calls are handled by the runtime and csrss , which ultimately comes down to NT API calls. But you will never work under Windows without the Win32 subsystem.


There are also OS / 2 and POSIX subsystems for Windows. I do not think that they are widely used.


If you are familiar with UNIX, here is a rough analogy: syslog(3) native API?

POSIX provides for its existence. It is probably implemented by the libc time library as "connect to the socket / pipe and send a message." This may not work unless the syslogd daemon is running. The syslogd daemon is started by init scripts.

This is not a perfect analogy; many applications are not dependent on syslog(3) , and you can usually stop and restart the syslogd daemon without affecting the system (unlike csrss.exe ).

+7
source

What Jared said about naming. Not sure if this is what you were referring to, but if you are running a 32-bit process on 64-bit operating systems, there is an emulation layer (or "thunking") that allows them to run. This is true for all 64-bit versions of Windows.

+2
source

No. The Win32 API is a little unnamed. This should probably have been called the Windows API. It is not emulated if your code does not actually work in one of the emulation modes.

+1
source

All Articles