internal int ReadStruct(byte[] b, int Offset) { uint method = 0x491; this.TrEntry(method, new object[] { b, Offset }); IntPtr zero = IntPtr.Zero; int length = this.GetLength(); zero = Marshal.AllocCoTaskMem(length); if (length > (b.Length - Offset)) { length = b.Length - Offset; } try { Marshal.Copy(b, Offset, zero, length); this.mqcbd = (MQBase.structMQCBD)Marshal.PtrToStructure(zero, typeof(MQBase.structMQCBD)); } finally { Marshal.FreeCoTaskMem(zero); base.TrExit(method); } return(Offset + this.GetLength()); }
public MQCBD() { base.TrConstructor("%Z% %W% %I% %E% %U%"); this.mqcbd = new MQBase.structMQCBD(); this.mqcbd.strucId = new byte[] { 0x43, 0x42, 0x44, 0x20 }; this.mqcbd.version = 1; this.mqcbd.callbackType = 1; this.mqcbd.options = 0; this.mqcbd.callbackArea = IntPtr.Zero; this.mqcbd.callbackFunction = IntPtr.Zero; this.mqConsumer = null; this.mqcbd.callbackName = new byte[0x80]; this.mqcbd.maxMsgLength = -1; this.cbdId = NmqiTools.GetCurrentTimeInMs().ToString() + this.GetHashCode(); }