Ejemplo n.º 1
0
 public ManagedHsub(NmqiEnvironment env, int hsub, ManagedHobj hobj, MQSubscriptionDescriptor subDescriptor, LpiSD spiSD, bool spiCall) : base(env)
 {
     this.initialSubscriptionTime = DateTime.Now.Millisecond;
     this.hsub = -1;
     base.TrConstructor("%Z% %W% %I% %E% %U%", new object[] { env, hsub, hobj, subDescriptor });
     this.hsub                  = hsub;
     this.remoteHobj            = hobj;
     this.subDescriptor         = env.NewMQSD();
     this.subDescriptor.Version = subDescriptor.Version;
     if (subDescriptor.AlternateUserId != null)
     {
         this.subDescriptor.AlternateUserId = subDescriptor.AlternateUserId;
     }
     this.subDescriptor.AlternateSecurityId = subDescriptor.AlternateSecurityId;
     if (subDescriptor.ObjectName != null)
     {
         this.subDescriptor.ObjectName = subDescriptor.ObjectName;
     }
     if (subDescriptor.ObjectString.VSString != null)
     {
         this.subDescriptor.ObjectString.VSString  = subDescriptor.ObjectString.VSString;
         this.subDescriptor.ObjectString.VSBufSize = subDescriptor.ObjectString.VSBufSize;
         this.subDescriptor.ObjectString.VSLength  = subDescriptor.ObjectString.VSLength;
     }
     if (subDescriptor.SubName.VSString != null)
     {
         this.subDescriptor.SubName.VSString  = subDescriptor.SubName.VSString;
         this.subDescriptor.SubName.VSBufSize = subDescriptor.SubName.VSBufSize;
     }
     if (subDescriptor.SelectionString.VSString != null)
     {
         this.subDescriptor.SelectionString.VSString  = subDescriptor.SelectionString.VSString;
         this.subDescriptor.SelectionString.VSBufSize = subDescriptor.SelectionString.VSBufSize;
     }
     if (subDescriptor.ResObjectString.VSString != null)
     {
         this.subDescriptor.ResObjectString.VSString  = subDescriptor.ResObjectString.VSString;
         this.subDescriptor.ResObjectString.VSBufSize = subDescriptor.ResObjectString.VSBufSize;
     }
     this.subDescriptor.Options   = subDescriptor.Options;
     this.subDescriptor.SubExpiry = subDescriptor.SubExpiry;
     this.subDescriptor.SubLevel  = subDescriptor.SubLevel;
     if (spiSD != null)
     {
         this.spiSD = env.NewSpiSD();
         try
         {
             byte[] b = new byte[spiSD.GetRequiredBufferSize()];
             spiSD.WriteStruct(b, 0);
             this.spiSD.ReadStruct(b, 0);
         }
         catch (NmqiException)
         {
         }
     }
     this.spiCall = spiCall;
 }
Ejemplo n.º 2
0
        public LpiSD NewSpiSD()
        {
            uint method = 0x3d8;

            this.TrEntry(method);
            LpiSD result = new LpiSD();

            base.TrExit(method, result);
            return(result);
        }