Weird error with : EasyHook.Config.RunCommand

Jan 15, 2010 at 2:43 AM

 

Message : Unable to run internal command.
Stack :    à EasyHook.Config.RunCommand(String InFriendlyName, Boolean InWaitForExit, Boolean InShellExecute, String InPath, String InArguments)
   à EasyHook.Config.Register(String InDescription, String[] InUserAssemblies)
   à OProcess.Program.Main(String[] args) dans C:\Documents and Settings\Administrateur\Mes documents\Visual Studio 2010\Projects\HookTest\HookTest\Program.cs:ligne 61
Source : EasyHook
Inner : System.ComponentModel.Win32Exception: Le fichier spécifié est introuvable
   à System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   à System.Diagnostics.Process.Start()
   à EasyHook.Config.RunCommand(String InFriendlyName, Boolean InWaitForExit, Boolean InShellExecute, String InPath, String InArguments)
Help :
Target : Void RunCommand(System.String, Boolean, Boolean, System.String, System.String)

 

I'm trying to hook OpenProcess, and when launching the signed executable and dll i got that error :

[ ERROR MESSAGE ]

Message : Unable to run internal command.
Stack :    à EasyHook.Config.RunCommand(String InFriendlyName, Boolean InWaitForExit, Boolean InShellExecute, String InPath, String InArguments)
   à EasyHook.Config.Register(String InDescription, String[] InUserAssemblies)
   à OProcess.Program.Main(String[] args) dans C:\Documents and Settings\Administrateur\Mes documents\Visual Studio 2010\Projects\HookTest\HookTest\Program.cs:ligne 61
Source : EasyHook
Inner : System.ComponentModel.Win32Exception: Le fichier spécifié est introuvable
   à System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   à System.Diagnostics.Process.Start()
   à EasyHook.Config.RunCommand(String InFriendlyName, Boolean InWaitForExit, Boolean InShellExecute, String InPath, String InArguments)

Target : Void RunCommand(System.String, Boolean, Boolean, System.String, System.String)

 

[ Source Code ]

in class Main : EasyHook:IEntryPoint :

OpenProcessHook = LocalHook.Create(
                    LocalHook.GetProcAddress("kernel32.dll", "OpenProcessW"),
                    new DOpenProcess(OpenProcess_Hooked),
                    this);
OpenProcessHook.ThreadACL.SetExclusiveACL(new Int32[] { 0 }); 

 

in OpenProcessHook :

Config.Register(
                        "OpenProcess Hooking.",
                        "HookTest.exe",
                        "OpenProcessHook.dll");

Full Source code here : http://pastebin.com/m2085f9ba

 

 

 

Jan 15, 2010 at 4:28 AM

same problem here, though after solving somehow this problem now whatever function i try to hook i get a system missing method exception. Like if the api method i try to hook has been declared with wrong signature or something.

Thanx in advance for your help and sorry for my bad english.

Jan 15, 2010 at 5:08 AM

I figured out myself, i copied all dll and .exe from EasyHook project to my project directory and it's working now :D

Jan 15, 2010 at 5:16 PM

could you please attach somewhere your project please?

Jan 28, 2010 at 7:15 PM

I have the same problem, I try nopz's solution and don't work. 

could you please attach somewhere your project please?[2]

Jan 28, 2010 at 7:27 PM

most likely you have the wrong namespaces.

May 3, 2012 at 10:01 PM

Long time whiout solution...

But is easy most of time check if all the files of EasyHook needs are in same place like your app