Windows DatabaseebooksStatistical Information

LWE10375 : Can you statically link your program with ntdll.lib?


You would like to use Static linking with Ntdll.lib


Static linking with Ntdll.lib is in fact dynamic linking! This is by design.


You have used static linking for your User-Mode application. This means that your application will use native system service routines from Ntdll.dll by calling entry points in the dynamic link library. These calls convert your routines into system calls in kernel mode.

What now, is it static or dynamic? Well, even if you linked statically with ntdll.lib, there routines are just stubs for entry points in the dynamically linked ntdll.dll at run time. User-mode applications are always linked with ntdll.dll. This is by design. A User-mode application cannot call entry points in Ntoskrnl.exe and needs the ntdll functions to do this transition into kernel mode.

Please also note that kernel-mode drivers cannot call entry points in Ntdll.dll either! They have to stay in kernel mode!


The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!
Copyright © 2004-2016 Lubby (V3.0.11 Jan 2016)
Sponsored by Keskon.
Datenschutzerklaerung - Privacy statement - Privacyverklaring