logoalt Hacker News

actionfromafartoday at 1:18 PM2 repliesview on HN

Officially, one should not use KERNEL32.dll for instance but go via crt. In practice, most interfaces are stable.


Replies

delta_p_delta_xtoday at 1:38 PM

KERNEL32.DLL (in spite of the name) provides user-mode system services for the Windows API. The CRT provides the C99 API. There are many entry points to the same thing on Windows; you can do any of `malloc`/`HeapAlloc`/`new`/`VirtualAlloc` to get a void* memory buffer. `malloc` is from the CRT; `HeapAlloc` is from KERNEL32.DLL, and `new` is from the C++ runtime.

neonz80today at 1:28 PM

kernel32 is an official API, you're probably thinking of ntdll. CRT is the C-runtime. Not everything is written in C.

show 1 reply