public static ExecutionID XamGetExecutionId(XboxConsole Console) { var ppExecutionId = new XDRPCArgumentInfo<uint>(0, ArgumentType.Out); var returnVal = Console.ExecuteRPC<uint>(XDRPCMode.Title, "xam.xex", 640, ppExecutionId); if (returnVal != 0x00000000) throw new COMException("Exception from HRESULT: " + string.Format("0x{0:X}", returnVal), (int)returnVal); if (ppExecutionId.Value == 0) throw new Exception("XDKUtilities.XamGetExecutionId: Invalid pointer returned."); //The above only gets the pointer in console memory to the Execution ID. We still have to grab it below. //Props to MS devs for making a really nice function to do this. using (var refr = new XDRPCReference(Console, ppExecutionId.Value, 24)) return refr.Get<ExecutionID>(); }
public static ExecutionID XamGetExecutionId(XboxConsole Console) { var ppExecutionId = new XDRPCArgumentInfo <uint>(0, ArgumentType.Out); var returnVal = Console.ExecuteRPC <uint>(XDRPCMode.Title, "xam.xex", 640, ppExecutionId); if (returnVal != 0x00000000) { throw new COMException("Exception from HRESULT: " + string.Format("0x{0:X}", returnVal), (int)returnVal); } if (ppExecutionId.Value == 0) { throw new Exception("XDKUtilities.XamGetExecutionId: Invalid pointer returned."); } //The above only gets the pointer in console memory to the Execution ID. We still have to grab it below. //Props to MS devs for making a really nice function to do this. using (var refr = new XDRPCReference(Console, ppExecutionId.Value, 24)) return(refr.Get <ExecutionID>()); }