mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-20 04:03:57 +00:00
Support SameTebFlags.InitialThread
This flag is needed to suport emulation of .net executables that don't have an entry point set in PE header. This applies to both PE32 and PE64 executables. If InitialThread is set the loader substitutes an entry point of the .net executable with mscoree.dll!_CorExeMain.
This commit is contained in:
@@ -371,7 +371,7 @@ void windows_emulator::setup_process(const application_settings& app_settings)
|
||||
this->dispatcher.setup(ntdll->exports, ntdll_data, win32u->exports, win32u_data);
|
||||
|
||||
const auto main_thread_id = context.create_thread(this->memory, this->mod_manager.executable->entry_point, 0,
|
||||
this->mod_manager.executable->size_of_stack_commit, false);
|
||||
this->mod_manager.executable->size_of_stack_commit, false, true);
|
||||
|
||||
switch_to_thread(*this, main_thread_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user