Reloaded.Core.Bootstrap icon indicating copy to clipboard operation
Reloaded.Core.Bootstrap copied to clipboard

Using this example in a DLL?

Open HeroXx opened this issue 2 years ago • 1 comments

I'm having problems translating this into a DLL startup. I've tried expanding out the bootstrap example to use DllMain and running the CLR from within the attach but injection always fails.

I don't suppose you have any guidance you could give?

HeroXx avatar Sep 16 '22 10:09 HeroXx

Loading libraries from DllMain will cause a deadlock due to the loader lock.

Consider starting a separate thread and starting the runtime from there. Example.

Alternatively, if you need your code to execute as part of startup before target process' code; either start the process suspended, inject into that and resume when done; or hijack one of the DLLs supported by the application and run your bootstrapper from there (like ASI loaders etc. do)

Sewer56 avatar Sep 16 '22 14:09 Sewer56