Example of how to use direct syscalls in a Windows environment. The example demonstrates opening and closing a file using the NtOpenFile and NtClose syscalls defined in assembly and called from C.
The project consists of the following components:
- Assembly Code (direct_syscalls.asm): Defines the syscall procedures for NtOpenFile and NtClose.
- Header File (syscalls.h): Declares the external syscall numbers and function prototypes.
- C Code (DirectSyscall.cpp): Implements the main logic to get syscall numbers, initialize structures, and call the syscalls to open and close a file.
References:
Others Example Code Direct Syscall by VirtualAlllocEx
- Indirect Syscall Example