|
ReXGlue SDK
|
Namespaces | |
| namespace | shim |
Concepts | |
| concept | XAMObjectClass |
Typedefs | |
| using | ObjectData |
| using | XNotificationID = u32 |
| using | X_HANDLE = u32 |
| using | X_STATUS = u32 |
| using | X_RESULT = u32 |
| using | X_HRESULT = u32 |
Enumerations | |
| enum class | ExportModule : u8 { kXboxkrnl , kXAM , kXBDM } |
| enum class | ExportType : u8 { kFunction , kVariable } |
| enum class | GuestPool : u8 { kHeap , kWorkspace , kTitle , kCount } |
| enum class | GuestProtect : u8 { kReadOnly , kReadWrite } |
| enum class | GuestHeap : u8 { kTitle , kSystem , kPhysical } |
| enum | SystemHeapFlag : u8 { kSystemHeapVirtual = 1 << 0 , kSystemHeapPhysical = 1 << 1 , kSystemHeapDefault = kSystemHeapVirtual } |
| enum class | HeapType : u8 { kGuestVirtual , kGuestXEX , kGuestPhysical } |
| enum | MemoryAllocationFlag : u8 { kMemoryAllocationReserve = 1 << 0 , kMemoryAllocationCommit = 1 << 1 , kMemoryAllocationTitle = 1 << 2 } |
| enum | MemoryProtectFlag : u8 { kMemoryProtectRead = 1 << 0 , kMemoryProtectWrite = 1 << 1 , kMemoryProtectNoCache = 1 << 2 , kMemoryProtectWriteCombine = 1 << 3 , kMemoryProtectNoAccess = 0 } |
| enum class | AccessViolationResult : u8 { kResumed , kMMIOMiss , kUnhandled } |
| enum class | SeekOrigin : u8 { kBegin = 0 , kCurrent = 1 , kEnd = 2 } |
| enum class | ModuleType : u8 { kKernel , kUser } |
| enum class | ModuleFormat : u8 { kUndefined , kXEX , kELF } |
| enum class | ObjectType : u8 { kEvent , kSemaphore , kMutant , kTimer , kFile , kNotifyListener , kIOCompletion , kSymbolicLink , kModule , kThread , kXAM } |
| enum class | ObjectBlockHeap : u8 { kSystem , kWorkspace } |
| enum class | BinarySymbolType : u8 { kFunction , kData , kImport , kUnknown } |
| enum class | TitleExitReason : u8 { kNormalExit , kHardExit , kTitleDataError , kBugCheck } |
| enum class | XContentType : u32 { kInvalid = 0x00000000 , kSavedGame = 0x00000001 , kMarketplaceContent = 0x00000002 , kPublisher = 0x00000003 , kXbox360Title = 0x00001000 , kIPTVPauseBuffer = 0x00002000 , kXNACommunity = 0x00003000 , kInstalledGame = 0x00004000 , kXboxTitle = 0x00005000 , kSocialTitle = 0x00006000 , kGamesOnDemand = 0x00007000 , kSUStoragePack = 0x00008000 , kAvatarItem = 0x00009000 , kProfile = 0x00010000 , kGamerPicture = 0x00020000 , kTheme = 0x00030000 , kCacheFile = 0x00040000 , kStorageDownload = 0x00050000 , kXboxSavedGame = 0x00060000 , kXboxDownload = 0x00070000 , kGameDemo = 0x00080000 , kVideo = 0x00090000 , kGameTitle = 0x000A0000 , kInstaller = 0x000B0000 , kGameTrailer = 0x000C0000 , kArcadeTitle = 0x000D0000 , kXNA = 0x000E0000 , kLicenseStore = 0x000F0000 , kMovie = 0x00100000 , kTV = 0x00200000 , kMusicVideo = 0x00300000 , kGameVideo = 0x00400000 , kPodcastVideo = 0x00500000 , kViralVideo = 0x00600000 , kCommunityGame = 0x02000000 } |
| enum class | XLanguage : u8 { kInvalid = 0 , kEnglish = 1 , kJapanese = 2 , kGerman = 3 , kFrench = 4 , kSpanish = 5 , kItalian = 6 , kKorean = 7 , kTChinese = 8 , kPortuguese = 9 , kSChineseDeprecated = 10 , kPolish = 11 , kRussian = 12 , kSwedish = 13 , kTurkish = 14 , kNorwegian = 15 , kDutch = 16 , kSChinese = 17 , kMaxLanguages = 18 } |
| enum | X_FILE_ATTRIBUTES : u16 { kXFileAttributeNone = 0x0000 , kXFileAttributeReadOnly = 0x0001 , kXFileAttributeHidden = 0x0002 , kXFileAttributeSystem = 0x0004 , kXFileAttributeDirectory = 0x0010 , kXFileAttributeArchive = 0x0020 , kXFileAttributeDevice = 0x0040 , kXFileAttributeNormal = 0x0080 , kXFileAttributeTemporary = 0x0100 , kXFileAttributeCompressed = 0x0800 , kXFileAttributeEncrypted = 0x4000 } |
| enum | X_FILE_INFORMATION_CLASS : u8 { XFileDirectoryInformation = 1 , XFileFullDirectoryInformation , XFileBothDirectoryInformation , XFileBasicInformation , XFileStandardInformation , XFileInternalInformation , XFileEaInformation , XFileAccessInformation , XFileNameInformation , XFileRenameInformation , XFileLinkInformation , XFileNamesInformation , XFileDispositionInformation , XFilePositionInformation , XFileFullEaInformation , XFileModeInformation , XFileAlignmentInformation , XFileAllInformation , XFileAllocationInformation , XFileEndOfFileInformation , XFileAlternateNameInformation , XFileStreamInformation , XFileMountPartitionInformation , XFileMountPartitionsInformation , XFilePipeRemoteInformation , XFileSectorInformation , XFileXctdCompressionInformation , XFileCompressionInformation , XFileObjectIdInformation , XFileCompletionInformation , XFileMoveClusterInformation , XFileIoPriorityInformation , XFileReparsePointInformation , XFileNetworkOpenInformation , XFileAttributeTagInformation , XFileTrackingInformation , XFileMaximumInformation } |
| enum | X_FILE_FS_INFORMATION_CLASS : u8 { XFileFsVolumeInformation = 1 , XFileFsSizeInformation = 3 , XFileFsDeviceInformation , XFileFsAttributeInformation = 5 } |
| enum | X_FILE_DEVICE_TYPE : u32 { kFileDeviceUnknown = 0x00000022 , kFileDeviceEHSTOR = 0x00000046 } |
| enum | X_MEM : u32 { kXMemCommit = 0x00001000 , kXMemReserve = 0x00002000 , kXMemDecommit = 0x00004000 , kXMemRelease = 0x00008000 , kXMemFree = 0x00010000 , kXMemPrivate = 0x00020000 , kXMemReset = 0x00080000 , kXMemTopDown = 0x00100000 , kXMemNoZero = 0x00800000 , kXMemLargePages = 0x20000000 , kXMemHeap = 0x40000000 , kXMem16MBPages = 0x80000000 } |
| enum | X_PAGE : u16 { kXPageNoAccess = 0x00000001 , kXPageReadOnly = 0x00000002 , kXPageReadWrite = 0x00000004 , kXPageWriteCopy = 0x00000008 , kXPageExecute = 0x00000010 , kXPageExecuteRead = 0x00000020 , kXPageExecuteReadWrite = 0x00000040 , kXPageExecuteWriteCopy , kXPageGuard = 0x00000100 , kXPageNoCache = 0x00000200 , kXPageWriteCombine } |
| enum | IRQL_FLAGS : u8 { kIRQLPassive = 0 , kIRQLAPC = 1 , kIRQLDispatch = 2 , kIRQLDPC = 3 , kIRQLAudio = 68 , kIRQLClock = 116 , kIRQLHighest = 124 } |
| enum | X_DISPATCHER_FLAGS : u8 { kDispatcherManualResetEvent = 0 , kDispatcherAutoResetEvent = 1 , kDispatcherMutant = 2 , kDispatcherQueue = 4 , kDispatcherSemaphore = 5 , kDispatcherThread = 6 , kDispatcherManualResetTimer = 8 , kDispatcherAutoResetTimer = 9 } |
| enum | X_KTHREAD_STATE_FLAGS : u8 { kKThreadStateInitialized = 0 , kKThreadStateReady = 1 , kKThreadStateRunning = 2 , kKThreadStateStandby = 3 , kKThreadStateTerminated = 4 , kKThreadStateWaiting = 5 , kKThreadStateUnknown = 6 } |
| enum | XEXSectionType { kXEXSectionCode = 1 , kXEXSectionData = 2 , kXEXSectionReadOnlyData = 3 } |
| enum | XEXImageFlags : u32 { kXEXImageManufacturingUtility = 0x00000002 , kXEXImageManufacturingSupportTools = 0x00000004 , kXEXImageXGD2MediaOnly = 0x00000008 , kXEXImageCardeaKey = 0x00000100 , kXEXImageXeikaKey = 0x00000200 , kXEXImageUserModeTitle = 0x00000400 , kXEXImageUserModeSystem = 0x00000800 , kXEXImageOrange0 = 0x00001000 , kXEXImageOrange1 = 0x00002000 , kXEXImageOrange2 = 0x00004000 , kXEXImageIPTVSignupApplication = 0x00010000 , kXEXImageIPTVTitleApplication = 0x00020000 , kXEXImageKeyVaultPrivilegesRequired = 0x04000000 , kXEXImageOnlineActivationRequired = 0x08000000 , kXEXImagePageSize4KB = 0x10000000 , kXEXImageRegionFree = 0x20000000 , kXEXImageRevocationCheckOptional = 0x40000000 , kXEXImageRevocationCheckRequired = 0x80000000 } |
| enum | XEXMediaFlags : u32 { kXEXMediaHardDisk = 0x00000001 , kXEXMediaDVDX2 = 0x00000002 , kXEXMediaDVDCD = 0x00000004 , kXEXMediaDVD5 = 0x00000008 , kXEXMediaDVD9 = 0x00000010 , kXEXMediaSystemFlash = 0x00000020 , kXEXMediaMemoryUnit = 0x00000080 , kXEXMediaUSBMassStorageDevice = 0x00000100 , kXEXMediaNetwork = 0x00000200 , kXEXMediaDirectFromMemory = 0x00000400 , kXEXMediaRAMDrive = 0x00000800 , kXEXMediaSVOD = 0x00001000 , kXEXMediaInsecurePackage = 0x01000000 , kXEXMediaSaveGamePackage = 0x02000000 , kXEXMediaLocallySignedPackage = 0x04000000 , kXEXMediaLiveSignedPackage = 0x08000000 , kXEXMediaXboxPackage = 0x10000000 } |
| enum | XEXRegionFlags : u32 { kXEXRegionNTSCU = 0x000000FF , kXEXRegionNTSCJ = 0x0000FF00 , kXEXRegionNTSCJJapan = 0x00000100 , kXEXRegionNTSCJChina = 0x00000200 , kXEXRegionPAL = 0x00FF0000 , kXEXRegionPALAUNZ = 0x00010000 , kXEXRegionOther = 0xFF000000 , kXEXRegionAll = 0xFFFFFFFF } |
| enum | XEXModuleFlags : u32 { kXEXModuleTitle = 0x00000001 , kXEXModuleExportsToTitle = 0x00000002 , kXEXModuleSystemDebugger = 0x00000004 , kXEXModuleDLLModule = 0x00000008 , kXEXModuleModulePatch = 0x00000010 , kXEXModulePatchFull = 0x00000020 , kXEXModulePatchDelta = 0x00000040 , kXEXModuleUserMode = 0x00000080 } |
| enum | XEXSystemFlags : u32 { kXEXSystemNoForcedReboot = 0x00000001 , kXEXSystemForegroundTasks = 0x00000002 , kXEXSystemNoODDMapping = 0x00000004 , kXEXSystemHandleMCEInput = 0x00000008 , kXEXSystemRestrictedHUDFeatures = 0x00000010 , kXEXSystemHandleGamepadDisconnect = 0x00000020 , kXEXSystemInsecureSockets = 0x00000040 , kXEXSystemXbox1Interoperability = 0x00000080 , kXEXSystemDashContext = 0x00000100 , kXEXSystemUsesGameVoiceChannel = 0x00000200 , kXEXSystemPAL50Incompatible = 0x00000400 , kXEXSystemInsecureUtilityDrive = 0x00000800 , kXEXSystemXAMHooks = 0x00001000 , kXEXSystemAccessPII = 0x00002000 , kXEXSystemCrossPlatformSystemLink = 0x00004000 , kXEXSystemMultiDiscSwap = 0x00008000 , kXEXSystemMultiDiscInsecureMedia = 0x00010000 , kXEXSystemAP25Media = 0x00020000 , kXEXSystemNoConfirmExit = 0x00040000 , kXEXSystemAllowBackgroundDownload = 0x00080000 , kXEXSystemCreatePersistableRAMDrive = 0x00100000 , kXEXSystemInheritPersistentRAMDrive = 0x00200000 , kXEXSystemAllowHUDVibration = 0x00400000 , kXEXSystemAccessUtilityPartitions = 0x00800000 , kXEXSystemIPTVInputSupported = 0x01000000 , kXEXSystemPreferBigButtonInput = 0x02000000 , kXEXSystemAllowExtendedSystemReservation = 0x04000000 , kXEXSystemMultiDiscCrossTitle = 0x08000000 , kXEXSystemInstallIncompatible = 0x10000000 , kXEXSystemAllowAvatarGetMetadataByXUID = 0x20000000 , kXEXSystemAllowControllerSwapping = 0x40000000 , kXEXSystemDashExtensibilityModule = 0x80000000 } |
| enum | XEXRatingESRBValue : u32 { kXEXRatingESRBEC = 0x00 , kXEXRatingESRBE = 0x02 , kXEXRatingESRBE10 = 0x04 , kXEXRatingESRBT = 0x06 , kXEXRatingESRBM = 0x08 , kXEXRatingESRBAO = 0x0E , kXEXRatingESRBUnrated = 0xFF } |
| enum | XEXRatingPEGIValue : u32 { kXEXRatingPEGI3Plus = 0 , kXEXRatingPEGI7Plus = 4 , kXEXRatingPEGI12Plus = 9 , kXEXRatingPEGI16Plus = 13 , kXEXRatingPEGI18Plus = 14 , kXEXRatingPEGIUnrated = 0xFF } |
| enum | XEXRatingPEGIFIValue : u32 { kXEXRatingPEGIFI3Plus = 0 , kXEXRatingPEGIFI7Plus = 4 , kXEXRatingPEGIFI11Plus = 8 , kXEXRatingPEGIFI15Plus = 12 , kXEXRatingPEGIFI18Plus = 14 , kXEXRatingPEGIFIUnrated = 0xFF } |
| enum | XEXRatingPEGIPTValue : u32 { kXEXRatingPEGIPT4Plus = 1 , kXEXRatingPEGIPT6Plus = 3 , kXEXRatingPEGIPT12Plus = 9 , kXEXRatingPEGIPT16Plus = 13 , kXEXRatingPEGIPT18Plus = 14 , kXEXRatingPEGIPTUnrated = 0xFF } |
| enum | XEXRatingBBFCValue : u32 { kXEXRatingBBFCUniversal = 1 , kXEXRatingBBFCPG = 5 , kXEXRatingBBFC3Plus = 0 , kXEXRatingBBFC7Plus = 4 , kXEXRatingBBFC12Plus = 9 , kXEXRatingBBFC15Plus = 12 , kXEXRatingBBFC16Plus = 13 , kXEXRatingBBFC18Plus = 14 , kXEXRatingBBFCUnrated = 0xFF } |
| enum | XEXRatingCEROValue : u32 { kXEXRatingCEROA = 0 , kXEXRatingCEROB = 2 , kXEXRatingCEROC = 4 , kXEXRatingCEROD = 6 , kXEXRatingCEROZ = 8 , kXEXRatingCEROUnrated = 0xFF } |
| enum | XEXRatingUSKValue : u32 { kXEXRatingUSKAll = 0 , kXEXRatingUSK6Plus = 2 , kXEXRatingUSK12Plus = 4 , kXEXRatingUSK16Plus = 6 , kXEXRatingUSK18Plus = 8 , kXEXRatingUSKUnrated = 0xFF } |
| enum | XEXRatingOFLCAUValue : u32 { kXEXRatingOFLCAUG = 0 , kXEXRatingOFLCAUPG = 2 , kXEXRatingOFLCAUM = 4 , kXEXRatingOFLCAUMA15Plus = 6 , kXEXRatingOFLCAUUnrated = 0xFF } |
| enum | XEXRatingOFLCNZValue : u32 { kXEXRatingOFLCNZG = 0 , kXEXRatingOFLCNZPG = 2 , kXEXRatingOFLCNZM = 4 , kXEXRatingOFLCNZMA15Plus = 6 , kXEXRatingOFLCNZUnrated = 0xFF } |
| enum | XEXRatingKMRBValue : u32 { kXEXRatingKMRBAll = 0 , kXEXRatingKMRB12Plus = 2 , kXEXRatingKMRB15Plus = 4 , kXEXRatingKMRB18Plus = 6 , kXEXRatingKMRBUnrated = 0xFF } |
| enum | XEXRatingBrazilValue : u32 { kXEXRatingBrazilAll = 0 , kXEXRatingBrazil12Plus = 2 , kXEXRatingBrazil14Plus = 4 , kXEXRatingBrazil16Plus = 5 , kXEXRatingBrazil18Plus = 8 , kXEXRatingBrazilUnrated = 0xFF } |
| enum | XEXRatingFPBValue : u32 { kXEXRatingFPBAll = 0 , kXEXRatingFPBPG = 6 , kXEXRatingFPB10Plus = 7 , kXEXRatingFPB13Plus = 10 , kXEXRatingFPB16Plus = 13 , kXEXRatingFPB18Plus = 14 , kXEXRatingFPBUnrated = 0xFF } |
| enum | XEXHeaderKey : u32 { kXEXHeaderResourceInfo = 0x000002FF , kXEXHeaderFileFormatInfo = 0x000003FF , kXEXHeaderDeltaPatchDescriptor = 0x000005FF , kXEXHeaderBaseReference = 0x00000405 , kXEXHeaderBoundPath = 0x000080FF , kXEXHeaderDeviceId = 0x00008105 , kXEXHeaderOriginalBaseAddress = 0x00010001 , kXEXHeaderEntryPoint = 0x00010100 , kXEXHeaderImageBaseAddress = 0x00010201 , kXEXHeaderImportLibraries = 0x000103FF , kXEXHeaderChecksumTimestamp = 0x00018002 , kXEXHeaderEnabledForCallCap = 0x00018102 , kXEXHeaderEnabledForFastCap = 0x00018200 , kXEXHeaderOriginalPEName = 0x000183FF , kXEXHeaderStaticLibraries = 0x000200FF , kXEXHeaderTLSInfo = 0x00020104 , kXEXHeaderDefaultStackSize = 0x00020200 , kXEXHeaderDefaultFilesystemCacheSize = 0x00020301 , kXEXHeaderDefaultHeapSize = 0x00020401 , kXEXHeaderPageHeapSizeAndFlags = 0x00028002 , kXEXHeaderSystemFlags = 0x00030000 , kXEXHeaderExecutionInfo = 0x00040006 , kXEXHeaderTitleWorkspaceSize = 0x00040201 , kXEXHeaderGameRatings = 0x00040310 , kXEXHeaderLANKey = 0x00040404 , kXEXHeaderXbox360Logo = 0x000405FF , kXEXHeaderMultiDiscMediaIDs = 0x000406FF , kXEXHeaderAlternateTitleIDs = 0x000407FF , kXEXHeaderAdditionalTitleMemory = 0x00040801 , kXEXHeaderExportsByName = 0x00E10402 } |
| enum | XEXEncryptionType : u16 { kXEXEncryptionNone = 0 , kXEXEncryptionNormal = 1 } |
| enum | XEXCompressionType : u16 { kXEXCompressionNone = 0 , kXEXCompressionBasic = 1 , kXEXCompressionNormal = 2 , kXEXCompressionDelta = 3 } |
| enum | XEXApprovalType : u8 { kXEXApprovalUnapproved = 0 , kXEXApprovalPossible = 1 , kXEXApprovalApproved = 2 , kXEXApprovalExpired = 3 } |
Functions | |
| std::span< const ExportEntry > | GetExports (ExportModule module) |
| const ExportEntry * | FindByOrdinal (ExportModule module, u16 ordinal) |
| bool | IsNoReturnExport (ExportModule module, u16 ordinal) |
| std::optional< ExportModule > | ModuleFromName (std::string_view name) |
| PPCFunc * | ResolveModuleImport (ModuleImport &target) |
| template<typename T, typename... Args> | |
| std::unique_ptr< KernelObject > | MakeObject (Args &&... args) |
| X_HANDLE | CreateModule (TitleRuntime &runtime, ModuleType type) |
| std::chrono::milliseconds | TimeoutFromTicks (i64 timeout_ticks) |
| std::chrono::microseconds | DelayFromTicks (i64 delay_ticks) |
| std::string | NameFromAttributes (kernel::GuestAddressSpace *memory, u32 obj_attributes_ptr) |
| X_STATUS | Wait (TitleRuntime &runtime, const ObjectPin &object, u32 wait_reason, u32 processor_mode, u32 alertable, u64 *opt_timeout) |
| X_STATUS | WaitMultiple (TitleRuntime &runtime, std::span< const ObjectPin > objects, u32 wait_type, u32 wait_reason, u32 processor_mode, u32 alertable, u64 *opt_timeout) |
| X_STATUS | SignalAndWait (TitleRuntime &runtime, const ObjectPin &signal_object, const ObjectPin &wait_object, u32 wait_reason, u32 processor_mode, u32 alertable, u64 *opt_timeout) |
| ObjectBlock | AllocObjectBlock (kernel::GuestAddressSpace *memory, u32 size, u32 type_address, WorkspaceHeap *workspace=nullptr) |
| void | FreeObjectBlock (kernel::GuestAddressSpace *memory, u32 address, WorkspaceHeap *workspace=nullptr) |
| void | CloseOwned (IObjectTable &table, X_HANDLE handle) noexcept |
| Result< std::vector< BinarySymbol > > | ParseNmMap (const std::filesystem::path &map_path, const MapParseOptions &options={}) |
| Result< std::vector< BinarySymbol > > | ParseNmMapString (std::string_view map_data, const MapParseOptions &options={}) |
| TitleRuntime & | GetCurrent () |
| TitleRuntime * | GetProcessRuntime () |
| constexpr XLanguage | ToXLanguage (u32 value) noexcept |
| void | XOverlappedSetResult (void *ptr, u32 value) |
| u32 | XOverlappedGetResult (void *ptr) |
| void | XOverlappedSetLength (void *ptr, u32 value) |
| u32 | XOverlappedGetContext (void *ptr) |
| void | XOverlappedSetContext (void *ptr, u32 value) |
| X_HANDLE | XOverlappedGetEvent (void *ptr) |
| u32 | XOverlappedGetCompletionRoutine (void *ptr) |
| void | XOverlappedSetExtendedError (void *ptr, u32 value) |
| std::string_view | TranslateAnsiString (const kernel::GuestAddressSpace *memory, const X_ANSI_STRING *ansi_string) |
| std::string | TranslateAnsiPath (const kernel::GuestAddressSpace *memory, const X_ANSI_STRING *ansi_string) |
| std::string_view | TranslateAnsiStringAddress (const kernel::GuestAddressSpace *memory, u32 guest_address) |
| std::u16string | TranslateUnicodeString (const kernel::GuestAddressSpace *memory, const X_UNICODE_STRING *unicode_string) |
| template<typename VirtualTranslator> | |
| X_LIST_ENTRY * | HostListEntry (u32 ptr, VirtualTranslator context) |
| template<typename VirtualTranslator> | |
| u32 | GuestListAddress (X_LIST_ENTRY *ptr, VirtualTranslator context) |
| template<typename VirtualTranslator> | |
| void | InitializeListHead (X_LIST_ENTRY *entry, VirtualTranslator context) |
| template<typename VirtualTranslator> | |
| bool | IsListEmpty (X_LIST_ENTRY *entry, VirtualTranslator context) |
| template<typename VirtualTranslator> | |
| void | RemoveEntryList (X_LIST_ENTRY *entry, VirtualTranslator context) |
| template<typename VirtualTranslator> | |
| void | RemoveEntryList (u32 entry, VirtualTranslator context) |
| template<typename VirtualTranslator> | |
| u32 | RemoveHeadList (X_LIST_ENTRY *entry, VirtualTranslator context) |
| template<typename VirtualTranslator> | |
| void | InsertTailList (X_LIST_ENTRY *list_head, u32 list_head_guest, X_LIST_ENTRY *host_entry, u32 entry, VirtualTranslator context) |
| template<typename VirtualTranslator> | |
| void | InsertTailList (u32 list_head, u32 entry, VirtualTranslator context) |
| template<typename VirtualTranslator> | |
| void | InsertTailList (X_LIST_ENTRY *list_head, X_LIST_ENTRY *entry, VirtualTranslator context) |
| template<typename VirtualTranslator> | |
| void | InsertHeadList (X_LIST_ENTRY *list_head, u32 list_head_guest, X_LIST_ENTRY *host_entry, u32 entry, VirtualTranslator context) |
| template<typename VirtualTranslator> | |
| void | InsertHeadList (u32 list_head, X_LIST_ENTRY *entry, VirtualTranslator context) |
| template<typename VirtualTranslator> | |
| void | InsertHeadList (X_LIST_ENTRY *list_head, X_LIST_ENTRY *entry, VirtualTranslator context) |
| constexpr bool | XSUCCEEDED (X_STATUS s) |
| constexpr bool | XFAILED (X_STATUS s) |
| constexpr X_RESULT | XResultFromWin32 (u32 x) |
| constexpr X_HRESULT | XHRESULTFromWin32 (u32 x) |
| rex::Error | StatusError (X_STATUS status) |
| rex::Error | XResultError (X_RESULT result) |
| X_STATUS | ToXStatus (const rex::Error &error, X_STATUS unsupported=X_STATUS_NOT_IMPLEMENTED) |
| X_RESULT | ToXResult (const rex::Error &error, X_RESULT unsupported=X_ERROR_FUNCTION_FAILED) |
| template<typename T> | |
| X_STATUS | ToXStatus (const Result< T > &result) |
| template<typename T> | |
| X_RESULT | ToXResult (const Result< T > &result) |
| void | FillXVideoMode (const VideoMode &mode, X_VIDEO_MODE &out) |
Variables | |
| constexpr u32 | kPageSize4KiB = 4 * 1024 |
| constexpr u32 | kPageSize64KiB = 64 * 1024 |
| constexpr u32 | kPageSize16MiB = 16 * 1024 * 1024 |
| constexpr memory::FourCCT | kXEX1Signature = memory::make_fourcc("XEX1") |
| constexpr memory::FourCCT | kXEX2Signature = memory::make_fourcc("XEX2") |
| constexpr memory::FourCCT | kELFSignature = memory::make_fourcc(0x7F, 'E', 'L', 'F') |
| constexpr u32 | kNotifyListenerObjectSize = 0x30 |
| constexpr memory::FourCCT | kStashSignature = memory::make_fourcc('R', 'E', 'X', '\0') |
| constexpr u32 | kHandleBase = 0xF8000000 |
| constexpr memory::Tag | kRuntime {2} |
| constexpr u32 | kRunningTitleID = 0xFFFFFFFF |
| constexpr u32 | kObjOpenIf = 0x80 |
| constexpr u32 | kFileObjectSize = 0x68 |
| constexpr u16 | kFileObjectTypeId = 5 |
| constexpr u32 | kIOCompletionObjectSize = 0x28 |
| constexpr u32 | kSymbolicLinkObjectSize = 0xC |
| constexpr X_HANDLE | kXInvalidHandleValue = static_cast<X_HANDLE>(-1) |
| constexpr X_STATUS | X_STATUS_SUCCESS = 0x00000000 |
| constexpr X_STATUS | X_STATUS_ABANDONED_WAIT_0 = 0x00000080 |
| constexpr X_STATUS | X_STATUS_USER_APC = 0x000000C0 |
| constexpr X_STATUS | X_STATUS_ALERTED = 0x00000101 |
| constexpr X_STATUS | X_STATUS_TIMEOUT = 0x00000102 |
| constexpr X_STATUS | X_STATUS_PENDING = 0x00000103 |
| constexpr X_STATUS | X_STATUS_OBJECT_NAME_EXISTS = 0x40000000 |
| constexpr X_STATUS | X_STATUS_TIMER_RESUME_IGNORED = 0x40000025 |
| constexpr X_STATUS | X_STATUS_BUFFER_OVERFLOW = 0x80000005 |
| constexpr X_STATUS | X_STATUS_NO_MORE_FILES = 0x80000006 |
| constexpr X_STATUS | X_STATUS_UNSUCCESSFUL = 0xC0000001 |
| constexpr X_STATUS | X_STATUS_NOT_IMPLEMENTED = 0xC0000002 |
| constexpr X_STATUS | X_STATUS_INVALID_INFO_CLASS = 0xC0000003 |
| constexpr X_STATUS | X_STATUS_INFO_LENGTH_MISMATCH = 0xC0000004 |
| constexpr X_STATUS | X_STATUS_ACCESS_VIOLATION = 0xC0000005 |
| constexpr X_STATUS | X_STATUS_INVALID_HANDLE = 0xC0000008 |
| constexpr X_STATUS | X_STATUS_INVALID_PARAMETER = 0xC000000D |
| constexpr X_STATUS | X_STATUS_NO_SUCH_FILE = 0xC000000F |
| constexpr X_STATUS | X_STATUS_END_OF_FILE = 0xC0000011 |
| constexpr X_STATUS | X_STATUS_NO_MEMORY = 0xC0000017 |
| constexpr X_STATUS | X_STATUS_ALREADY_COMMITTED = 0xC0000021 |
| constexpr X_STATUS | X_STATUS_ACCESS_DENIED = 0xC0000022 |
| constexpr X_STATUS | X_STATUS_BUFFER_TOO_SMALL = 0xC0000023 |
| constexpr X_STATUS | X_STATUS_OBJECT_TYPE_MISMATCH = 0xC0000024 |
| constexpr X_STATUS | X_STATUS_OBJECT_NAME_INVALID = 0xC0000033 |
| constexpr X_STATUS | X_STATUS_OBJECT_NAME_NOT_FOUND = 0xC0000034 |
| constexpr X_STATUS | X_STATUS_OBJECT_NAME_COLLISION = 0xC0000035 |
| constexpr X_STATUS | X_STATUS_OBJECT_PATH_NOT_FOUND = 0xC000003A |
| constexpr X_STATUS | X_STATUS_SHARING_VIOLATION = 0xC0000043 |
| constexpr X_STATUS | X_STATUS_INVALID_PAGE_PROTECTION = 0xC0000045 |
| constexpr X_STATUS | X_STATUS_MUTANT_NOT_OWNED = 0xC0000046 |
| constexpr X_STATUS | X_STATUS_THREAD_IS_TERMINATING = 0xC000004B |
| constexpr X_STATUS | X_STATUS_PROCESS_IS_TERMINATING = 0xC000010A |
| constexpr X_STATUS | X_STATUS_PROCEDURE_NOT_FOUND = 0xC000007A |
| constexpr X_STATUS | X_STATUS_INSUFFICIENT_RESOURCES = 0xC000009A |
| constexpr X_STATUS | X_STATUS_NOT_SAME_DEVICE = 0xC00000D4 |
| constexpr X_STATUS | X_STATUS_MEMORY_NOT_ALLOCATED = 0xC00000A0 |
| constexpr X_STATUS | X_STATUS_FILE_IS_A_DIRECTORY = 0xC00000BA |
| constexpr X_STATUS | X_STATUS_NOT_SUPPORTED = 0xC00000BB |
| constexpr X_STATUS | X_STATUS_NOT_A_DIRECTORY = 0xC0000103 |
| constexpr X_STATUS | X_STATUS_INVALID_PARAMETER_1 = 0xC00000EF |
| constexpr X_STATUS | X_STATUS_INVALID_PARAMETER_2 = 0xC00000F0 |
| constexpr X_STATUS | X_STATUS_INVALID_PARAMETER_3 = 0xC00000F1 |
| constexpr X_STATUS | X_STATUS_DLL_NOT_FOUND = 0xC0000135 |
| constexpr X_STATUS | X_STATUS_ENTRYPOINT_NOT_FOUND = 0xC0000139 |
| constexpr X_STATUS | X_STATUS_SEMAPHORE_LIMIT_EXCEEDED = 0xC000012B |
| constexpr X_STATUS | X_STATUS_MAPPED_ALIGNMENT = 0xC0000220 |
| constexpr X_STATUS | X_STATUS_NOT_FOUND = 0xC0000225 |
| constexpr X_STATUS | X_STATUS_DRIVER_ORDINAL_NOT_FOUND = 0xC0000262 |
| constexpr X_STATUS | X_STATUS_DRIVER_ENTRYPOINT_NOT_FOUND = 0xC0000263 |
| constexpr i32 | kFacilityWin32 = 0x0007 |
| constexpr X_RESULT | X_ERROR_SUCCESS = XResultFromWin32(0x00000000) |
| constexpr X_RESULT | X_ERROR_FILE_NOT_FOUND = XResultFromWin32(0x00000002) |
| constexpr X_RESULT | X_ERROR_PATH_NOT_FOUND = XResultFromWin32(0x00000003) |
| constexpr X_RESULT | X_ERROR_ACCESS_DENIED = XResultFromWin32(0x00000005) |
| constexpr X_RESULT | X_ERROR_INVALID_HANDLE = XResultFromWin32(0x00000006) |
| constexpr X_RESULT | X_ERROR_NOT_ENOUGH_MEMORY = XResultFromWin32(0x00000008) |
| constexpr X_RESULT | X_ERROR_NO_MORE_FILES = XResultFromWin32(0x00000012) |
| constexpr X_RESULT | X_ERROR_INVALID_PARAMETER = XResultFromWin32(0x00000057) |
| constexpr X_RESULT | X_ERROR_INSUFFICIENT_BUFFER = XResultFromWin32(0x0000007A) |
| constexpr X_RESULT | X_ERROR_INVALID_NAME = XResultFromWin32(0x0000007B) |
| constexpr X_RESULT | X_ERROR_BAD_ARGUMENTS = XResultFromWin32(0x000000A0) |
| constexpr X_RESULT | X_ERROR_BUSY = XResultFromWin32(0x000000AA) |
| constexpr X_RESULT | X_ERROR_ALREADY_EXISTS = XResultFromWin32(0x000000B7) |
| constexpr X_RESULT | X_ERROR_IO_INCOMPLETE = XResultFromWin32(0x000003E4) |
| constexpr X_RESULT | X_ERROR_IO_PENDING = XResultFromWin32(0x000003E5) |
| constexpr X_RESULT | X_ERROR_DEVICE_NOT_CONNECTED = XResultFromWin32(0x0000048F) |
| constexpr X_RESULT | X_ERROR_NOT_FOUND = XResultFromWin32(0x00000490) |
| constexpr X_RESULT | X_ERROR_CANCELLED = XResultFromWin32(0x000004C7) |
| constexpr X_RESULT | X_ERROR_NOT_LOGGED_ON = XResultFromWin32(0x000004DD) |
| constexpr X_RESULT | X_ERROR_NO_SUCH_USER = XResultFromWin32(0x00000525) |
| constexpr X_RESULT | X_ERROR_FUNCTION_FAILED = XResultFromWin32(0x0000065B) |
| constexpr X_RESULT | X_ERROR_EMPTY = XResultFromWin32(0x000010D2) |
| constexpr X_HRESULT | X_E_FALSE = 0x80000000 |
| constexpr X_HRESULT | X_E_SUCCESS = XHRESULTFromWin32(X_ERROR_SUCCESS) |
| constexpr X_HRESULT | X_E_FAIL = 0x80004005 |
| constexpr X_HRESULT | kXEUnexpected = 0x8000FFFF |
| constexpr X_HRESULT | kXEOutOfMemory = 0x8007000E |
| constexpr X_HRESULT | X_E_NO_MORE_FILES = XHRESULTFromWin32(X_ERROR_NO_MORE_FILES) |
| constexpr X_HRESULT | X_E_INVALIDARG = XHRESULTFromWin32(X_ERROR_INVALID_PARAMETER) |
| constexpr X_HRESULT | X_E_DEVICE_NOT_CONNECTED |
| constexpr X_HRESULT | X_E_NOTFOUND = XHRESULTFromWin32(X_ERROR_NOT_FOUND) |
| constexpr X_HRESULT | X_E_NO_SUCH_USER = XHRESULTFromWin32(X_ERROR_NO_SUCH_USER) |
| constexpr u32 | kXCreateSuspended = 0x00000001 |
| constexpr u32 | kXTLSOutOfIndexes = UINT32_MAX |
| constexpr u32 | kXProcTypeIdle = 0 |
| constexpr u32 | kXProcTypeUser = 1 |
| constexpr u32 | kXProcTypeSystem = 2 |
Kernel exports, shims and the kernel initializer.
| using rex::kernel::ObjectData |
The data of a KernelObject, one alternative per ObjectType in enumerator order.
| using rex::kernel::X_RESULT = u32 |
Win32 error code type, holding ERROR_* values.
| using rex::kernel::X_STATUS = u32 |
NT status code type, holding STATUS_* values.
| using rex::kernel::XNotificationID = u32 |
ID of a notification, split into fields by XNotificationKey.
|
strong |
| Enumerator | |
|---|---|
| kResumed | The write watch resolved the fault, so the access runs again. |
| kMMIOMiss | The access reached a register block that generated code did not route. |
| kUnhandled | GuestAddressSpace makes no claim on the fault. |
|
strong |
| Enumerator | |
|---|---|
| kFunction | A translated function, ExportEntry::fn is set. |
| kVariable | A data export, ExportEntry::fn is null. |
|
strong |
|
strong |
|
strong |
| enum rex::kernel::IRQL_FLAGS : u8 |
Interrupt request levels stored in X_KPCR::current_irql.
| Enumerator | |
|---|---|
| kIRQLDispatch | Level held while a spinlock is acquired and while queued DPCs run. |
| kIRQLDPC | Level held while an interrupt routine runs. |
| kIRQLAudio | No code uses it. |
| kIRQLClock | No code uses it. |
| enum rex::kernel::MemoryAllocationFlag : u8 |
|
strong |
Module type, HLE kernel code or a loaded title image.
| enum rex::kernel::SystemHeapFlag : u8 |
Selects the heap that SystemHeapAlloc takes memory from.
|
strong |
| enum rex::kernel::X_DISPATCHER_FLAGS : u8 |
Object types stored in the type byte of X_DISPATCH_HEADER.
| enum rex::kernel::X_FILE_ATTRIBUTES : u16 |
| enum rex::kernel::X_FILE_DEVICE_TYPE : u32 |
| enum rex::kernel::X_FILE_FS_INFORMATION_CLASS : u8 |
| enum rex::kernel::X_FILE_INFORMATION_CLASS : u8 |
| enum rex::kernel::X_KTHREAD_STATE_FLAGS : u8 |
Values of X_KTHREAD::thread_state.
| enum rex::kernel::X_MEM : u32 |
MEM_* flags used by NtAllocateVirtualMemory.
| enum rex::kernel::X_PAGE : u16 |
PAGE_* flags used by NtAllocateVirtualMemory.
|
strong |
| enum rex::kernel::XEXCompressionType : u16 |
| Enumerator | |
|---|---|
| kXEXCompressionBasic | Image data is stored as the runs of XEXFileBasicCompressionInfo. |
| kXEXCompressionNormal | Image data is LZX compressed per XEXFileNormalCompressionInfo. |
| kXEXCompressionDelta | The image is a delta patch applied to a base image. |
| enum rex::kernel::XEXHeaderKey : u32 |
| Enumerator | |
|---|---|
| kXEXHeaderEntryPoint | Inline value holding the guest address of the entry point. |
| kXEXHeaderImageBaseAddress | Inline value holding the guest address the image loads at. |
| kXEXHeaderDefaultStackSize | Inline value holding the default thread stack size in bytes. |
| kXEXHeaderDefaultFilesystemCacheSize | Inline value holding the default filesystem cache size. |
| kXEXHeaderDefaultHeapSize | Inline value holding the default heap size. |
| kXEXHeaderTitleWorkspaceSize | Inline value holding the title workspace size. |
| kXEXHeaderAlternateTitleIDs | Selects XEXOptU32Words holding alternate title IDs. |
| kXEXHeaderExportsByName | Selects XEXOptDataDirectory locating the named export table. |
| enum rex::kernel::XEXImageFlags : u32 |
Image flag bits of the XEX security info.
| enum rex::kernel::XEXRatingBBFCValue : u32 |
BBFC (British Board of Film Classification) for UK and Ireland
| enum rex::kernel::XEXRatingBrazilValue : u32 |
Brazil ratings
| enum rex::kernel::XEXRatingCEROValue : u32 |
CERO (Computer Entertainment Rating Organization)
| enum rex::kernel::XEXRatingESRBValue : u32 |
ESRB (Entertainment Software Rating Board)
| enum rex::kernel::XEXRatingFPBValue : u32 |
FPB (Film and Publication Board)
| enum rex::kernel::XEXRatingKMRBValue : u32 |
KMRB (Korea Media Rating Board)
| enum rex::kernel::XEXRatingOFLCAUValue : u32 |
OFLC (Office of Film and Literature Classification) for Australia
| enum rex::kernel::XEXRatingOFLCNZValue : u32 |
OFLC (Office of Film and Literature Classification) for New Zealand
| enum rex::kernel::XEXRatingPEGIFIValue : u32 |
PEGI (Pan European Game Information) for Finland
| enum rex::kernel::XEXRatingPEGIPTValue : u32 |
PEGI (Pan European Game Information) for Portugal
| enum rex::kernel::XEXRatingPEGIValue : u32 |
PEGI (Pan European Game Information)
| enum rex::kernel::XEXRatingUSKValue : u32 |
USK (Unterhaltungssoftware SelbstKontrolle)
| enum rex::kernel::XEXRegionFlags : u32 |
|
strong |
| ObjectBlock rex::kernel::AllocObjectBlock | ( | kernel::GuestAddressSpace * | memory, |
| u32 | size, | ||
| u32 | type_address, | ||
| WorkspaceHeap * | workspace = nullptr ) |
Allocates a guest block for an object, with its X_OBJECT_HEADER pointing at the type.
| type_address | The guest address of the exported type object of the object, such as ExEventObjectType, 0 for an object that has none. |
| workspace | The workspace for the header and body, null for the system heap. |
|
inlinenoexcept |
Closes a handle the caller owns and logs a close that fails, for teardown and error unwinding.
| table | The table that issued the handle. |
| X_HANDLE rex::kernel::CreateModule | ( | TitleRuntime & | runtime, |
| ModuleType | type ) |
Creates a KernelObject with its first handle and stores that handle in the loader data entry.
| type | Whether the module is kernel or user. |
| std::chrono::microseconds rex::kernel::DelayFromTicks | ( | i64 | delay_ticks | ) |
Converts a delay interval in 100 nanosecond ticks to microseconds, scaled by the guest clock and rounded up.
| delay_ticks | A negative relative interval, a positive absolute system time, or 0. |
|
inline |
Fills a guest video mode structure from a display mode.
| out | Receives the guest structure. |
| const ExportEntry * rex::kernel::FindByOrdinal | ( | ExportModule | module, |
| u16 | ordinal ) |
Finds a row by ordinal.
| void rex::kernel::FreeObjectBlock | ( | kernel::GuestAddressSpace * | memory, |
| u32 | address, | ||
| WorkspaceHeap * | workspace = nullptr ) |
Frees a block made by AllocObjectBlock. The type object it points at is not freed.
| address | The address of the object body, 0 for none. |
| workspace | The workspace AllocObjectBlock used, null for the system heap. |
|
inline |
Returns the runtime the calling thread belongs to. Aborts on a host thread.
| std::span< const ExportEntry > rex::kernel::GetExports | ( | ExportModule | module | ) |
Returns the rows of a module table, sorted by ordinal.
|
nodiscard |
Returns the runtime of the process, from any thread, null before Load completes and from the first step of Shutdown.
Valid only until Shutdown starts, because the call does not keep the runtime alive. Unlike GetCurrent(), it needs no title or worker thread and never aborts.
| X_LIST_ENTRY * rex::kernel::HostListEntry | ( | u32 | ptr, |
| VirtualTranslator | context ) |
Translates a guest list pointer to a host pointer. A translator is any type with TranslateVirtual<T*>(uint32_t) and HostToGuestVirtual(void*), such as kernel::GuestAddressSpace*.
| ptr | The guest address of the list entry. |
| void rex::kernel::InitializeListHead | ( | X_LIST_ENTRY * | entry, |
| VirtualTranslator | context ) |
Resets a list head to an empty list.
| context | The translator, or the guest address of the list head as an unsigned integer. |
| void rex::kernel::InsertHeadList | ( | u32 | list_head, |
| X_LIST_ENTRY * | entry, | ||
| VirtualTranslator | context ) |
Links an entry at the head of a list.
| list_head | The guest address of the list head. |
| void rex::kernel::InsertHeadList | ( | X_LIST_ENTRY * | list_head, |
| u32 | list_head_guest, | ||
| X_LIST_ENTRY * | host_entry, | ||
| u32 | entry, | ||
| VirtualTranslator | context ) |
Links an entry at the head of a list.
| list_head_guest | The guest address of the list head. |
| entry | The guest address of the list entry. |
| void rex::kernel::InsertTailList | ( | u32 | list_head, |
| u32 | entry, | ||
| VirtualTranslator | context ) |
Links an entry at the tail of a list.
| list_head | The guest address of the list head. |
| entry | The guest address of the list entry. |
| void rex::kernel::InsertTailList | ( | X_LIST_ENTRY * | list_head, |
| u32 | list_head_guest, | ||
| X_LIST_ENTRY * | host_entry, | ||
| u32 | entry, | ||
| VirtualTranslator | context ) |
Links an entry at the tail of a list.
| list_head_guest | The guest address of the list head. |
| entry | The guest address of the list entry. |
| bool rex::kernel::IsListEmpty | ( | X_LIST_ENTRY * | entry, |
| VirtualTranslator | context ) |
Reports whether a list has no entries.
| bool rex::kernel::IsNoReturnExport | ( | ExportModule | module, |
| u16 | ordinal ) |
Reports whether an export never returns to its caller.
|
nodiscard |
Makes a KernelObject around an alternative of ObjectData, or around a class XAM owns.
| T | An alternative of ObjectData, or an XAMObjectClass. |
| std::optional< ExportModule > rex::kernel::ModuleFromName | ( | std::string_view | name | ) |
Maps a module name to a table.
Accepts xam or any name that begins with xam.xex, ignoring case.
| std::string rex::kernel::NameFromAttributes | ( | kernel::GuestAddressSpace * | memory, |
| u32 | obj_attributes_ptr ) |
Reads the object name out of an X_OBJECT_ATTRIBUTES.
| memory | Memory containing the attributes and the name. |
| obj_attributes_ptr | The guest address of the attributes, or 0. |
|
nodiscard |
Parses a map file in the nm format whose lines read "address type name", such as "00000010 T test_sub1". Types are T/t code, D/d data, B/b bss and U undefined.
| options | The base address and filters. |
|
nodiscard |
Parses map data in the nm format from a string.
| options | The base address and filters. |
| void rex::kernel::RemoveEntryList | ( | u32 | entry, |
| VirtualTranslator | context ) |
Unlinks an entry from its list.
| entry | The guest address of the list entry. |
| u32 rex::kernel::RemoveHeadList | ( | X_LIST_ENTRY * | entry, |
| VirtualTranslator | context ) |
Unlinks the first entry of a list.
| PPCFunc * rex::kernel::ResolveModuleImport | ( | ModuleImport & | target | ) |
Resolves an import to the function of the exporting module, and resolves it again after a module loads or unloads. Stops the title when the module or the export is gone.
| X_STATUS rex::kernel::SignalAndWait | ( | TitleRuntime & | runtime, |
| const ObjectPin & | signal_object, | ||
| const ObjectPin & | wait_object, | ||
| u32 | wait_reason, | ||
| u32 | processor_mode, | ||
| u32 | alertable, | ||
| u64 * | opt_timeout ) |
Signals one pinned object and waits on another as a single operation.
| signal_object | A pin on the object to signal, which is not empty. |
| wait_object | A pin on the object to wait on, which is not empty. |
| alertable | Nonzero when a user APC ends the wait. |
| opt_timeout | The timeout in 100 nanosecond ticks, null to wait forever. |
|
nodiscard |
Builds the error a runtime interface returns when a platform call fails with an NT status.
| status | The NT status the export returns. |
| std::chrono::milliseconds rex::kernel::TimeoutFromTicks | ( | i64 | timeout_ticks | ) |
Converts a wait timeout in 100 nanosecond ticks to milliseconds.
| timeout_ticks | A negative relative timeout, a positive absolute system time, or 0. |
|
constexprnoexcept |
Converts a language ID read from guest memory, a file or a config value.
| value | The language ID. |
Maps a result to the Win32 code XAM reports.
|
nodiscard |
Maps an error to the Win32 code XAM reports.
| error | An error built by XResultError. |
| unsupported | The code for an error of another category. |
Maps a result to the NT status the kernel reports.
|
nodiscard |
Maps an error to the NT status the kernel reports.
| error | An error built by StatusError or by filesystem::BuildError. |
| unsupported | The status for the filesystem code kUnsupported. |
|
inline |
Returns the text of a guest ANSI string with surrounding whitespace removed.
| ansi_string | The guest string, may be null. |
|
inline |
Returns the characters of a guest ANSI string without copying, empty when the string is null or has no length.
| ansi_string | The guest string, may be null. |
|
inline |
Returns the characters of the guest ANSI string at an address without copying, empty when the address is 0.
| guest_address | The guest address of the string structure, 0 for none. |
|
inline |
Converts a guest UTF-16 string to host byte order.
| unicode_string | The guest string, may be null. |
| X_STATUS rex::kernel::Wait | ( | TitleRuntime & | runtime, |
| const ObjectPin & | object, | ||
| u32 | wait_reason, | ||
| u32 | processor_mode, | ||
| u32 | alertable, | ||
| u64 * | opt_timeout ) |
Waits on a pinned object. A type without a wait handle succeeds at once.
| object | A pin on the object, which is not empty. |
| alertable | Nonzero when a user APC ends the wait. |
| opt_timeout | The timeout in 100 nanosecond ticks, null to wait forever. |
| X_STATUS rex::kernel::WaitMultiple | ( | TitleRuntime & | runtime, |
| std::span< const ObjectPin > | objects, | ||
| u32 | wait_type, | ||
| u32 | wait_reason, | ||
| u32 | processor_mode, | ||
| u32 | alertable, | ||
| u64 * | opt_timeout ) |
Waits on several pinned objects.
| objects | Pins on the objects, none of them empty. |
| wait_type | Nonzero to wait for any object, 0 to wait for all. |
| alertable | Nonzero when a user APC ends the wait. |
| opt_timeout | The timeout in 100 nanosecond ticks, null to wait forever. |
|
nodiscardconstexpr |
Reports whether a status code is a warning or error code.
|
nodiscardconstexpr |
Returns the HRESULT for a Win32 error code, or the value unchanged when it is zero or negative.
| x | Win32 error code. |
|
inline |
Returns the completion routine of an overlapped call, or 0 when there is none.
| ptr | The XOVERLAPPED block. |
|
inline |
Returns the event of an overlapped call, or 0 when there is none.
| ptr | The XOVERLAPPED block. |
|
inline |
Returns the result of an overlapped call.
| ptr | The XOVERLAPPED block. |
|
inline |
Publishes the result of an overlapped call.
| ptr | The XOVERLAPPED block. |
|
nodiscard |
Builds the error a runtime interface returns when a platform call fails with a Win32 code.
| result | The Win32 code the export returns. |
|
nodiscardconstexpr |
Returns the Win32 error code unchanged.
|
nodiscardconstexpr |
Reports whether a status code is a success or informational code, like NT_SUCCESS.
|
inlineconstexpr |
Size of the guest body of a file object.
|
inlineconstexpr |
Value of the Type field at the start of a file object body.
|
inlineconstexpr |
The value added to a table slot index, shifted left by 2, to form a handle.
|
inlineconstexpr |
Size of the guest body of an IO completion object.
|
inlineconstexpr |
Size of the guest body of a notify listener.
|
inlineconstexpr |
Object attribute that opens an existing object of the same type when the name is taken.
|
inlineconstexpr |
The large page size and title allocation granularity, in bytes.
|
constexpr |
Placeholder in XCONTENT_AGGREGATE_DATA, substituted with the running title ID.
|
constexpr |
Magic value at the start of the extra block of an XAM enumerator.
|
inlineconstexpr |
Size of a symbolic link body before the target name, which follows it.
|
constexpr |
Process types KeGetCurrentProcessType reports.
|
constexpr |
Index returned when no TLS slot is free.
|
inlineconstexpr |