internal int ReadStruct(byte[] b, int Offset) { uint method = 8; 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.mqsts = (MQBase.MQSTS)Marshal.PtrToStructure(zero, typeof(MQBase.MQSTS)); Marshal.FreeCoTaskMem(zero); result = Offset + this.GetVersionLength(); } finally { base.TrExit(method, result); } return(result); }
public static extern void MQSTAT(int hconn, int Type, ref MQBase.MQSTS Stat, out int pCompCode, out int pReason);