internal int ReadStruct(NmqiEnvironment env, byte[] b, int Offset) { uint method = 0x363; this.TrEntry(method, new object[] { env, b, Offset }); IntPtr zero = IntPtr.Zero; int cb = 0; int num3 = 0; int version = BitConverter.ToInt32(b, Offset + 4); cb = GetLength(env, version); try { zero = Marshal.AllocCoTaskMem(cb); if (cb > (b.Length - Offset)) { cb = b.Length - Offset; } try { Marshal.Copy(b, Offset, zero, cb); this.lpiPutOpts = (LPIPUTOPTS)Marshal.PtrToStructure(zero, typeof(LPIPUTOPTS)); } finally { Marshal.FreeCoTaskMem(zero); } num3 = Offset + GetLength(env, version); } finally { base.TrExit(method); } return(num3); }
public MQSPIPutOpts(int Options) { base.TrConstructor("%Z% %W% %I% %E% %U%", new object[] { Options }); this.lpiPutOpts = new LPIPUTOPTS(); this.lpiPutOpts.strucId = lpiPUTOPTS_STRUCID; this.lpiPutOpts.version = 1; this.lpiPutOpts.options = Options; this.lpiPutOpts.msgIdReservation = 0; this.lpiPutOpts.objectType = 0; this.lpiPutOpts.objectQMgrName = new byte[0x30]; this.lpiPutOpts.objectName = new byte[0x30]; this.lpiPutOpts.origQMgrName = new byte[0x30]; this.lpiPutOpts.pidQMgr = new byte[0x30]; this.lpiPutOpts.pidQName = new byte[0x30]; this.lpiPutOpts.pidCorrelId = new byte[0x18]; }