Re: win32 or native NT windows API
- From: "Julienne Walker" <happyfrosty@xxxxxxxxxxx>
- Date: 14 Jun 2006 06:49:29 -0700
Vikas Kumar wrote:
Hi
I am curious as to what do regular windows assembly program writers use
for system calls ?
Do they always use the WIN32 API or do they directly play with the
native NT Windows API (Nt* functions). ?
It depends on the needs of the application, but you'll find that most
prefer the end-user interfance of Win32 rather than the native NT API.
There's not really enough benefit to justify the headaches.
The lack/scarcity of documentation regarding the latter is a deterrent
though.
Is using the native NT APi worth all the trouble ?
Not in my experience. There are a few niceties, and occasionally you
need to drop down to it, but for the most part you can do everything
you need to do with the Win32 interface.
Has anyone used it and gained speed/efficiency ? (Assuming that your
application makes so many system calls, that using the native NT API vs
WIN32 api might make a difference)
I haven't seen any significant difference so far.
In Linux, we can use the system calls directly by using the syscall
functionality in the unistd.h header file in both 32 and 64 bit mode.
What do users do on Windows ?
Link with the appropriate end-user DLL and make standard Windows
function calls.
The reason I am asking this is that what if I want to write an
application that does not need a Microsoft runtime DLL to run, say
MSVCRT.dll or something similar.
It doesn't work like that. Even the native NT API requires you to link
with ntdll.dll. Somewhere along the line you need to access a DLL to
use the system interface. It could be through the use of a linker, or
directly in the import section of your executable, or even a few layers
down from some other library you choose to link with statically. Even
Windows interrupts are something of a wrapper around system calls.
Regards,
Vikas
.
- Follow-Ups:
- Re: win32 or native NT windows API
- From: Herbert Kleebauer
- Re: win32 or native NT windows API
- References:
- win32 or native NT windows API
- From: Vikas Kumar
- win32 or native NT windows API
- Prev by Date: win32 or native NT windows API
- Next by Date: Re: win32 or native NT windows API
- Previous by thread: win32 or native NT windows API
- Next by thread: Re: win32 or native NT windows API
- Index(es):
Relevant Pages
|