private uint RopOpenAttachment(uint handle, uint attachmentId, out RopOpenAttachmentResponse openAttachmentResponse, bool needVerify)
{
this.rawDataValue = null;
this.responseValue = null;
this.responseSOHsValue = null;
RopOpenAttachmentRequest openAttachmentRequest = new RopOpenAttachmentRequest()
{
RopId = (byte)RopId.RopOpenAttachment,
LogonId = LogonId,
InputHandleIndex = (byte)HandleIndex.FirstIndex,
OutputHandleIndex = (byte)HandleIndex.SecondIndex,
OpenAttachmentFlags = (byte)OpenAttachmentFlags.ReadWrite,
AttachmentID = attachmentId
};
this.responseSOHsValue = this.ProcessSingleRop(openAttachmentRequest, handle, ref this.responseValue, ref this.rawDataValue, RopResponseType.SuccessResponse);
openAttachmentResponse = (RopOpenAttachmentResponse)this.responseValue;
if (needVerify)
{
this.Site.Assert.AreEqual((uint)RopResponseType.SuccessResponse, openAttachmentResponse.ReturnValue, string.Format("RopOpenAttachment Failed! Error: 0x{0:X8}", openAttachmentResponse.ReturnValue));
}
return this.responseSOHsValue[0][openAttachmentResponse.OutputHandleIndex];
}