internal int ReadStruct(byte[] b, int Offset) { uint method = 0x2b5; this.TrEntry(method, new object[] { b, Offset }); IntPtr zero = IntPtr.Zero; int length = this.GetLength(); int result = 0; try { zero = Marshal.AllocCoTaskMem(length); if (length > (b.Length - Offset)) { length = b.Length - Offset; } Marshal.Copy(b, Offset, zero, length); this.spiReserveOut = (SPIRESERVEOUT)Marshal.PtrToStructure(zero, typeof(SPIRESERVEOUT)); length = this.GetVersionLength(); Marshal.FreeCoTaskMem(zero); result = Offset + length; } finally { base.TrExit(method, result); } return(result); }
public MQSPIReserveOut(int version) { base.TrConstructor("%Z% %W% %I% %E% %U%", new object[] { version }); this.spiReserveOut = new SPIRESERVEOUT(); this.spiReserveOut.ID = rfpVB_ID_RESERVE_OUT; this.Version = version; }