private bool TryRopLogon(IntPtr pcxh)
{
// CLI_WITH_PER_MDB_FIX in the OpenFlags field
#region Logon
this.rgbIn = AdapterHelper.ComposeRgbIn(ROPCommandType.RopLogon, 0, (ulong)OpenFlags.UsePerMDBReplipMapping);
this.pcbOut = ConstValues.ValidpcbOut;
this.pcbAuxOut = ConstValues.ValidpcbAuxOut;
this.returnValue = this.oxcrpcAdapter.EcDoRpcExt2(
ref pcxh,
PulFlags.NoCompression | PulFlags.NoXorMagic,
this.rgbIn,
ref this.pcbOut,
null,
ref this.pcbAuxOut,
out this.response,
ref this.responseSOHTable);
Site.Assert.AreEqual<uint>(0, this.returnValue, "EcDoRpcExt2 should succeed and 0 is expected to be returned. The returned value is {0}.", this.returnValue);
RopLogonResponse logonResponse = (RopLogonResponse)this.response;
Site.Assert.AreEqual<uint>(0, logonResponse.ReturnValue, "RopLogon should succeed and 0 is expected to be returned. The returned value is {0}.", logonResponse.ReturnValue);
// The element whose index is 0 indicates this ROP command response handle
this.objHandle = this.responseSOHTable[0][logonResponse.OutputHandleIndex];
#endregion
return logonResponse.ReturnValue == 0;
}