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

            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.mqGMO = (MQBase.MQGMO)Marshal.PtrToStructure(zero, typeof(MQBase.MQGMO));
                this.ClearInvalidFields(this.mqGMO.Version);
                Marshal.FreeCoTaskMem(zero);
                result = Offset + this.GetVersionLength();
            }
            finally
            {
                base.TrExit(method, result);
            }
            return(result);
        }
Exemplo n.º 2
0
 public MQGetMessageOptions(MQGetMessageOptions mqgmo)
 {
     this.mqGMO = new MQBase.MQGMO();
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { mqgmo });
     this.mqGMO.StrucId       = (byte[])mqgmo.mqGMO.StrucId.Clone();
     this.mqGMO.Version       = mqgmo.mqGMO.Version;
     this.mqGMO.Options       = mqgmo.mqGMO.Options;
     this.mqGMO.WaitInterval  = mqgmo.mqGMO.WaitInterval;
     this.mqGMO.Signal1       = mqgmo.mqGMO.Signal1;
     this.mqGMO.Signal2       = mqgmo.mqGMO.Signal2;
     this.mqGMO.ResolvedQName = new byte[0x30];
     Buffer.BlockCopy(mqgmo.mqGMO.ResolvedQName, 0, this.mqGMO.ResolvedQName, 0, mqgmo.mqGMO.ResolvedQName.Length);
     this.mqGMO.MatchOptions  = mqgmo.mqGMO.MatchOptions;
     this.mqGMO.GroupStatus   = mqgmo.mqGMO.GroupStatus;
     this.mqGMO.SegmentStatus = mqgmo.mqGMO.SegmentStatus;
     this.mqGMO.Segmentation  = mqgmo.mqGMO.Segmentation;
     this.mqGMO.Reserved1     = mqgmo.mqGMO.Reserved1;
     this.mqGMO.MsgToken      = new byte[0x10];
     Buffer.BlockCopy(mqgmo.mqGMO.MsgToken, 0, this.mqGMO.MsgToken, 0, mqgmo.mqGMO.MsgToken.Length);
     this.mqGMO.ReturnedLength = mqgmo.mqGMO.ReturnedLength;
 }
Exemplo n.º 3
0
 public static extern void zstMQGET(int hConn, int hObj, ref MQBase.MQMD md, ref MQBase.MQGMO gmo, int bufferLength, byte[] buffer, out int dataLength, ref MQBase.lpiGETOPT lpiGetOpts, out int compCode, out int reason);
Exemplo n.º 4
0
 public static extern void MQGET(int hConn, int hObj, ref MQBase.MQMD mqmd, ref MQBase.MQGMO mqgmo, int bufferLength, [Out] byte[] buffer, out int dataLength, out int compCode, out int reason);
Exemplo n.º 5
0
 public static extern void lpiSPIGet(int hConn, int hObj, ref MQBase.MQMD mqmd, ref MQBase.MQGMO mqgmo, int bufferLength, [Out] byte[] buffer, out int dataLength, ref LPIGETOPT GetData, out int compCode, out int reason);
Exemplo n.º 6
0
 public MQGetMessageOptions()
 {
     this.mqGMO = new MQBase.MQGMO();
     base.TrConstructor("%Z% %W%  %I% %E% %U%");
     this.ClearInvalidFields(0);
 }