123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using Utilities;
- namespace SMBLibrary.SMB1
- {
-
-
-
- public class SetInformation2Request : SMB1Command
- {
- public const int ParametersLength = 14;
-
- public ushort FID;
- public DateTime? CreationDateTime;
- public DateTime? LastAccessDateTime;
- public DateTime? LastWriteDateTime;
- public SetInformation2Request() : base()
- {
- }
- public SetInformation2Request(byte[] buffer, int offset) : base(buffer, offset, false)
- {
- FID = LittleEndianConverter.ToUInt16(this.SMBParameters, 0);
- CreationDateTime = SMB1Helper.ReadNullableSMBDateTime(this.SMBParameters, 2);
- LastAccessDateTime = SMB1Helper.ReadNullableSMBDateTime(this.SMBParameters, 6);
- LastWriteDateTime = SMB1Helper.ReadNullableSMBDateTime(this.SMBParameters, 10);
- }
- public override byte[] GetBytes(bool isUnicode)
- {
- this.SMBParameters = new byte[ParametersLength];
- LittleEndianWriter.WriteUInt16(this.SMBParameters, 0, FID);
- SMB1Helper.WriteSMBDateTime(this.SMBParameters, 2, CreationDateTime);
- SMB1Helper.WriteSMBDateTime(this.SMBParameters, 6, LastAccessDateTime);
- SMB1Helper.WriteSMBDateTime(this.SMBParameters, 10, LastWriteDateTime);
- return base.GetBytes(isUnicode);
- }
- public override CommandName CommandName
- {
- get
- {
- return CommandName.SMB_COM_SET_INFORMATION2;
- }
- }
- }
- }
|