Build 2.7.5292.0 does not inject successfully

Nov 6, 2014 at 6:35 PM
Edited Nov 6, 2014 at 6:36 PM
I tried upgrading to the new EasyHook Beta release today, however it seems like there's some kind of problem, or it's backwards incompatible.

If I place the new EasyLoad DLL files next to the EasyHook DLLs when starting the exe, it crashes in the Inject call with "STATUS_INTERNAL_ERROR: Unknown error in injected C++ completion routine. (Code: 15)".

I then tried removing the EasyLoad files and giving it a try without the AppDomain loading, however I get another exception with the following message:
"STATUS_INVALID_PARAMETER_4: The given 32-Bit library does not exist! (Code: 2)"

I can reproduce these errors by just switching out the EasyHook files from v2.7.5159.0 to v2.7.5292.0 and back. Was there some kind of change to the public API?
Nov 7, 2014 at 11:06 AM
Edited Nov 7, 2014 at 11:07 AM
Code: 15 means that the EasyLoad.Load method did not return the correct value. Could you try attaching the debugger to the target and stepping through EasyLoad\Loader.cs ? This method simply proxies the call to the previous EasyHook.InjectionLoader so that it is run from within a new AppDomain.

What target application are you trying? What .NET version? I can see that it is a 32-bit application.
Nov 7, 2014 at 1:17 PM
Okay I tried to reproduce it somehow and ended up with this: the error occurs only if I use the prebuilt C# binaries.

When I build EasyLoad32.dll and EasyHook.dll myself and copy EasyHook32.dll from the prebuilt ones (because I suck at the build env), it works.
As far as I remember from yesterday I was also testing with the x64 notepad.exe and tried .NET 3.5, 4.0 and 4.5.1, all with the same result.

I gotta test a bit further, but I may be content with just dropping in my own DLL.

P.S.: Actually it only seems to be necessary to rebuild EasyLoad32.dll. Using the prebuilt EasyHook.dll seems to not affect this either.
Nov 7, 2014 at 10:07 PM
Ok could you let me know if you track this down, if there is an issue with the binary release under certain circumstances I would like to get it fixed.

Cheers,
J