I'm trying to use EasyHook from my own code (C# with VS2008 Express with AnyCPU configuration on Win7 64-bit) and otherwise it works except that when the Config.Register-call is done, it opens a dialog with the following text:
Windows Service Start Failure
Cannot start service from the command line or debugger. A Windows Service must be first installed (using installutil.exe) and then started with the ServerExplorer, Windows Services Administrative Tool or the NET START command.
The weird thing is that if I take the ProcessMon-source code and run it, everything works and I don't get that error on the Config.Register. I get it only with my own code. And NOTE: The injection itself works perfectly from my own code also, it's only the
Config.Register that is unable to start those services. When the dismiss the dialog with Ok-button, things work just fine, but obviously the registered DLLs are not removed grom GAC after my program ends. They are removed just fine with the ProcessMon-source
Any ideas what might be the issue? I am running VS2008 Express as Admin so that can't be it. And besides, I don't get any errors about not having admin rights.
Note that I have a slightly different structure in my code than the processmon-stuff:
a) Injected DLL
b) A library-DLL that has the remote-proxy and makes the Config.Register-calls etc
c) A separate Windows GUI app that calls the library-DLL that does the hooking calls.
Could that be the issue...?