mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-05-31 09:43:47 +02:00
ISMBFileStore: Added MaxReadSize and MaxWriteSize properties
This commit is contained in:
parent
8a7d144483
commit
20cbbd0ae5
3 changed files with 47 additions and 5 deletions
|
@ -11,5 +11,15 @@ namespace SMBLibrary.Client
|
||||||
public interface ISMBFileStore : INTFileStore
|
public interface ISMBFileStore : INTFileStore
|
||||||
{
|
{
|
||||||
NTStatus Disconnect();
|
NTStatus Disconnect();
|
||||||
|
|
||||||
|
uint MaxReadSize
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint MaxWriteSize
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -479,6 +479,27 @@ namespace SMBLibrary.Client
|
||||||
return NTStatus.STATUS_INVALID_SMB;
|
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)
|
private static ExtendedFileAttributes ToExtendedFileAttributes(FileAttributes fileAttributes)
|
||||||
{
|
{
|
||||||
// We only return flags that can be used with NtCreateFile
|
// We only return flags that can be used with NtCreateFile
|
||||||
|
@ -493,11 +514,6 @@ namespace SMBLibrary.Client
|
||||||
return (extendedFileAttributes & (ExtendedFileAttributes)fileAttributes);
|
return (extendedFileAttributes & (ExtendedFileAttributes)fileAttributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TrySendMessage(SMB1Command request)
|
|
||||||
{
|
|
||||||
m_client.TrySendMessage(request, m_treeID);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static FileStatus ToFileStatus(CreateDisposition createDisposition)
|
private static FileStatus ToFileStatus(CreateDisposition createDisposition)
|
||||||
{
|
{
|
||||||
switch (createDisposition)
|
switch (createDisposition)
|
||||||
|
|
|
@ -287,6 +287,22 @@ namespace SMBLibrary.Client
|
||||||
m_client.TrySendCommand(request);
|
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)
|
private static FileStatus ToFileStatus(CreateAction createAction)
|
||||||
{
|
{
|
||||||
switch (createAction)
|
switch (createAction)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue