Beispiel #1
0
 public static void SetCommand(SysCallTarget command, DSysCallInfoHandler handler, Process proc = null)
 {
     Commands[(uint)command] = new SysCallInfo
     {
         CommandID = command,
         Handler   = handler,
         Process   = proc,
     };
 }
Beispiel #2
0
 public SystemMessage(SysCallTarget target, uint arg1 = 0, uint arg2 = 0, uint arg3 = 0, uint arg4 = 0, uint arg5 = 0, uint arg6 = 0)
 {
     Target = target;
     Arg1   = arg1;
     Arg2   = arg2;
     Arg3   = arg3;
     Arg4   = arg4;
     Arg5   = arg5;
     Arg6   = arg6;
 }
Beispiel #3
0
        public static void SetCommand(SysCallTarget command, DSysCallInfoHandler handler, Process proc = null)
        {
            var debug = false;

            if (command == SysCallTarget.Tmp_DisplayServer_CreateWindow)
            {
                debug = true;
            }

            if (proc != null)
            {
                KernelMessage.WriteLine("Register Command {0} for Process {1}", (uint)command, (uint)proc.ProcessID);
            }

            Commands[(uint)command] = new SysCallHandlerInfo
            {
                CommandID = command,
                Handler   = handler,
                Process   = proc,
                Debug     = debug,
            };
        }
Beispiel #4
0
        internal static SysCallHandlerInfo GetHandler(SysCallTarget target)
        {
            var commandNum = GetCommandNum(target);

            return(Commands[commandNum]);
        }
Beispiel #5
0
 private static uint GetCommandNum(SysCallTarget target)
 {
     return((uint)target & CommandMask);
 }
Beispiel #6
0
 public static void SetCommandProcess(SysCallTarget command, Process proc)
 {
     Commands[(uint)command].Process = proc;
 }
Beispiel #7
0
 public static unsafe uint Send(SysCallTarget target, uint arg1 = 0, uint arg2 = 0, uint arg3 = 0, uint arg4 = 0, uint arg5 = 0, uint arg6 = 0)
 {
     return(SysCallInt(new SystemMessage(target, arg1, arg2, arg3, arg4, arg5, arg6)));
 }
Beispiel #8
0
 public static void RegisterService(SysCallTarget target)
 {
     MessageManager.Send(SysCallTarget.RegisterService, (uint)target);
 }
Beispiel #9
0
 public static uint GetProcessIDForCommand(SysCallTarget target)
 {
     return(MessageManager.Send(SysCallTarget.GetProcessIDForCommand, (uint)target));
 }