Hi, madshi.I'm so happy to know that madCodeHook was updated to 4.0, with some useful improvements. We soon updated madCodeHook in our project, but we met a problem.

Our project was always protected by "Themida" a software protection system. It did well while the program using madCodeHook 3.x.x. However, after we updated madCodeHook to 4.0.2, the protected DLL can not be loaded by the main program(using the function InjectLibrary). If the DLL is not protected by "Themida", the main program can load the DLL successfully.So we doubt that there are problems to load a protected DLL by madCodeHook 4.0.

Which settings are you using specifically with TheMida on this DLL? Also, are you using any of its code macros? MCH 4.x parses the code signature information, if I had to make an educated guess I'd say TheMida might be throwing this code signature parsing that MCH does off and if a DLL can't be "validated" it will be refused to load