From 22ef6ae8c616ffdb2ce980dbbcc3f9eb3f9b3ff9 Mon Sep 17 00:00:00 2001 From: Leo Zurbriggen Date: Tue, 27 Jan 2026 18:11:09 +0100 Subject: [PATCH] add windows.ReadDirectoryChangesExW --- core/sys/windows/kernel32.odin | 11 +++++++++++ core/sys/windows/types.odin | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/core/sys/windows/kernel32.odin b/core/sys/windows/kernel32.odin index 07f34bed2..0309ff16f 100644 --- a/core/sys/windows/kernel32.odin +++ b/core/sys/windows/kernel32.odin @@ -474,6 +474,17 @@ foreign kernel32 { lpOverlapped: LPOVERLAPPED, lpCompletionRoutine: LPOVERLAPPED_COMPLETION_ROUTINE, ) -> BOOL --- + ReadDirectoryChangesExW :: proc( + hDirectory: HANDLE, + lpBuffer: LPVOID, + nBufferLength: DWORD, + bWatchSubtree: BOOL, + dwNotifyFilter: DWORD, + lpBytesReturned: LPDWORD, + lpOverlapped: LPOVERLAPPED, + lpCompletionRoutine: LPOVERLAPPED_COMPLETION_ROUTINE, + ReadDirectoryNotifyInformationClass: READ_DIRECTORY_NOTIFY_INFORMATION_CLASS, + ) -> BOOL --- FindFirstChangeNotificationW :: proc( lpPathName: LPWSTR, bWatchSubtree: BOOL, diff --git a/core/sys/windows/types.odin b/core/sys/windows/types.odin index f3f581844..f9e9764e2 100644 --- a/core/sys/windows/types.odin +++ b/core/sys/windows/types.odin @@ -3176,6 +3176,13 @@ LPOVERLAPPED_COMPLETION_ROUTINE :: #type proc "system" ( lpOverlapped: LPOVERLAPPED, ) +READ_DIRECTORY_NOTIFY_INFORMATION_CLASS :: enum c_int { + ReadDirectoryNotifyInformation = 1, + ReadDirectoryNotifyExtendedInformation, + ReadDirectoryNotifyFullInformation, + ReadDirectoryNotifyMaximumInformation, +} + ADDRESS_MODE :: enum c_int { AddrMode1616, AddrMode1632,