Ejemplo n.º 1
0
        public int ReadStruct(byte[] b, int Offset)
        {
            uint method = 0x29b;

            this.TrEntry(method, new object[] { b, Offset });
            IntPtr zero   = IntPtr.Zero;
            int    length = this.GetLength();
            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.spiQueryInOut = (SPIQUERYINOUT)Marshal.PtrToStructure(zero, typeof(SPIQUERYINOUT));
                Marshal.FreeCoTaskMem(zero);
                length = this.GetVersionLength();
                result = Offset + length;
            }
            finally
            {
                base.TrExit(method, result);
            }
            return(result);
        }
Ejemplo n.º 2
0
 public MQSPIQueryInOut(int version)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { version });
     this.spiQueryInOut    = new SPIQUERYINOUT();
     this.spiQueryInOut.ID = rfpVB_ID_QUERY_INOUT;
     this.Version          = version;
 }