Problem Solved

Feb 17, 2010 at 11:29 AM

 

I am having trouble on the RemoteHooking.Inject line. I get a MissingMethodException: "Constructor on type 'WormholeInject.WormholeInject.WormholeInject' not found".


Here is my injector:
 
Imports EasyHook
Public Class Form1
    Private Sub Attach()
        Config.Register("Wormhole", "Wormhole.exe", "WormholeInject.dll")
        Dim EProc As Process = Nothing
        For Each Proc As Process In Process.GetProcesses
            If Proc.ProcessName.ToLower() = "exefile" Then
                EProc = Proc
                Exit For
            End If
        Next
        RemoteHooking.Inject(EveProc.Id, "WormholeInject.dll", "WormholeInject.dll", "")
        MsgBox("Hooked!", MsgBoxStyle.Information)
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Attach()
    End Sub
End Class

Here is my DLL:
Imports EasyHook
Namespace WormholeInject
    Public Class WormholeInject
        Implements EasyHook.IEntryPoint
        Public Sub Constructor(ByVal InContext As RemoteHooking.IContext, ByVal Code As String)
            MsgBox("This is the constructor!")
        End Sub
        Public Sub Run(ByVal InContext As RemoteHooking.IContext, ByVal Code As String)
            MsgBox("This is the run!")
        End Sub
    End Class
End Namespace


I am new to EasyHook, and am just trying to get some simple code running in a process. Any help is greatly appreciated!
 



 

Feb 17, 2010 at 6:53 PM

Problem solved. Changed the name of my constructor method to New.