public override void Marshal(NdrBuffer buffer) { if (buffer == null) { throw new ArgumentNullException(nameof(buffer)); } buffer.WriteStruct(this.LogonTime); buffer.WriteStruct(this.LogoffTime); buffer.WriteStruct(this.KickOffTime); buffer.WriteStruct(this.PwdLastChangeTime); buffer.WriteStruct(this.PwdCanChangeTime); buffer.WriteStruct(this.PwdMustChangeTime); buffer.WriteStruct(this.UserName); buffer.WriteStruct(this.UserDisplayName); buffer.WriteStruct(this.LogonScript); buffer.WriteStruct(this.ProfilePath); buffer.WriteStruct(this.HomeDirectory); buffer.WriteStruct(this.HomeDrive); buffer.WriteInt16LittleEndian(this.LogonCount); buffer.WriteInt16LittleEndian(this.BadPasswordCount); buffer.WriteUInt32LittleEndian(this.UserId); buffer.WriteUInt32LittleEndian(this.GroupId); buffer.WriteInt32LittleEndian(this.GroupCount); buffer.WriteDeferredStructArray(this.GroupIds); buffer.WriteInt32LittleEndian((int)this.UserFlags); buffer.WriteMemory(this.UserSessionKey); buffer.WriteStruct(this.ServerName); buffer.WriteStruct(this.DomainName); buffer.WriteConformantStruct(this.DomainId); buffer.WriteFixedPrimitiveArray(this.Reserved1.Span); buffer.WriteInt32LittleEndian((int)this.UserAccountControl); buffer.WriteInt32LittleEndian(this.SubAuthStatus); buffer.WriteStruct(this.LastSuccessfulILogon); buffer.WriteStruct(this.LastFailedILogon); buffer.WriteInt32LittleEndian(this.FailedILogonCount); buffer.WriteInt32LittleEndian(this.Reserved3); buffer.WriteInt32LittleEndian(this.ExtraSidCount); buffer.WriteDeferredConformantStructArray(this.ExtraIds); buffer.WriteConformantStruct(this.ResourceDomainId); buffer.WriteInt32LittleEndian(this.ResourceGroupCount); buffer.WriteDeferredStructArray(this.ResourceGroupIds); }
public override void Marshal(NdrBuffer buffer) { buffer.WriteStruct(LogonTime); buffer.WriteStruct(LogoffTime); buffer.WriteStruct(KickOffTime); buffer.WriteStruct(PwdLastChangeTime); buffer.WriteStruct(PwdCanChangeTime); buffer.WriteStruct(PwdMustChangeTime); buffer.WriteStruct(UserName); buffer.WriteStruct(UserDisplayName); buffer.WriteStruct(LogonScript); buffer.WriteStruct(ProfilePath); buffer.WriteStruct(HomeDirectory); buffer.WriteStruct(HomeDrive); buffer.WriteInt16LittleEndian(LogonCount); buffer.WriteInt16LittleEndian(BadPasswordCount); buffer.WriteInt32LittleEndian(UserId); buffer.WriteInt32LittleEndian(GroupId); buffer.WriteInt32LittleEndian(GroupCount); buffer.WriteDeferredStructArray(GroupIds); buffer.WriteInt32LittleEndian((int)UserFlags); buffer.WriteMemory(UserSessionKey); buffer.WriteStruct(ServerName); buffer.WriteStruct(DomainName); buffer.WriteConformantStruct(DomainId); buffer.WriteFixedPrimitiveArray(Reserved1.Span); buffer.WriteInt32LittleEndian((int)UserAccountControl); buffer.WriteInt32LittleEndian(SubAuthStatus); buffer.WriteStruct(LastSuccessfulILogon); buffer.WriteStruct(LastFailedILogon); buffer.WriteInt32LittleEndian(FailedILogonCount); buffer.WriteInt32LittleEndian(Reserved3); buffer.WriteInt32LittleEndian(ExtraSidCount); buffer.WriteDeferredConformantStructArray(ExtraIds); buffer.WriteConformantStruct(ResourceDomainId); buffer.WriteInt32LittleEndian(ResourceGroupCount); buffer.WriteDeferredStructArray(ResourceGroupIds); }
public void Marshal(NdrBuffer buffer) { Length = (short)(Buffer.Length * sizeof(char)); MaxLength = (short)(Buffer.Length * sizeof(char)); if (IsNullTerminating) { Length -= sizeof(char); } buffer.WriteInt16LittleEndian(Length); buffer.WriteInt16LittleEndian(MaxLength); buffer.WriteDeferredConformantVaryingArray(Buffer); }
public void Marshal(NdrBuffer buffer) { buffer.WriteInt32LittleEndian(ClaimsArray.Count()); buffer.WriteDeferredStructArray(ClaimsArray); buffer.WriteInt16LittleEndian(ReservedType); buffer.WriteInt32LittleEndian(ReservedFieldSize); buffer.WriteDeferredConformantArray <byte>(ReservedField); }
public void Marshal(NdrBuffer buffer) { buffer.WriteDeferredConformantVaryingArray(Id.AsMemory()); buffer.WriteInt16LittleEndian((short)Type); buffer.WriteInt32LittleEndian(Count); buffer.WriteDeferredStructUnion(this); }
public override ReadOnlySpan <byte> Marshal() { var buffer = new NdrBuffer(); buffer.WriteInt32LittleEndian((int)Type); buffer.WriteSpan(Signature.Span); buffer.WriteInt16LittleEndian(RODCIdentifier); return(buffer.ToSpan()); }
public void Marshal(NdrBuffer buffer) { if (buffer == null) { throw new ArgumentNullException(nameof(buffer)); } this.Length = (short)(this.Buffer.Length * sizeof(char)); this.MaxLength = (short)(this.Buffer.Length * sizeof(char)); if (this.IsNullTerminating) { this.Length -= sizeof(char); } buffer.WriteInt16LittleEndian(this.Length); buffer.WriteInt16LittleEndian(this.MaxLength); buffer.WriteDeferredConformantVaryingArray(this.Buffer); }
public override ReadOnlySpan <byte> Marshal() { var buffer = new NdrBuffer(); buffer.WriteStruct(ClientId); buffer.WriteInt16LittleEndian((short)(Name.Length * sizeof(char))); if (NameLength > 0) { buffer.WriteFixedPrimitiveArray(Name.AsSpan()); } return(buffer.ToSpan()); }
public override ReadOnlySpan <byte> Marshal() { var buffer = new NdrBuffer(); var upnBytes = MemoryMarshal.Cast <char, byte>(Upn.AsSpan()); var domainBytes = MemoryMarshal.Cast <char, byte>(Domain.AsSpan()); buffer.WriteInt16LittleEndian((short)upnBytes.Length); buffer.WriteInt16LittleEndian(2 + 2 + 2 + 2 + 4 + 4); // + 4 to align on 8 boundary buffer.WriteInt16LittleEndian((short)domainBytes.Length); buffer.WriteInt16LittleEndian((short)(2 + 2 + 2 + 2 + 2 + 4 + 4 + upnBytes.Length)); buffer.WriteInt32LittleEndian((int)Flags); buffer.WriteInt32LittleEndian(0); buffer.WriteFixedPrimitiveArray(upnBytes); buffer.WriteInt16LittleEndian(0); buffer.WriteFixedPrimitiveArray(domainBytes); return(buffer.ToSpan(alignment: 8)); }
public void Marshal(NdrBuffer buffer) { if (buffer == null) { throw new ArgumentNullException(nameof(buffer)); } buffer.WriteInt32LittleEndian(this.ClaimsArray.Count()); buffer.WriteDeferredStructArray(this.ClaimsArray); buffer.WriteInt16LittleEndian(this.ReservedType); buffer.WriteInt32LittleEndian(this.ReservedFieldSize); buffer.WriteDeferredConformantArray <byte>(this.ReservedField.Span); }
public void Marshal(NdrBuffer buffer) { if (buffer == null) { throw new ArgumentNullException(nameof(buffer)); } buffer.WriteDeferredConformantVaryingArray(this.Id.AsMemory()); buffer.WriteInt16LittleEndian((short)this.Type); buffer.WriteInt32LittleEndian(this.Count); buffer.WriteDeferredStructUnion(this); }
public override ReadOnlyMemory <byte> Marshal() { using (var buffer = new NdrBuffer()) { buffer.WriteInt32LittleEndian((int)this.Type); buffer.WriteSpan(this.Signature.Span); if (this.RODCIdentifier > 0) { buffer.WriteInt16LittleEndian(this.RODCIdentifier); } return(buffer.ToMemory()); } }
public override void Marshal(NdrBuffer buffer) { var claimsSet = Compress(ClaimsSet, CompressionFormat, out int originalSize); buffer.WriteInt32LittleEndian(claimsSet.Length); buffer.WriteDeferredConformantArray(claimsSet); buffer.WriteInt32LittleEndian((int)CompressionFormat); buffer.WriteInt32LittleEndian(originalSize); buffer.WriteInt16LittleEndian(ReservedType); buffer.WriteInt32LittleEndian(ReservedFieldSize); buffer.WriteDeferredConformantArray <byte>(ReservedField); }
public override ReadOnlyMemory <byte> Marshal() { using (var buffer = new NdrBuffer()) { this.NameLength = (short)(this.Name.Length * sizeof(char)); buffer.WriteStruct(this.ClientId); buffer.WriteInt16LittleEndian(this.NameLength); if (this.NameLength > 0) { buffer.WriteFixedPrimitiveArray(this.Name.AsSpan()); } return(buffer.ToMemory()); } }
public override void Marshal(NdrBuffer buffer) { if (buffer == null) { throw new ArgumentNullException(nameof(buffer)); } var claimsSet = Compress(this.ClaimsSet, this.CompressionFormat, out int originalSize); buffer.WriteInt32LittleEndian(claimsSet.Length); buffer.WriteDeferredConformantArray(claimsSet); buffer.WriteInt32LittleEndian((int)this.CompressionFormat); buffer.WriteInt32LittleEndian(originalSize); buffer.WriteInt16LittleEndian(this.ReservedType); buffer.WriteInt32LittleEndian(this.ReservedFieldSize); buffer.WriteDeferredConformantArray <byte>(this.ReservedField.Span); }