STATUS_INVALID_PARAMETER_4: Unable to find the required managed entry point in the given 32-bit library. (Code: 12)

Jul 31, 2009 at 11:03 AM

Hi everyone,

I tried to create my first EasyHook project today, but I'm having a pretty impossible problem. I effectively copied the code from the ProcessMonitor example, so I really can't understand what is going on.

Here is the console application source: http://pastebin.com/m35a174f2 - and this class is included in the assembly: http://pastebin.com/m1b20ff4a

Here is the source for the injection DLL: http://pastebin.com/m753f959b

This is the exception message ( caught here: http://pastebin.com/m35a174f2 )

STATUS_INVALID_PARAMETER_4: Unable to find the required managed entry point in the given 32-bit library. (Code: 12)

Server stack trace:
   at EasyHook.NativeAPI.Force(Int32 InErrorCode)
   at EasyHook.RemoteHooking.InjectEx(Int32 InHostPID, Int32 InTargetPID, Int32 InWakeUpTID, Int32 InNativeOptions, String InLibraryPath_x86, String InLibraryPath_x64, Boolean InCanBypassWOW64, Boolean InCanCreateService, Object[] InPassThruArgs)
   at EasyHook.HelperServiceInterface.InjectEx(Int32 InHostPID, Int32 InTargetPID, Int32 InWakeUpTID, Int32 InNativeOptions, String InLibraryPath_x86, String InLibraryPath_x64, Boolean InCanBypassWOW64, Boolean InCanCreateService, Object[] InPassThruArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at EasyHook.HelperServiceInterface.InjectEx(Int32 InHostPID, Int32 InTargetPID, Int32 InWakeUpTID, Int32 InNativeOptions, String InLibraryPath_x86, String InLibraryPath_x64, Boolean InCanBypassWOW64, Boolean InCanCreateService, Object[] InPassThruArgs)
   at EasyHook.WOW64Bypass.Inject(Int32 InHostPID, Int32 InTargetPID, Int32 InWakeUpTID, Int32 InNativeOptions, String InLibraryPath_x86, String InLibraryPath_x64, Object[] InPassThruArgs)
   at EasyHook.RemoteHooking.InjectEx(Int32 InHostPID, Int32 InTargetPID, Int32 InWakeUpTID, Int32 InNativeOptions, String InLibraryPath_x86, String InLibraryPath_x64, Boolean InCanBypassWOW64, Boolean InCanCreateService, Object[] InPassThruArgs)
   at EasyHook.RemoteHooking.Inject(Int32 InTargetPID, String InLibraryPath_x86, String InLibraryPath_x64, Object[] InPassThruArgs)
   at SendMessageTest.Program.Main(String[] args) in C:\Users\Ben\Documents\Visual Studio 10\Projects\EasyHook 2.6\ConsoleApplication1\Program.cs:line 60

Dec 13, 2012 at 10:55 PM

I have the same problem with appStract.

 

Exception: System.ArgumentException  Message: STATUS_INVALID_PARAMETER_4: Unable to find the required managed entry point in the given 32-bit library. (Code: 12)  Source : AppStract.Host.Virtualization.Process.VirtualizedProcess.CreateAndInject()
Stack Trace:   at EasyHook.RemoteHooking.CreateAndInject(String InEXEPath, String InCommandLine, Int32 InProcessCreationFlags, String InLibraryPath_x86, String InLibraryPath_x64, Int32& OutProcessId, Object[] InPassThruArgs)   at AppStract.Host.Virtualization.Process.VirtualizedProcess.CreateAndInject()   at AppStract.Host.Virtualization.Process.VirtualizedProcess.Start()   at AppStract.Host.Virtualization.Process.Packaging.PackagingProcess.Start(VirtualProcessStartInfo startInfo)   at AppStract.Host.Virtualization.Process.Packaging.Packager.CreatePackage()   at AppStract.Manager.Packaging.PackagingHelper.RunPackagingSequence(PreConfigurationState preConfigurationState, ApplicationData applicationData, PackagedApplication& packagedApplication) in C:\Users\ovidiu\Documents\Visual Studio 2010\Projects\AppStract\AppStract.Manager\Packaging\PackagingHelper.cs:line 115

Apr 11, 2015 at 5:18 PM
Hello Team,

I have the same problem with EasyHook 2.5 used in AppStract which mozylon faced....

Error trace is as below:

Exception: System.ArgumentException
Message: STATUS_INVALID_PARAMETER_4: Unable to find the required managed entry point in the given 32-bit library. (Code: 12)
Source : AppStract.Host.Virtualization.Process.VirtualizedProcess.CreateAndInject()

Stack Trace:
at EasyHook.NativeAPI.Force(Int32 InErrorCode)
at EasyHook.RemoteHooking.InjectEx(Int32 InHostPID, Int32 InTargetPID, Int32 InWakeUpTID, Int32 InNativeOptions, String InLibraryPath_x86, String InLibraryPath_x64, Boolean InCanBypassWOW64, Boolean InCanCreateService, Object[] InPassThruArgs)
at EasyHook.RemoteHooking.CreateAndInject(String InEXEPath, String InCommandLine, Int32 InProcessCreationFlags, String InLibraryPath_x86, String InLibraryPath_x64, Int32& OutProcessId, Object[] InPassThruArgs)
at AppStract.Host.Virtualization.Process.VirtualizedProcess.CreateAndInject()
at AppStract.Host.Virtualization.Process.VirtualizedProcess.Start()
at AppStract.Host.Virtualization.Process.Packaging.PackagingProcess.Start(VirtualProcessStartInfo startInfo)
at AppStract.Host.Virtualization.Process.Packaging.Packager.CreatePackage()
at AppStract.Manager.Packaging.PackagingHelper.RunPackagingSequence(PreConfigurationState preConfigurationState, ApplicationData applicationData, PackagedApplication& packagedApplication) in C:\RnD\appstract\AppStract\AppStract.Manager\Packaging\PackagingHelper.cs:line 115

Need your help in resolving this.

Note: executing on Windows XP with .NET Visual Studio 4 with 3.5 framework.....
Coordinator
Apr 17, 2015 at 7:21 AM
Is there a reason you need to use 2.5? That version is no longer supported

maheshrudrachar wrote:
I have the same problem with EasyHook 2.5 used in AppStract which mozylon faced....