ReXGlue SDK
Loading...
Searching...
No Matches
rex::kernel::ILoadedModule Class Referenceabstract

#include <rex/kernel/object/module_object.h>

Inheritance diagram for rex::kernel::ILoadedModule:
[legend]

Public Member Functions

virtual const std::string & GetPath () const =0
virtual X_STATUS GetSection (std::string_view section_name, u32 *out_section_data, u32 *out_section_size) const =0
virtual u32 GetTitleID () const =0
virtual std::vector< u32 > GetAlternateTitleIDs () const =0
virtual X_STATUS GetOptHeader (XEXHeaderKey key, void **out_ptr)=0
template<typename T>
X_STATUS OptHeader (XEXHeaderKey key, T *out_ptr)
virtual X_STATUS GetOptHeaderGuestAddress (XEXHeaderKey key, u32 *out_guest_address) const =0

Detailed Description

What XAM reads from a loaded module.

Member Function Documentation

◆ GetAlternateTitleIDs()

virtual std::vector< u32 > rex::kernel::ILoadedModule::GetAlternateTitleIDs ( ) const
nodiscardpure virtual

Lists the alternate title IDs of the XEX header of a user module.

Returns
The title IDs, empty when the module is not an XEX.

Implemented in rex::kernel::ModuleObject.

◆ GetOptHeader()

virtual X_STATUS rex::kernel::ILoadedModule::GetOptHeader ( XEXHeaderKey key,
void ** out_ptr )
pure virtual

Finds an optional XEX header. For host use only.

Parameters
out_ptrReceives the header value or a pointer to its data.
Returns
X_STATUS_SUCCESS, X_STATUS_NOT_FOUND, or X_STATUS_UNSUCCESSFUL for an ELF.

Implemented in rex::kernel::ModuleObject.

◆ GetOptHeaderGuestAddress()

virtual X_STATUS rex::kernel::ILoadedModule::GetOptHeaderGuestAddress ( XEXHeaderKey key,
u32 * out_guest_address ) const
pure virtual

Finds an optional XEX header the way RtlImageXexHeaderField does: the value for a key whose low byte is 0, otherwise the guest address of the field.

Parameters
keyThe header key.
out_guest_addressReceives the value or the guest address, 0 when absent.
Returns
X_STATUS_SUCCESS, X_STATUS_NOT_FOUND, or X_STATUS_UNSUCCESSFUL for an ELF.

Implemented in rex::kernel::ModuleObject.

◆ GetPath()

virtual const std::string & rex::kernel::ILoadedModule::GetPath ( ) const
nodiscardpure virtual

Returns the absolute path of the file a user module was loaded from.

Implemented in rex::kernel::ModuleObject.

◆ GetSection()

virtual X_STATUS rex::kernel::ILoadedModule::GetSection ( std::string_view section_name,
u32 * out_section_data,
u32 * out_section_size ) const
pure virtual

Finds a resource section of a module.

Parameters
out_section_dataReceives the guest address of the section.
out_section_sizeReceives the size of the section.
Returns
X_STATUS_SUCCESS, X_STATUS_NOT_FOUND, or X_STATUS_UNSUCCESSFUL for a kernel module.

Implemented in rex::kernel::ModuleObject.

◆ GetTitleID()

virtual u32 rex::kernel::ILoadedModule::GetTitleID ( ) const
nodiscardpure virtual

Returns the title ID of a user module, 0 when the module is not an XEX or has none.

Implemented in rex::kernel::ModuleObject.

◆ OptHeader()

template<typename T>
X_STATUS rex::kernel::ILoadedModule::OptHeader ( XEXHeaderKey key,
T * out_ptr )
inline

Finds an optional XEX header. For host use only.

Template Parameters
TThe type of the value the header holds.
Parameters
out_ptrReceives the header value or a pointer to its data.
Returns
X_STATUS_SUCCESS, X_STATUS_NOT_FOUND, or X_STATUS_UNSUCCESSFUL for an ELF.

The documentation for this class was generated from the following file: