Beispiel #1
0
 public static string InitializeMetadataString(uint *ptr)
 {
     return((string)Intrinsic.GetObjectFromAddress(ptr));
 }
        private static RuntimeTypeHandle GetTypeHandle(object obj)
        {
            var o = Intrinsic.GetObjectAddress(obj);

            return(new RuntimeTypeHandle(Intrinsic.LoadPointer(o)));
        }
Beispiel #3
0
 public static int GetLength(IntPtr array, int dimension)
 {
     return((int)Intrinsic.Load32(array, IntPtr.Size * 2));
 }
Beispiel #4
0
        public static Pointer GetObjectHashValue(object obj)
        {
            var address = Intrinsic.GetObjectAddress(obj);

            return(address - Pointer.Size - 4 - 4);
        }
Beispiel #5
0
        public static Pointer GetObjectLockAndStatus(object obj)
        {
            var address = Intrinsic.GetObjectAddress(obj);

            return(address - Pointer.Size - 4);
        }
Beispiel #6
0
        public static Pointer GetTypeDefinition(object obj)
        {
            var address = Intrinsic.GetObjectAddress(obj);

            return(address.LoadPointer(-Pointer.Size));
        }