FindFirstChangeNotification function Null safety kernel32
Creates a change notification handle and sets up initial change notification filter conditions. A wait on a notification handle succeeds when a change matching the filter conditions occurs in the specified directory or subtree. The function does not report changes to the specified directory itself.
HANDLE FindFirstChangeNotificationW(
LPCWSTR lpPathName,
BOOL bWatchSubtree,
DWORD dwNotifyFilter
);
Implementation
int FindFirstChangeNotification(
Pointer<Utf16> lpPathName, int bWatchSubtree, int dwNotifyFilter) {
final _FindFirstChangeNotification = _kernel32.lookupFunction<
IntPtr Function(Pointer<Utf16> lpPathName, Int32 bWatchSubtree,
Uint32 dwNotifyFilter),
int Function(Pointer<Utf16> lpPathName, int bWatchSubtree,
int dwNotifyFilter)>('FindFirstChangeNotificationW');
return _FindFirstChangeNotification(
lpPathName, bWatchSubtree, dwNotifyFilter);
}