does not export a proper type implementing the 'EasyHook.IEntryPoint' interface.

Dec 9, 2008 at 4:51 PM
Hi, I've recently started working with EasyHook and I've run into a little problem here that i can not seem to figure out alone,

When I'm running the following line of code;
RemoteHooking.Inject(TargetPID, "BA.Business.dll", "BA.Business.dll", ChannelName);

I get this error message "does not export a proper type implementing the 'EasyHook.IEntryPoint' interface."

The error speaks for it self but the class "Analyzer.cs" in the projekt "BA.Business" does implement the IEntryPoint, the required methods and BA.Business has been referenced from the Application. (Code below)

    public class Analyzer : EasyHook.IEntryPoint
    {
        AnalyzerInterface Interface;
        LocalHook CreateFileHook;
        Stack<String> Queue = new Stack<String>();

        public Analyzer(RemoteHooking.IContext InContext, String InChannelName)
        {
            // connect to host...
            Interface = RemoteHooking.IpcConnectClient<AnalyzerInterface>(InChannelName);
            Interface.Ping();
        }
        public void Run(RemoteHooking.IContext InContext, String InChannelName)
        {
            Interface.IsInstalled(RemoteHooking.GetCurrentProcessId());

            // wait for host process termination...
            try
            {
                while (true)
                {
                    Thread.Sleep(500);

                    // transmit newly monitored file accesses...
                    if (Queue.Count > 0)
                    {
                        String[] Package = null;

                        lock (Queue)
                        {
                            Package = Queue.ToArray();

                            Queue.Clear();
                        }

                        Interface.OnCreateFile(RemoteHooking.GetCurrentProcessId(), Package);
                    }
                    else
                        Interface.Ping();
                }
            }
            catch
            {
                // NET Remoting will raise an exception if host is unreachable
            }
        }
    }

Does anyone know what I'm doing wrog here?


Another thing i had to do was to copy the EasyHook32.dll and EasyHook32Svc.exe into the Appilication Project to make Config.Register() work, an error ".\EasyHook32Svc.exe could not be found" was thrown, is there another cleaner way to do this?
Dec 10, 2008 at 11:41 AM
Problem Solved - a reboot sorted out the problem!
Dec 10, 2008 at 2:27 PM
Yes you have to be careful because the libraries are installed in the gac. and if they don't get updated properly maybe the GAC version still lacks the interface...

No the files have to be in the app directory.
Jan 11, 2009 at 3:15 PM
I had to re-start the "target" process so that the new fresh dll could be injected, i guess the old dll were still injected and couldn't be overwritten/released unless a re-start of the target process occured.