Thank you very much.
I'm trying to convert this to VB.NET, and works fine except one line.
(ProsH renamed to ProcessHandle)
Code:
CreateThread = CreateRemoteThread(ProcessHandle, vbNull, 0, LibAddress, DLLVirtLoc, 0, ThreadID)
The error:
Code:
************** Exception Text **************
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at WindowsApplication1.Form1.CreateRemoteThread(IntPtr ProcessHandle, Int64 lpThreadAttributes, IntPtr dwStackSize, IntPtr lpStartAddress, String lpParameter, Int64 dwCreationFlags, IntPtr lpThreadID)
at WindowsApplication1.Form1.InjectDll(String DllPath, IntPtr ProcessHandle)
at WindowsApplication1.Form1.Injection()
at WindowsApplication1.Form1.cmdInject_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.PerformClick()
at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
Any help is highly appreciated.
Thanks in advance.