Page 1 of 1

LdrShutdownProcess prototype

Posted: 14 Aug 2021 16:27
by 440bx
the prototype of LdrShutdownProcess in ntldr.h and in ReactOS shows this API as returning an NTSTATUS.

Inspection of the assembly code (disassembly of ntdll) shows that LdrShutdownProcess returns nothing (void). The prototype found at ntinternals
http://undocumented.ntinternals.net/ind ... ocess.html
is correct (though, it says that it is called by kernel32 which is no longer the case. It is called by ntdll's RtlExitUserProcess)

ETA:

Exactly the same applies to LdrShutdownThread

Re: LdrShutdownProcess prototype

Posted: 15 Aug 2021 23:18
by dmex
Thanks, these have been updated with the noreturn type :thumbup:

Re: LdrShutdownProcess prototype

Posted: 17 Aug 2021 01:13
by 440bx
Good to hear that. I'm probably not using the latest .h files.