示例#1
0
        private KernelResult ClearEvent(int handle)
        {
            KernelResult result;

            KWritableEvent writableEvent = _process.HandleTable.GetObject <KWritableEvent>(handle);

            if (writableEvent == null)
            {
                KReadableEvent readableEvent = _process.HandleTable.GetObject <KReadableEvent>(handle);

                result = readableEvent?.Clear() ?? KernelResult.InvalidHandle;
            }
            else
            {
                result = writableEvent.Clear();
            }

            if (result != KernelResult.Success)
            {
                Logger.PrintWarning(LogClass.KernelSvc, "Operation failed with error: " + result + "!");
            }

            return(result);
        }
示例#2
0
        private KernelResult ClearEvent(int Handle)
        {
            KernelResult Result;

            KWritableEvent WritableEvent = Process.HandleTable.GetObject <KWritableEvent>(Handle);

            if (WritableEvent == null)
            {
                KReadableEvent ReadableEvent = Process.HandleTable.GetObject <KReadableEvent>(Handle);

                Result = ReadableEvent?.Clear() ?? KernelResult.InvalidHandle;
            }
            else
            {
                Result = WritableEvent.Clear();
            }

            if (Result != KernelResult.Success)
            {
                Logger.PrintWarning(LogClass.KernelSvc, "Operation failed with error: " + Result + "!");
            }

            return(Result);
        }
示例#3
0
        private KernelResult SignalEvent(int handle)
        {
            KWritableEvent writableEvent = _process.HandleTable.GetObject <KWritableEvent>(handle);

            KernelResult result;

            if (writableEvent != null)
            {
                writableEvent.Signal();

                result = KernelResult.Success;
            }
            else
            {
                result = KernelResult.InvalidHandle;
            }

            if (result != KernelResult.Success)
            {
                Logger.PrintWarning(LogClass.KernelSvc, "Operation failed with error: " + result + "!");
            }

            return(result);
        }
示例#4
0
        private KernelResult SignalEvent(int Handle)
        {
            KWritableEvent WritableEvent = Process.HandleTable.GetObject <KWritableEvent>(Handle);

            KernelResult Result;

            if (WritableEvent != null)
            {
                WritableEvent.Signal();

                Result = KernelResult.Success;
            }
            else
            {
                Result = KernelResult.InvalidHandle;
            }

            if (Result != KernelResult.Success)
            {
                Device.Log.PrintWarning(LogClass.KernelSvc, "Operation failed with error: " + Result + "!");
            }

            return(Result);
        }