ISMBFileStore: Added MaxReadSize and MaxWriteSize properties

This commit is contained in:
Tal Aloni 2017-10-07 12:39:01 +03:00
parent 8a7d144483
commit 20cbbd0ae5
3 changed files with 47 additions and 5 deletions

View file

@ -11,5 +11,15 @@ namespace SMBLibrary.Client
public interface ISMBFileStore : INTFileStore
{
NTStatus Disconnect();
uint MaxReadSize
{
get;
}
uint MaxWriteSize
{
get;
}
}
}

View file

@ -479,6 +479,27 @@ namespace SMBLibrary.Client
return NTStatus.STATUS_INVALID_SMB;
}
private void TrySendMessage(SMB1Command request)
{
m_client.TrySendMessage(request, m_treeID);
}
public uint MaxReadSize
{
get
{
return m_client.MaxReadSize;
}
}
public uint MaxWriteSize
{
get
{
return m_client.MaxWriteSize;
}
}
private static ExtendedFileAttributes ToExtendedFileAttributes(FileAttributes fileAttributes)
{
// We only return flags that can be used with NtCreateFile
@ -493,11 +514,6 @@ namespace SMBLibrary.Client
return (extendedFileAttributes & (ExtendedFileAttributes)fileAttributes);
}
private void TrySendMessage(SMB1Command request)
{
m_client.TrySendMessage(request, m_treeID);
}
private static FileStatus ToFileStatus(CreateDisposition createDisposition)
{
switch (createDisposition)

View file

@ -287,6 +287,22 @@ namespace SMBLibrary.Client
m_client.TrySendCommand(request);
}
public uint MaxReadSize
{
get
{
return m_client.MaxReadSize;
}
}
public uint MaxWriteSize
{
get
{
return m_client.MaxWriteSize;
}
}
private static FileStatus ToFileStatus(CreateAction createAction)
{
switch (createAction)