public int ReadStruct(byte[] b, int Offset)
        {
            uint method = 0x439;

            this.TrEntry(method, new object[] { b, Offset });
            IntPtr zero      = IntPtr.Zero;
            int    hdrLength = this.GetHdrLength();

            try
            {
                zero = Marshal.AllocCoTaskMem(this.GetLength());
                if (hdrLength > (b.Length - Offset))
                {
                    hdrLength = b.Length - Offset;
                }
                Marshal.Copy(b, Offset, zero, hdrLength);
                this.spiSubscribeOutHdr = (SPISUBSCRIBEOUTHDR)Marshal.PtrToStructure(zero, typeof(SPISUBSCRIBEOUTHDR));
                Marshal.FreeCoTaskMem(zero);
                Offset += this.GetHdrLength();
                Offset  = this.lpisd.ReadStruct(b, Offset);
                Offset  = this.subDesc.ReadStruct(b, Offset, b.Length);
            }
            finally
            {
                base.TrExit(method, Offset);
            }
            return(Offset);
        }
 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();
 }