本文整理汇总了C#中Microsoft.Protocols.TestTools.StackSdk.PduMarshaler.ReadBytes方法的典型用法代码示例。如果您正苦于以下问题:C# PduMarshaler.ReadBytes方法的具体用法?C# PduMarshaler.ReadBytes怎么用?C# PduMarshaler.ReadBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Protocols.TestTools.StackSdk.PduMarshaler
的用法示例。
在下文中一共展示了PduMarshaler.ReadBytes方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Decode
/// <summary>
/// Decode this PDU from the PduMarshaler.
/// </summary>
/// <param name="marshaler">This is used to decode the fields of this PDU.</param>
public override bool Decode(PduMarshaler marshaler)
{
try
{
base.Decode(marshaler);
RequestId = marshaler.ReadUInt32();
CbTsUrbResult = marshaler.ReadUInt32();
TsUrbResult = marshaler.ReadBytes((int)CbTsUrbResult);
HResult = marshaler.ReadUInt32();
OutputBufferSize = marshaler.ReadUInt32();
OutputBuffer = marshaler.ReadBytes((int)OutputBufferSize);
}
catch (Exception)
{
return false;
}
return true;
}
示例2: Decode
/// <summary>
/// Decode this PDU from the PduMarshaler.
/// </summary>
/// <param name="marshaler">This is used to encode the fields of this PDU.</param>
public override bool Decode(PduMarshaler marshaler)
{
try
{
this.Header.cbSize = marshaler.ReadUInt32();
this.Header.PacketType = (PacketTypeValues)marshaler.ReadUInt32();
this.PresentatioinId = marshaler.ReadByte();
this.Version = (RdpevorVersionValues)marshaler.ReadByte();
this.Command = (CommandValues)marshaler.ReadByte();
this.FrameRate = marshaler.ReadByte();
this.AverageBitrateKbps = marshaler.ReadUInt16();
this.Reserved = marshaler.ReadUInt16();
this.SourceWidth = marshaler.ReadUInt32();
this.SourceHeight = marshaler.ReadUInt32();
this.ScaledWidth = marshaler.ReadUInt32();
this.ScaledHeight = marshaler.ReadUInt32();
this.hnsTimestampOffset = marshaler.ReadUInt64();
this.GeometryMappingId = marshaler.ReadUInt64();
this.VideoSubtypeId = marshaler.ReadBytes(16);
this.cbExtra = marshaler.ReadUInt32();
this.pExtraData = marshaler.ReadBytes((int)this.cbExtra);
this.Reserved2 = marshaler.ReadByte();
return true;
}
catch
{
marshaler.Reset();
throw new PDUDecodeException(this.GetType(), marshaler.ReadToEnd());
}
}
示例3: Decode
/// <summary>
/// Decode this PDU from the PduMarshaler.
/// </summary>
/// <param name="marshaler">This is used to decode the fields of this PDU.</param>
public override bool Decode(PduMarshaler marshaler)
{
try
{
base.Decode(marshaler);
configurationDescriptorIsValid = marshaler.ReadByte();
padding = marshaler.ReadBytes(PADDING_SIZE);
numInterfaces = marshaler.ReadUInt32();
for (int i = 0; i < intefaces.Length; i++)
{
intefaces[i].Decode(marshaler);
}
descriptor = marshaler.ReadToEnd();
}
catch (Exception)
{
return false;
}
return true;
}
示例4: Decode
/// <summary>
/// Decode this PDU from the PduMarshaler.
/// </summary>
/// <param name="marshaler">This is used to decode the fields of this PDU.</param>
public override bool Decode(PduMarshaler marshaler)
{
try
{
if (!base.Decode(marshaler)) return false;
this.quantIdxY = marshaler.ReadByte();
this.quantIdxCb = marshaler.ReadByte();
this.quantIdxCr = marshaler.ReadByte();
this.xIdx = marshaler.ReadUInt16();
this.yIdx = marshaler.ReadUInt16();
this.flags = marshaler.ReadBool();
this.decodedLen += 8;
this.yLen = marshaler.ReadUInt16();
this.cbLen = marshaler.ReadUInt16();
this.crLen = marshaler.ReadUInt16();
this.tailLen = marshaler.ReadUInt16();
this.decodedLen += 8;
this.yData = marshaler.ReadBytes((int)this.yLen);
this.decodedLen += this.yLen;
this.cbData = marshaler.ReadBytes((int)this.cbLen);
this.decodedLen += this.cbLen;
this.crData = marshaler.ReadBytes((int)this.crLen);
this.decodedLen += this.crLen;
this.tailData = marshaler.ReadBytes((int)this.tailLen);
this.decodedLen += this.tailLen;
return true;
}
catch
{
marshaler.Reset();
throw new PDUDecodeException(this.GetType(), marshaler.ReadToEnd());
}
}
示例5: Decode
public override bool Decode(PduMarshaler marshaler)
{
try
{
this.SubHeaderLength = marshaler.ReadByte();
this.SubHeaderType = (RDP_TUNNEL_SUBHEADER_TYPE_Values)marshaler.ReadByte();
if (this.SubHeaderLength > 2)
{
this.SubHeaderData = marshaler.ReadBytes(this.SubHeaderLength - 2);
}
return true;
}
catch
{
return false;
}
}
示例6: Decode
/// <summary>
/// Decode this PDU from the PduMarshaler.
/// </summary>
/// <param name="marshaler">This is used to encode the fields of this PDU.</param>
public override bool Decode(PduMarshaler marshaler)
{
try
{
base.Decode(marshaler);
this.width = marshaler.ReadUInt32();
pduLen += 4;
this.height = marshaler.ReadUInt32();
pduLen += 4;
this.monitorCount = marshaler.ReadUInt32();
pduLen += 4;
for(int i=0; i < this.monitorCount; i++ )
{
TS_MONITOR_DEF monitorDef;
monitorDef.left = marshaler.ReadUInt32();
monitorDef.top = marshaler.ReadUInt32();
monitorDef.right = marshaler.ReadUInt32();
monitorDef.bottom = marshaler.ReadUInt32();
monitorDef.flags = (Flags_TS_MONITOR_DEF) marshaler.ReadUInt32();
monitorDefArray.Add(monitorDef);
pduLen += (uint)Marshal.SizeOf(monitorDef);
}
if (pduLen < Header.pduLength)
{
this.pad = marshaler.ReadBytes((int)(Header.pduLength - pduLen));
pduLen = Header.pduLength;
}
return true;
}
catch
{
marshaler.Reset();
throw new PDUDecodeException(this.GetType(), marshaler.ReadToEnd());
}
}
示例7: Decode
/// <summary>
/// Decode this PDU from the PduMarshaler.
/// </summary>
/// <param name="marshaler">This is used to decode the fields of this PDU.</param>
public override bool Decode(PduMarshaler marshaler)
{
try
{
this.descriptor = (DescriptorTypes)marshaler.ReadByte();
if (this.descriptor == DescriptorTypes.SINGLE)
{
this.bulkData = new RDP8_BULK_ENCODED_DATA();
this.bulkData.header = marshaler.ReadByte();
this.bulkData.data = marshaler.ReadToEnd();
}
else
{
this.segmentCount = marshaler.ReadUInt16();
this.uncompressedSize = marshaler.ReadUInt32();
if (this.segmentCount > 0)
{
this.segmentArray = new RDP_DATA_SEGMENT[this.segmentCount];
for (int i = 0; i < this.segmentCount; i++)
{
this.segmentArray[i].size = marshaler.ReadUInt32();
if (this.segmentArray[i].size > 0)
{
this.segmentArray[i].bulkData = new RDP8_BULK_ENCODED_DATA();
this.segmentArray[i].bulkData.header = marshaler.ReadByte();
this.segmentArray[i].bulkData.data = marshaler.ReadBytes((int)this.segmentArray[i].size - 1);
}
}
}
}
return true;
}
catch
{
marshaler.Reset();
throw new PDUDecodeException(this.GetType(), marshaler.ReadToEnd());
}
}