public Deserialize ( byte ropBytes, int startIndex ) : int | ||
ropBytes | byte | ROPs bytes in response. |
startIndex | int | The start index of this ROP. |
리턴 | int |
public int Deserialize(byte[] ropBytes, int startIndex)
{
IntPtr responseBuffer = new IntPtr();
responseBuffer = Marshal.AllocHGlobal(Marshal.SizeOf(this));
try
{
Marshal.Copy(ropBytes, startIndex, responseBuffer, Marshal.SizeOf(this));
this = (RopSetStreamSizeResponse)Marshal.PtrToStructure(responseBuffer, typeof(RopSetStreamSizeResponse));
return Marshal.SizeOf(this);
}
finally
{
Marshal.FreeHGlobal(responseBuffer);
}
}
}