Search code examples
c#dllgac32-biteasyhook

EasyHook Inject - ArgumentException "The given 32-bit library doesn't exist"




I'm trying to inject a dll using EasyHook's

RemoteHooking.Inject(pid, InjectionOptions.Default, debug_dllPath_32, debug_dllPath_64, channel);

Unfortunately this throws an ArgumentException "STATUS_INVALID_PARAMETER_4: The given 32-Bit library does not exist! (Code: 2)" although im 100% sure the path is correct and that the dll referenced is a 32-bit library (Platform Target: x86)


Before that I register the dll's in the GAC using

Config.Register("desc", debug_dllPath_32, debug_dllPath_64);


Where is my mistake?


Solution

  • That is because EasyLoad32/64.dll are not correctly present.


    Now this is pretty easy to solve

    • Install EasyLoad32/64.dll in GAC
    • include EasyLoad32/64.dll in application directly

    Please feel free to ask any questions you might have.

    Edit: Found same question here, Link