예제 #1
0
        public static void XNotifyQueueUI(XboxConsole Console, uint XUserIndex, XNotifyUITypes XNotifyUIType, XNotifyUIPriorities XNotifyUIPriority, string XNotifyMessage)
        {
            if (XUserIndex > 3)
            {
                throw new Exception("XDKUtilities.XNotifyQueueUI: Invalid user index specified. It must be less than or equal to 3.");
            }
            if (!Enum.IsDefined(typeof(XNotifyUITypes), XNotifyUIType))
            {
                throw new Exception("XDKUtilities.XNotifyQueueUI: Invalid notification type specified.");
            }
            if (!Enum.IsDefined(typeof(XNotifyUIPriorities), XNotifyUIPriority))
            {
                throw new Exception("XDKUtilities.XNotifyQueueUI: Invalid notification priority specified.");
            }
            var dwType          = new XDRPCArgumentInfo <uint>((uint)XNotifyUIType);
            var dwUserIndex     = new XDRPCArgumentInfo <uint>(XUserIndex);
            var dwPriority      = new XDRPCArgumentInfo <uint>((uint)XNotifyUIPriority);
            var pwszStringParam = new XDRPCStringArgumentInfo(XNotifyMessage, Encoding.BigEndianUnicode);
            var returnVal       = Console.ExecuteRPC <uint>(XDRPCMode.Title, "xam.xex", 656, dwType, dwUserIndex, dwPriority, pwszStringParam);

            if (returnVal != 0x00000000)
            {
                throw new COMException("Exception from HRESULT: " + string.Format("0x{0:X}", returnVal), (int)returnVal);
            }
        }
예제 #2
0
 public static void XNotifyQueueUI(XboxConsole Console, uint XUserIndex, XNotifyUITypes XNotifyUIType, XNotifyUIPriorities XNotifyUIPriority, string XNotifyMessage)
 {
     if (XUserIndex > 3) throw new Exception("XDKUtilities.XNotifyQueueUI: Invalid user index specified. It must be less than or equal to 3.");
     if (!Enum.IsDefined(typeof(XNotifyUITypes), XNotifyUIType)) throw new Exception("XDKUtilities.XNotifyQueueUI: Invalid notification type specified.");
     if (!Enum.IsDefined(typeof(XNotifyUIPriorities), XNotifyUIPriority)) throw new Exception("XDKUtilities.XNotifyQueueUI: Invalid notification priority specified.");
     var dwType = new XDRPCArgumentInfo<uint>((uint)XNotifyUIType);
     var dwUserIndex = new XDRPCArgumentInfo<uint>(XUserIndex);
     var dwPriority = new XDRPCArgumentInfo<uint>((uint)XNotifyUIPriority);
     var pwszStringParam = new XDRPCStringArgumentInfo(XNotifyMessage, Encoding.BigEndianUnicode);
     var returnVal = Console.ExecuteRPC<uint>(XDRPCMode.Title, "xam.xex", 656, dwType, dwUserIndex, dwPriority, pwszStringParam);
     if (returnVal != 0x00000000) throw new COMException("Exception from HRESULT: " + string.Format("0x{0:X}", returnVal), (int)returnVal);
 }