- GetProcessHeap ✅
- HeapAlloc ✅
- HeapFree ✅
- HeapReAlloc ✅
- HeapSize ✅
- LocalAlloc ✅
- LocalFree ✅
- GlobalAlloc ✅
- GlobalFree ✅
- GlobalLock ✅
- GlobalUnlock ✅
- GlobalSize ✅
- FindFirstFileW ✅
- FindNextFileW ✅
- FindClose ✅
- FindFirstFileExW ✅
- GetWindowsDirectoryA ✅
- GetWindowsDirectoryW ✅
- GetSystemDirectoryA ✅
- GetSystemDirectoryW ✅
- GetTempPathA ✅
- GetTempPathW ✅
- GetEnvironmentVariableA ✅ (uses Linux getenv)
- GetEnvironmentVariableW ✅
- SetEnvironmentVariableA ✅ (uses Linux setenv)
- SetEnvironmentVariableW ✅
- ExpandEnvironmentStringsA ✅
- ExpandEnvironmentStringsW ✅
- strcmp ✅
- strstr ✅
- MultiByteToWideChar ✅
- WideCharToMultiByte ✅
- lstrlenA ✅
- IsDBCSLeadByteEx ✅
- ... (various CRT functions)
- PrintDlgW ✅ (stub returns FALSE)
- ChooseColorW ✅ (stub returns FALSE)
Total Userspace-only: ~44 APIs
- CreateFileA
⚠️ (has userspace fallback) - CreateFileW
⚠️ (has userspace fallback) - ReadFile ❌ NEEDS: NtReadFile
- WriteFile ❌ NEEDS: NtWriteFile
- CloseHandle
⚠️ (partial - needs NtClose for file handles) - DeleteFileA
⚠️ - DeleteFileW
⚠️ - CopyFileW
⚠️ - GetFileSize ❌ NEEDS: LswGetFileSize
- SetFilePointer ❌ NEEDS: LswSetFilePointer
- WriteConsoleA ❌ NEEDS: LswWriteConsole
- GetStdHandle ❌ NEEDS: LswGetStdHandle
- CreateThread ❌ NEEDS: NtCreateThreadEx
- ExitThread ❌ NEEDS: NtTerminateThread
- CreateEventA ❌ NEEDS: NtCreateEvent
- SetEvent ❌ NEEDS: NtSetEvent
- WaitForSingleObject ❌ NEEDS: NtWaitForSingleObject
- VirtualAlloc ❌ NEEDS: NtAllocateVirtualMemory
- VirtualFree ❌ NEEDS: NtFreeVirtualMemory
- VirtualProtect ❌ NEEDS: NtProtectVirtualMemory
- VirtualQuery ❌ NEEDS: NtReadVirtualMemory
Total Kernel-dependent: ~20 APIs
- NtQueryDirectoryFile - For FindFirstFile/FindNextFile kernel path
- Currently using userspace opendir/readdir (works!)
- Can add kernel path later for performance
- NtQueryInformationFile - Get file info
- NtSetInformationFile - Set file info
- GetFileAttributesW uses stat() (works!)
- SetFileAttributesW uses chmod() (works!)
- LdrLoadDll - Already defined but needs implementation
- LdrGetProcedureAddress - Already defined but needs implementation
-
Immediate (works without kernel):
- Memory management APIs
- File enumeration APIs
- Path/Environment APIs
- String utilities
- All use userspace - work NOW!
-
Kernel Module Required:
- Load kernel module on dev server
- Test file I/O through kernel
- Test console I/O
- Test threading
- Test synchronization
-
Future Kernel Syscalls to Add:
- NtQueryDirectoryFile (optional - have userspace)
- NtQueryInformationFile (optional - have stat)
- NtSetInformationFile (optional - have chmod)
- Full process/thread management
- Full synchronization primitives
Good news: 44/141 APIs (31%) work purely in userspace without kernel module!
These include:
- All memory management ✅
- All file enumeration ✅
- All path/environment ✅
- String utilities ✅
Kernel module needed for:
- File I/O operations
- Console I/O
- Threading
- Synchronization
- Virtual memory
Bottom line: We can test ~31% of our APIs right now without kernel module! The rest needs kernel support.