Ejemplo n.º 1
0
        internal int ReadStruct(NmqiEnvironment env, byte[] b, int Offset)
        {
            uint method = 0x363;

            this.TrEntry(method, new object[] { env, b, Offset });
            IntPtr zero    = IntPtr.Zero;
            int    cb      = 0;
            int    num3    = 0;
            int    version = BitConverter.ToInt32(b, Offset + 4);

            cb = GetLength(env, version);
            try
            {
                zero = Marshal.AllocCoTaskMem(cb);
                if (cb > (b.Length - Offset))
                {
                    cb = b.Length - Offset;
                }
                try
                {
                    Marshal.Copy(b, Offset, zero, cb);
                    this.lpiPutOpts = (LPIPUTOPTS)Marshal.PtrToStructure(zero, typeof(LPIPUTOPTS));
                }
                finally
                {
                    Marshal.FreeCoTaskMem(zero);
                }
                num3 = Offset + GetLength(env, version);
            }
            finally
            {
                base.TrExit(method);
            }
            return(num3);
        }
Ejemplo n.º 2
0
 public MQSPINotifyOut(NmqiEnvironment nmqiEnv, int version) : base(nmqiEnv)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { nmqiEnv, version });
     this.spiNotifyOut    = new SPINOTIFYOUT();
     this.spiNotifyOut.ID = rfpVB_ID_NOTIFY_INOUT;
     this.Version         = version;
 }
Ejemplo n.º 3
0
        internal int WriteStruct(NmqiEnvironment env, byte[] b, int Offset)
        {
            uint method = 0x362;

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

            try
            {
                zero = Marshal.AllocCoTaskMem(length);
                try
                {
                    Marshal.StructureToPtr(this.lpiPutOpts, zero, false);
                    Marshal.Copy(zero, b, Offset, length);
                }
                finally
                {
                    Marshal.FreeCoTaskMem(zero);
                }
            }
            finally
            {
                base.TrExit(method);
            }
            return(length);
        }
Ejemplo n.º 4
0
 public MQSPISubscribeInOut(NmqiEnvironment nmqiEnv, int version) : base(nmqiEnv)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { nmqiEnv, version });
     this.spiInOut        = new SPISUBSCRIBEINOUTHDR();
     this.spiInOut.ID     = rfpVB_ID_SUBSCRIBE_INOUT;
     this.spiInOut.length = this.GetHdrLength();
     this.Version         = version;
 }
Ejemplo n.º 5
0
 public MQSPISubscribeIn(NmqiEnvironment nmqiEnv, int version) : base(nmqiEnv)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { nmqiEnv, version });
     this.spiSubscribeInHdr    = new SPISUBSCRIBEINHDR();
     this.spiSubscribeInHdr.ID = rfpVB_ID_SUBSCRIBE_IN;
     this.Version = version;
     this.lpisd   = new LpiSD();
 }
Ejemplo n.º 6
0
 public MQSPISubscribeOut(NmqiEnvironment nmqiEnv, int version) : base(nmqiEnv)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { nmqiEnv, version });
     this.spiSubscribeOutHdr    = new SPISUBSCRIBEOUTHDR();
     this.spiSubscribeOutHdr.ID = rfpVB_ID_SUBSCRIBE_OUT;
     this.Version = version;
     this.lpisd   = new LpiSD();
     this.subDesc = new MQSubscriptionDescriptor();
 }
Ejemplo n.º 7
0
 public MQSPINotifyIn(NmqiEnvironment nmqiEnv, int version) : base(nmqiEnv)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { nmqiEnv, version });
     this.spiNotifyIn         = new SPINOTIFYIN();
     this.spiNotifyIn.ID      = rfpVB_ID_NOTIFY_IN;
     this.Version             = version;
     this.spiNotifyIn.options = 0;
     this.spiNotifyIn.reason  = 0;
 }
Ejemplo n.º 8
0
 public MQSPIOpenIn(NmqiEnvironment nmqiEnv, int version) : base(nmqiEnv)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { nmqiEnv, version });
     this.spiOpenInHdr    = new SPIOPENINHDR();
     this.spiOpenInHdr.ID = rfpVB_ID_OPEN_IN;
     this.Version         = version;
     this.openOptions     = new SpiOpenOptions();
     this.mqod            = new MQObjectDescriptor();
 }
