public static QueueManagerInfo GetQueueManagerInfo(NmqiEnvironment env, NmqiMQ mq, Hconn hconn) { QueueManagerInfo info = env.NewQueueManagerInfo(); MQObjectDescriptor pObjDesc = env.NewMQOD(); pObjDesc.ObjectType = 5; int options = 0x20; Phobj pHobj = env.NewPhobj(); int pCompCode = 0; int pReason = 0; mq.MQOPEN(hconn, ref pObjDesc, options, pHobj, out pCompCode, out pReason); if (pReason == 0) { Hobj hOBJ = pHobj.HOBJ; int[] pSelectors = new int[] { 0x1f, 0x20, 2, 0x7df, 0x7f0 }; int[] pIntAttrs = new int[3]; byte[] pCharAttrs = new byte[0x60]; mq.MQINQ(hconn, hOBJ, pSelectors.Length, pSelectors, pIntAttrs.Length, pIntAttrs, pCharAttrs.Length, pCharAttrs, out pCompCode, out pReason); if (pReason == 0) { info.CommandLevel = pIntAttrs[0]; info.Platform = pIntAttrs[1]; info.Ccsid = pIntAttrs[2]; Encoding dotnetEncoding = MQCcsidTable.GetDotnetEncoding(info.Ccsid); info.Name = dotnetEncoding.GetString(pCharAttrs, 0, 0x30); info.Uid = dotnetEncoding.GetString(pCharAttrs, 0x30, 0x30); } else { NmqiException exception = new NmqiException(env, 0x253a, null, pCompCode, pReason, null); env.LastException = exception; throw exception; } mq.MQCLOSE(hconn, pHobj, 0, out pCompCode, out pReason); return(info); } NmqiException exception2 = new NmqiException(env, 0x2525, null, pCompCode, pReason, null); env.LastException = exception2; throw exception2; }