If my program primarily uses the win32 API, are my API calls being emulated in Windows XP/Vista/7?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s the Windows NT kernel underneath it all, and native NT applications use the (largely undocumented) NT API to interact with it.
csrss.exe, the “Client/Server Runtime Subsystem”, is a native NT application which provides the user-mode Win32 subsystem, andwin32k.sysprovides the kernel-mode Win32 subsystem. Win32 applications cannot run without these two loaded.smss.exe, the “Session Manager Subsystem”, is the first application to be executed during startup. As one of its tasks, it starts the Win32 subsystem.What do you consider “native”? The kernel does not understand Win32 at all — all Win32 API calls are handled by the runtime and
csrss, which eventually boil down to NT API calls. But you will never have Windows running without the Win32 subsystem.There also exist OS/2 and POSIX subsystems for Windows as well. I do not believe that they are in common use.
If you’re familiar with UNIX, here’s a rough analogy: is
syslog(3)a native API?POSIX mandates its existence. It is likely implemented by the
libcruntime library as “connect to a socket/pipe and send a message”. This cannot work unless thesyslogddaemon is running. Asyslogddaemon is started by the init scripts.It’s not a perfect analogy; many applications do not depend on
syslog(3), and it is usually possible to stop and restart thesyslogddaemon without detrimental effects on the system’s operation (much unlikecsrss.exe).