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

            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.spiNotifyOut = (SPINOTIFYOUT)Marshal.PtrToStructure(zero, typeof(SPINOTIFYOUT));
                Marshal.FreeCoTaskMem(zero);
                length = this.GetVersionLength();
                result = Offset + length;
            }
            finally
            {
                base.TrExit(method, result);
            }
            return(result);
        }
Esempio n. 2
0
 public MQSPINotifyOut(NmqiEnvironment nmqiEnv, int version) : base(nmqiEnv)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { nmqiEnv, version });
     this.spiNotifyOut    = new SPINOTIFYOUT();
     this.spiNotifyOut.ID = rfpVB_ID_NOTIFY_INOUT;
     this.Version         = version;
 }