Questions tagged [easyhook]

Use this tag when your code uses the EasyHook open-source library that supports hooking unmanaged APIs with managed code.

Use this tag when your code uses the EasyHook open-source library that supports hooking unmanaged APIs with managed code.

EasyHook makes it possible to extend (via hooking) unmanaged code APIs with pure managed functions, from within a fully managed environment on 32- or 64-bit Windows. EasyHook supports injecting assemblies built for .NET Framework as well as native DLLs.

108 questions
1
vote
2 answers

System.DllNotFoundException using EasyHook in Visual Studio 2010

I've the following code: try { Debug.WriteLine("Hook Start"); RecvHook = LocalHook.Create( LocalHook.GetProcAddress("ws2_32.dll", "recv"), new Drecv(recv_Hooked), …
kaharas
  • 597
  • 2
  • 17
  • 39
1
vote
1 answer

Application hooking (winsock) from c++/c#

I got an (old) application that calls to the winsocket function: struct hostent* FAR gethostbyname( __in const char *name ); It currently imports it as ws32_dll.#52 instead the normal name calling. My intention is just to be able to do something…
Ragnagard
  • 191
  • 5
  • 16
1
vote
1 answer

EasyHook DrawTextW user32.dll Injection, Application crashing

I'm using EasyHook too hook calls to DrawTextW, while testing with notepad, if I open Help -> About, It captures all the text that appears on the screen as expected. However, if I open File -> Open, Notepad crashes. I don't expect it to capture any…
williamt
  • 413
  • 2
  • 4
  • 15
1
vote
1 answer

Windows Cmd Hook not working

i am trying to hook the CreateProcess under cmd.exe. i manage to inject the dll the the cmd process but after the injection the dll process detach message receive and i fail to hook the createprocess function call. i am using easyhook. my…
Omega Doe
  • 325
  • 1
  • 2
  • 17
1
vote
0 answers

EasyHook: Injected application crashes on LhInstallHook

I am using EasyHook to inject a DLL into a 64bit application. The basic hooking seems to work but as soon as the DLL calls the "LhInstallHook" method the injected application crashes. I think that I have found the right address/offset for the…
Xenira
  • 81
  • 7
1
vote
1 answer

How to correctly hook and return GetDlgItemTextA from C++ to C# to C++ from EasyHook

I'm using EasyHook, a C# library for injecting and detouring functions from unmanaged applications. I'm trying to hook onto GetDlgItemTextA, which takes the arguments: UINT WINAPI GetDlgItemText( __in HWND hDlg, __in int nIDDlgItem, __out …
Gbps
  • 857
  • 2
  • 14
  • 29
1
vote
1 answer

linker problems for EasyHook in Visual C++ 10

I have downloaded EasyHook 2.7 source and I try to compile it in my Visual Studio 2012 environment. After solving a lot of warnings, I have found other warnings that I cannot solve, and these are: 1>error.obj : error LNK2019: unresolved external…
jstuardo
  • 3,901
  • 14
  • 61
  • 136
1
vote
1 answer

EasyHook .NET 4.0.x dllNotFound in EasyHook EasyHook32.dll

I'm using EasyHook in my c# project and have included easyhook.dll as a reference for the project. I tried to add easyhook32.dll and easyhook64.dll, however Visual Studio says A reference to [path/to/easyhook32.dll] could not be added. Please make…
walshie4
  • 1,396
  • 2
  • 11
  • 16
1
vote
0 answers

Application Verifier causes hooked x64 application with EasyHook to crash

Currently there is the next problem when EasyHook is used and Application Verifier is enabled. If appverifier disabled application works, but with application verifier enabled target application crashes. And its rather critical to have application…
1
vote
1 answer

Hooking NtCreateFile API from ntdll.dll with EasyHook (c#)

This is the first time I try to hook windows API. My goal is to monitor all files that a process is going to create/open/read/write. In order to be the most verbose possible, I decided to hook the ntdll.dll API such as NtCreateFile() and…
Alberto Geniola
  • 145
  • 2
  • 8
1
vote
1 answer

Intercepting / Redirecting outgoing http connections on windows

i am looking to redirect outgoing http connections (which do not use the system proxy) on a windows machine. Background: I have some legacy software that interacts with a now defunct web service. I have emulated that service in a simple desktop…
Steve
  • 20,703
  • 5
  • 41
  • 67
1
vote
1 answer

Accessing native objects via C++/CLI from C#!

I have written a C# application that injects a DLL into a third-party executable (which happens to have been built using the Qt framework). This DLL uses EasyHook to intercept calls to a number of specific functions. When my injected code is called,…
1
vote
1 answer

Converting Direct2D texture to memory stream crashes the app

I am trying to hook Directx11 IDXGISwapChain.Present for getting screenshots using the Direct3DHook library and EasyHook. I guess the Direct3DHook is written for Single screenshots and I am trying to extend it to get a stream of screenshots. After…
pkumar0
  • 2,069
  • 3
  • 14
  • 21
1
vote
0 answers

How can I get this easyhook demo run?

I'm trying to get this easyhook demo run on my computer, but don't know how. I have little experience in windows programming. They have a tutorial on easyhook in this http://easyhook.codeplex.com/downloads/get/61179 At first they present a demo, but…
cloudygoose
  • 608
  • 1
  • 6
  • 16
1
vote
1 answer

EasyHook and CallWndProc

I am desperately trying and failing to hook CallWndProc using EasyHook. Intptr addr = LocalHook.GetProcAddress("user32.dll", "CallWndProc"); This throws with "The given method does not exist.". So I'm guessing either CallWndProc isn't in…
Antony Woods
  • 4,415
  • 3
  • 26
  • 47