Closed AhmedZero closed 2 years ago
Almost certainly an issue with the target application and not the library as dependencies are loaded using the Windows loader (LoadLibraryW in this case) and can't really fail unless the target process is blocking the execution method or LoadLibraryW itself. If I had to guess it is likely the latter.
sometimes success and sometimes not.
Currently dependencies (i.e. kernel32) are loaded (or have their references increased) using the Windows loader, specifically LoadLibraryW as mentioned. This is invoked by creating a standard remote thread (using RtlCreateUserThread,) nothing special.
If you are using a modern version of Windows (i.e. a newer version of 10 or 11) this operation is pretty unlikely to fail or be unstable without some third party interference which could very well be the case with something like a game. Unless you've got a Windows error code returned by the function there's not much I can do to help.
Have a go and see if you can run the tests in the project - If so it's the process that you are injecting into that is the issue.
when i inject DLL to application, it shows me that
My program is X64 The target is x86.