Ejemplo n.º 9
0
        public int GetRequiredBufferSize(NmqiEnvironment env, int ptrSize)
        {
            uint method = 0x361;

            this.TrEntry(method, new object[] { env, ptrSize });
            int length = GetLength(env, this.lpiPutOpts.version);

            base.TrExit(method, length);
            return(length);
        }
Ejemplo n.º 10
0
        internal MQChannelTable(NmqiEnvironment nmqiEnv) : base(nmqiEnv)
        {
            string str2;

            this.uintarray = new byte[4];
            base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { nmqiEnv });
            MQClientCfg cfg = nmqiEnv.Cfg;

            this.mqfile = cfg.GetStringValue(MQClientCfg.ENV_MQCHLLIB);
            if (this.mqfile != null)
            {
                base.TrText("MQCHLLIB=" + this.mqfile);
            }
            else
            {
                base.TrText("MQCHLLIB=null");
                this.mqfile = CommonServices.DataLib;
            }
            if ((this.mqfile.Length == 0) || (this.mqfile == "."))
            {
                this.mqfile = Environment.CurrentDirectory;
            }
            if (this.mqfile.ToLower().IndexOf("http://") != -1)
            {
                str2 = "/";
            }
            else
            {
                str2 = @"\";
            }
            if (!this.mqfile.EndsWith(str2))
            {
                this.mqfile = this.mqfile + str2;
            }
            string stringValue = cfg.GetStringValue(MQClientCfg.ENV_MQCHLTAB);

            if (stringValue != null)
            {
                base.TrText("MQCHLTAB=" + stringValue);
                this.mqfile = this.mqfile + stringValue;
            }
            else
            {
                base.TrText("MQCHLTAB=null");
                this.mqfile = this.mqfile + "AMQCLCHL.TAB";
            }
            if (this.mqfile != null)
            {
                base.TrText("MQFILE=" + this.mqfile);
            }
        }
Ejemplo n.º 11
0
        public static int GetLength(NmqiEnvironment env, int version)
        {
            switch (version)
            {
            case 1:
                return(GetLengthV1());

            case 2:
                return(GetLengthV2());

            case 3:
                return(GetLengthV3());
            }
            NmqiException exception = new NmqiException(env, -1, null, 2, 0x893, null);

            env.LastException = exception;
            throw exception;
        }
Ejemplo n.º 12
0
 internal MQTCPConnection(NmqiEnvironment nmqiEnv, MQConnectionSpecification spec, MQFAP fap, MQChannelDefinition mqcd, MQSSLConfigOptions sslConfigOptions, int options) : base(nmqiEnv, spec.MQChannelDef.Clone())
 {
     this.timeout             = 0x1d4c0;
     this.timeoutChanged      = true;
     this.maxTransmissionSize = 0x7ff6;
     this.Lock = new object();
     base.TrConstructor("%Z% %W%  %I% %E% %U%");
     this.conname = mqcd.ConnectionName;
     this.nextHeartBeatSendTime = DateTime.Now.AddSeconds((double)this.timeout);
     this.localAddr             = mqcd.LocalAddress;
     cfg                       = base.env.Cfg;
     this.mqcd                 = mqcd;
     this.sslConfigOptions     = sslConfigOptions;
     base.fap                  = fap;
     base.remoteConnectionSpec = spec;
     base.connectOptions       = options;
     base.nmqiFlags            = spec.NmqiFlags;
     base.commsBufferPool      = fap.CommsBufferPool;
 }
Ejemplo n.º 13
0
 public MQSPIOpenIn(NmqiEnvironment nmqiEnv) : this(nmqiEnv, 1)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { nmqiEnv });
 }
Ejemplo n.º 14
0
 internal MQChannelTable(NmqiEnvironment nmqiEnv, string ccdtFile) : base(nmqiEnv)
 {
     this.uintarray = new byte[4];
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { nmqiEnv, ccdtFile });
     this.mqfile = ccdtFile;
 }
Ejemplo n.º 15
0
 public MQIniFile(NmqiEnvironment nmqiEnv) : base(nmqiEnv)
 {
     this.propertyHash = new Hashtable();
     base.TrConstructor("%Z% %W% %I% %E% %U%", new object[] { nmqiEnv });
 }
Ejemplo n.º 16
0
 public MQClientCfg(NmqiEnvironment nmqiEnv) : base(nmqiEnv)
 {
     base.TrConstructor("%Z% %W% %I% %E% %U%");
 }
Ejemplo n.º 17
0
 public MQSPISubscribeInOut(NmqiEnvironment nmqiEnv) : this(nmqiEnv, 1)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { nmqiEnv });
 }