Exemplo n.º 1
0
        public int ReadStruct(byte[] b, int Offset)
        {
            uint method = 0x414;

            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.mqdlh = (MQBase.structMQDLH)Marshal.PtrToStructure(zero, typeof(MQBase.structMQDLH));
            }
            finally
            {
                Marshal.FreeCoTaskMem(zero);
                base.TrExit(method);
            }
            return(Offset + this.GetLength());
        }
Exemplo n.º 2
0
 public MQDLH()
 {
     base.TrConstructor("%Z% %W% %I% %E% %U%");
     this.mqdlh                = new MQBase.structMQDLH();
     this.mqdlh.StrucID        = new byte[4];
     this.mqdlh.StrucID        = new byte[] { 0x44, 0x4c, 0x48, 0x20 };
     this.mqdlh.Version        = 1;
     this.mqdlh.Reason         = 0;
     this.mqdlh.DestQMgrName   = new byte[0x30];
     this.mqdlh.DestQName      = new byte[0x30];
     this.mqdlh.Encoding       = 0x222;
     this.mqdlh.CodedCharSetId = 0;
     this.mqdlh.Format         = new byte[8];
     this.mqdlh.PutApplType    = 0;
     this.mqdlh.PutApplName    = new byte[0x1c];
     this.mqdlh.PutDate        = new byte[8];
     this.mqdlh.PutTime        = new byte[8];
 }