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

            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.spiGetInOutHdr = (SPIGETNOUTHDR)Marshal.PtrToStructure(zero, typeof(SPIGETNOUTHDR));
                Marshal.FreeCoTaskMem(zero);
                Offset += this.GetHdrVersionLength();
                Offset  = this.md.ReadStruct(b, Offset);
                Offset  = this.gmo.ReadStruct(b, Offset);
            }
            finally
            {
                base.TrExit(method, Offset);
            }
            return(Offset);
        }
Пример #2
0
 public MQSPIGetInOut(int version)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { version });
     this.spiGetInOutHdr    = new SPIGETNOUTHDR();
     this.spiGetInOutHdr.ID = rfpVB_ID_GET_INOUT;
     this.Version           = version;
     this.md  = null;
     this.gmo = null;
 }