Esempio n. 1
0
        protected static byte[] ReadILs(CorMethodInfo methodInfo)
        {
            byte[] byteILs;

            byteILs = new byte[methodInfo.ILCodeSize];
            MarshalEx.Read(methodInfo.ILCode, byteILs);
            return(byteILs);
        }
Esempio n. 2
0
        private static PatchInfo CreatePatchInfo(void *address, byte[] patch)
        {
            byte[] original;

            original = new byte[patch.Length];
            MarshalEx.Read(address, original);
            return(new PatchInfo {
                Address = address,
                Original = original,
                Patch = patch
            });
        }
Esempio n. 3
0
        protected static byte[] GetNextVariable(ref void *pArg)
        {
            byte *pNextArg;
            byte  elementType;

            byte[] variable;

            pNextArg    = (byte *)pArg;
            elementType = *pNextArg++;
            WalkType(ref pNextArg, elementType);
            variable = new byte[pNextArg - (byte *)pArg];
            MarshalEx.Read(pArg, variable);
            pArg = pNextArg;
            return(variable);
        }
Esempio n. 4
0
        protected static byte[] GetVariables(void *pArg, uint count)
        {
            byte *pNextArg;
            byte  elementType;

            byte[] variables;

            pNextArg = (byte *)pArg;
            for (uint i = 0; i < count; i++)
            {
                elementType = *pNextArg++;
                WalkType(ref pNextArg, elementType);
            }
            variables = new byte[pNextArg - (byte *)pArg];
            MarshalEx.Read(pArg, variables);
            return(variables);
        }