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

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

            try
            {
                zero = Marshal.AllocCoTaskMem(this.GetLength());
                if (length > (b.Length - Offset))
                {
                    length = b.Length - Offset;
                }
                Marshal.Copy(b, Offset, zero, length);
                this.spiShareCnvOut = (SPISHARECNVOUTHDR)Marshal.PtrToStructure(zero, typeof(SPISHARECNVOUTHDR));
                Marshal.FreeCoTaskMem(zero);
                length = this.GetVersionLength();
                result = Offset + length;
            }
            finally
            {
                base.TrExit(method, result);
            }
            return(result);
        }
 public MQSPIShareCnvOut(int version)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { version });
     this.spiShareCnvOut               = new SPISHARECNVOUTHDR();
     this.spiShareCnvOut.ID            = new byte[] { 0x53, 80, 0x43, 0x4f };
     this.Version                      = version;
     this.spiShareCnvOut.convPerSocket = 0;
 }