Ejemplo n.º 1
0
        private HookHandle AddInternal(InterruptHookCallback callback, ulong begin, ulong end, object userToken)
        {
            var wrapper = new uc_cb_hookintr((uc, into, user_data) =>
            {
                Debug.Assert(uc == Emulator.Handle);
                callback(Emulator, into, userToken);
            });

            return(Add(UnicornHookType.Interrupts, wrapper, begin, end));
        }
Ejemplo n.º 2
0
        private HookHandle AddInternal(InterruptHookCallback callback, ulong begin, ulong end, object userToken)
        {
            var wrapper = new uc_cb_hookintr((uc, into, user_data) =>
            {
                Debug.Assert(uc == Emulator.Bindings.UCHandle);
                callback(Emulator, into, userToken);
            });

            var ptr = Marshal.GetFunctionPointerForDelegate(wrapper);

            return(Add(Bindings.HookType.Interrupts, ptr, begin, end));
        }