diff --git a/SMBLibrary/SMB1/Commands/QueryInformationResponse.cs b/SMBLibrary/SMB1/Commands/QueryInformationResponse.cs index e368d87..041f7c6 100644 --- a/SMBLibrary/SMB1/Commands/QueryInformationResponse.cs +++ b/SMBLibrary/SMB1/Commands/QueryInformationResponse.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Tal Aloni . All rights reserved. +/* Copyright (C) 2014-2017 Tal Aloni . All rights reserved. * * You can redistribute this program and/or modify it under the terms of * the GNU Lesser Public License as published by the Free Software Foundation, @@ -12,7 +12,7 @@ using Utilities; namespace SMBLibrary.SMB1 { /// - /// SMB_COM_QUERY_INFORMATION Request. + /// SMB_COM_QUERY_INFORMATION Response. /// This command is deprecated. /// This command is used by Windows NT4 SP6. /// @@ -21,7 +21,7 @@ namespace SMBLibrary.SMB1 public const int ParameterLength = 20; // Parameters: public SMBFileAttributes FileAttributes; - public DateTime LastWriteTime; + public DateTime? LastWriteTime; public uint FileSize; public byte[] Reserved; // 10 bytes @@ -33,7 +33,7 @@ namespace SMBLibrary.SMB1 public QueryInformationResponse(byte[] buffer, int offset) : base(buffer, offset, false) { FileAttributes = (SMBFileAttributes)LittleEndianConverter.ToUInt16(this.SMBParameters, 0); - LastWriteTime = SMB1Helper.ReadSMBDateTime(this.SMBParameters, 2); + LastWriteTime = UTimeHelper.ReadNullableUTime(this.SMBParameters, 2); FileSize = LittleEndianConverter.ToUInt32(this.SMBParameters, 6); Reserved = ByteReader.ReadBytes(this.SMBParameters, 10, 10); } @@ -42,7 +42,7 @@ namespace SMBLibrary.SMB1 { this.SMBParameters = new byte[ParameterLength]; LittleEndianWriter.WriteUInt16(this.SMBParameters, 0, (ushort)FileAttributes); - SMB1Helper.WriteSMBDateTime(this.SMBParameters, 2, LastWriteTime); + UTimeHelper.WriteUTime(this.SMBParameters, 2, LastWriteTime); LittleEndianWriter.WriteUInt32(this.SMBParameters, 6, FileSize); ByteWriter.WriteBytes(this.SMBParameters, 10, Reserved, 10);