Пример #1
0
        internal int ReadStruct(byte[] b, int Offset)
        {
            uint method = 690;

            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.spiInOutHdr = (SPIRESERVEINOUTHDR)Marshal.PtrToStructure(zero, typeof(SPIRESERVEINOUTHDR));
                Offset          += this.GetHdrVersionLength();
                Marshal.FreeCoTaskMem(zero);
            }
            finally
            {
                base.TrExit(method, Offset);
            }
            return(Offset);
        }
Пример #2
0
 public MQSPIReserveInOut(int version)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { version });
     this.spiInOutHdr        = new SPIRESERVEINOUTHDR();
     this.spiInOutHdr.ID     = rfpVB_ID_RESERVE_INOUT;
     this.spiInOutHdr.length = this.GetHdrLength();
     this.Version            = version;
 }