diff --git a/SMBLibrary/NTFileStore/Adapter/NTFileSystemAdapter.cs b/SMBLibrary/NTFileStore/Adapter/NTFileSystemAdapter.cs
index 1307379..4f9453d 100644
--- a/SMBLibrary/NTFileStore/Adapter/NTFileSystemAdapter.cs
+++ b/SMBLibrary/NTFileStore/Adapter/NTFileSystemAdapter.cs
@@ -382,6 +382,17 @@ namespace SMBLibrary
return NTStatus.STATUS_SUCCESS;
}
+ public NTStatus NotifyChange(out object ioRequest, object handle, NotifyChangeFilter completionFilter, bool watchTree, int outputBufferSize, OnNotifyChangeCompleted onNotifyChangeCompleted, object context)
+ {
+ ioRequest = null;
+ return NTStatus.STATUS_NOT_SUPPORTED;
+ }
+
+ public NTStatus Cancel(object ioRequest)
+ {
+ return NTStatus.STATUS_NOT_SUPPORTED;
+ }
+
public NTStatus DeviceIOControl(object handle, uint ctlCode, byte[] input, out byte[] output, int maxOutputLength)
{
output = null;
diff --git a/SMBLibrary/NTFileStore/INTFileStore.cs b/SMBLibrary/NTFileStore/INTFileStore.cs
index db2f339..32c4e52 100644
--- a/SMBLibrary/NTFileStore/INTFileStore.cs
+++ b/SMBLibrary/NTFileStore/INTFileStore.cs
@@ -11,6 +11,8 @@ using Utilities;
namespace SMBLibrary
{
+ public delegate void OnNotifyChangeCompleted(NTStatus status, byte[] buffer, object context);
+
///
/// A file store (a.k.a. object store) interface to allow access to a file system or a named pipe in an NT-like manner dictated by the SMB protocol.
///
@@ -34,6 +36,19 @@ namespace SMBLibrary
NTStatus GetFileSystemInformation(out FileSystemInformation result, FileSystemInformationClass informationClass);
+ ///
+ /// Monitor the contents of a directory (and its subdirectories) by using change notifications.
+ /// When something changes within the directory being watched this operation is completed.
+ ///
+ ///
+ /// STATUS_PENDING - The directory is being watched, change notification will be provided using callback method.
+ /// STATUS_NOT_SUPPORTED - The underlying object store does not support change notifications.
+ /// STATUS_INVALID_HANDLE - The handle supplied is invalid.
+ ///
+ NTStatus NotifyChange(out object ioRequest, object handle, NotifyChangeFilter completionFilter, bool watchTree, int outputBufferSize, OnNotifyChangeCompleted onNotifyChangeCompleted, object context);
+
+ NTStatus Cancel(object ioRequest);
+
NTStatus DeviceIOControl(object handle, uint ctlCode, byte[] input, out byte[] output, int maxOutputLength);
}
}
diff --git a/SMBLibrary/NTFileStore/NamedPipeStore.cs b/SMBLibrary/NTFileStore/NamedPipeStore.cs
index 11029b5..5ce118a 100644
--- a/SMBLibrary/NTFileStore/NamedPipeStore.cs
+++ b/SMBLibrary/NTFileStore/NamedPipeStore.cs
@@ -177,5 +177,16 @@ namespace SMBLibrary
result = null;
return NTStatus.STATUS_NOT_SUPPORTED;
}
+
+ public NTStatus NotifyChange(out object ioRequest, object handle, NotifyChangeFilter completionFilter, bool watchTree, int outputBufferSize, OnNotifyChangeCompleted onNotifyChangeCompleted, object context)
+ {
+ ioRequest = null;
+ return NTStatus.STATUS_NOT_SUPPORTED;
+ }
+
+ public NTStatus Cancel(object ioRequest)
+ {
+ return NTStatus.STATUS_NOT_SUPPORTED;
+ }
}
}