Implemented ExLoadedImageName

This commit is contained in:
Gliniak
2020-10-11 17:37:22 +02:00
committed by Rick Gibbed
parent bf8138a886
commit f6f524b814
3 changed files with 23 additions and 0 deletions

View File

@@ -189,6 +189,16 @@ XboxkrnlModule::XboxkrnlModule(Emulator* emulator, KernelState* kernel_state)
ordinals::XexExecutableModuleHandle,
ppXexExecutableModuleHandle);
// ExLoadedImageName (char*)
// The full path to loaded image/xex including its name.
// Used usually in custom dashboards (Aurora)
// Todo(Gliniak): Confirm that official kernel always allocate space for this
// variable.
uint32_t ppExLoadedImageName =
memory_->SystemHeapAlloc(kExLoadedImageNameSize);
export_resolver_->SetVariableMapping(
"xboxkrnl.exe", ordinals::ExLoadedImageName, ppExLoadedImageName);
// ExLoadedCommandLine (char*)
// The name of the xex. Not sure this is ever really used on real devices.
// Perhaps it's how swap disc/etc data is sent?

View File

@@ -27,6 +27,8 @@ namespace xboxkrnl {
class XboxkrnlModule : public KernelModule {
public:
static constexpr size_t kExLoadedImageNameSize = 255 + 1;
XboxkrnlModule(Emulator* emulator, KernelState* kernel_state);
virtual ~XboxkrnlModule();