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); }
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); }