コード例 #1
0
        public int ReadStruct(byte[] b, int Offset)
        {
            uint method = 0x503;

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

            try
            {
                if (zero == IntPtr.Zero)
                {
                    zero = Marshal.AllocCoTaskMem(length);
                }
                if (length > (b.Length - Offset))
                {
                    length = b.Length - Offset;
                }
                Marshal.Copy(b, Offset, zero, length);
                this.xa_info = (XAINFO)Marshal.PtrToStructure(zero, typeof(XAINFO));
                Marshal.FreeCoTaskMem(zero);
                result = Offset + length;
            }
            finally
            {
                base.TrExit(method, result);
            }
            return(result);
        }
コード例 #2
0
 public MQXAInfo()
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%");
     this.xa_info         = new XAINFO();
     this.xa_info.xa_info = new byte[0x100];
 }