Example #1
0
        internal int ReadStruct(byte[] b, int Offset)
        {
            uint method = 200;

            this.TrEntry(method, new object[] { b, Offset });
            IntPtr zero   = IntPtr.Zero;
            int    length = this.GetLength();
            int    result = 0;

            try
            {
                if (zero == IntPtr.Zero)
                {
                    zero = Marshal.AllocCoTaskMem(length);
                }
                if (length > (b.Length - Offset))
                {
                    length = b.Length - Offset;
                }
                Marshal.Copy(b, Offset, zero, length);
                this.id = (structMQID)Marshal.PtrToStructure(zero, typeof(structMQID));
                Marshal.FreeCoTaskMem(zero);
                result = Offset + length;
            }
            finally
            {
                base.TrExit(method, result);
            }
            return(result);
        }
Example #2
0
        internal MQID()
        {
            int num;

            base.TrConstructor("%Z% %W%  %I% %E% %U%");
            this.id                  = new structMQID();
            this.id.Id               = rfpID_ID;
            this.id.ChannelName      = new byte[20];
            this.id.QueueManagerName = new byte[0x30];
            this.id.HdrCompList      = new byte[2];
            for (num = 0; num < 2; num++)
            {
                this.id.HdrCompList[num] = 0xff;
            }
            this.id.MsgCompList = new byte[0x10];
            for (num = 0; num < 0x10; num++)
            {
                this.id.MsgCompList[num] = 0xff;
            }
            this.id.ProductIdentifier = new byte[12];
            this.id.QueueManagerId    = new byte[0x30];
            this.id.Pal = new ushort[10];
            this.id.R   = new byte[12];
        }