Ejemplo n.º 1
0
        public static unsafe IntPtr GetRawAddrOfPinnedObject(IntPtr gcHandleAsIntPtr)
        {
            GCHandle gcHandle = (GCHandle)gcHandleAsIntPtr;

            Debug.Assert(gcHandle.IsPinned());

            Object target = gcHandle.Target;

            fixed(IntPtr *pTargetEEType = &target.m_pEEType)
            {
                return((IntPtr)pTargetEEType);
            }
        }