public int Deserialize(byte[] ropBytes, int startIndex)
{
int index = startIndex;
this.RopId = ropBytes[index++];
this.SourceHandleIndex = ropBytes[index++];
this.ReturnValue = (uint)BitConverter.ToInt32(ropBytes, index);
index += sizeof(uint);
// Success response doesn't contain DestHandleIndex field
// 0x00000503 indicates NullDestinationObject(MS-OXCDATA section 2.4)
if (this.ReturnValue != 0x00000503)
{
this.PartialCompletion = ropBytes[index++];
}
else
{
this.DestHandleIndex = (uint)BitConverter.ToInt32(ropBytes, index);
index += sizeof(uint);
this.PartialCompletion = ropBytes[index++];
}
return index - startIndex;
}
}