示例#1
0
        internal static void read(IntPtr gcHandlePtr, out UIntPtr __retval, IntPtr ptr, UIntPtr size, UIntPtr n)
        {
            var self = (CfxReadHandler)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null || self.CallbacksDisabled)
            {
                __retval = default(UIntPtr);
                return;
            }
            var e = new CfxReadEventArgs(ptr, size, n);

            self.m_Read?.Invoke(self, e);
            e.m_isInvalid = true;
            __retval      = (UIntPtr)e.m_returnValue;
        }
示例#2
0
        internal static void read(IntPtr gcHandlePtr, out int __retval, IntPtr ptr, int size, int n)
        {
            var self = (CfxReadHandler)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null)
            {
                __retval = default(int);
                return;
            }
            var e            = new CfxReadEventArgs(ptr, size, n);
            var eventHandler = self.m_Read;

            if (eventHandler != null)
            {
                eventHandler(self, e);
            }
            e.m_isInvalid = true;
            __retval      = e.m_returnValue;
        }