示例#1
0
        public PointerEx Size()
        {
            PointerEx n_size = InternalDataOffsetEnd;

            n_size = n_size.Align(ARG_ALIGN);
            foreach (var arg in Arguments)
            {
                if (!arg.IsReferenceType)
                {
                    continue;
                }
                n_size += arg.Data.Length;
                n_size  = n_size.Align(ARG_ALIGN);
            }
            return(n_size);
        }
示例#2
0
        public byte[] Build(PointerEx baseAddress)
        {
            byte[]    data  = new byte[Size()];
            PointerEx index = InternalDataOffsetEnd;

            index = index.Align(ARG_ALIGN);

            foreach (var arg in Arguments)
            {
                if (!arg.IsReferenceType)
                {
                    continue;
                }
                arg.Handle = index + baseAddress;
                arg.Data.CopyTo(data, index);
                index += arg.Data.Length;
                index  = index.Align(ARG_ALIGN);
            }

            return(data);
        }