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
2
votes
1 answer

What function would I need to hook (using easy hook) to prevent minimize of a third party application?

I'm trying to write a simple thing that prevents a third party application from being able to minimize. I'm going to use EasyHook as I think that's the easiest way of doing this. My code is going to be in C#. I've been looking at the examples in the…
TheKrush
  • 81
  • 1
  • 6
2
votes
1 answer

Using GetProcAddress and EasyHook to hook class methods and constructors

I've had plenty of success using EasyHook to hook system API routines (in C++) out of libraries. These libraries have always been flat and basically filled with globally callable routines. Here is a small sample using MessageBeep() out of the…
Ultratrunks
  • 2,464
  • 5
  • 28
  • 48
2
votes
1 answer

c# EasyHook, window title change

sorry, but I must put chunk of code so you could understand. using System; using System.Collections.Generic; using System.Text; using System.Threading; using System.Runtime.InteropServices; using System.Text.RegularExpressions; using…
big.tuna
  • 53
  • 1
  • 1
  • 5
2
votes
1 answer

How to intercept Win32 API calls with C#?

I would like to either host a virtual drive and intercept the I/O, or intercept I/O calls to certain folders on a hard drive, and do arbitrary things to that call like write the file to a 2nd location. For example, if Notepad.exe writes a file to…
Robert Seder
  • 1,390
  • 1
  • 9
  • 19
2
votes
1 answer

Notify when new appdomain created in the process

Consider next situation. I have injected my managed dll into the process using EasyHook. EasyHook injects dll using separate AppDomain. Now I need a way to get notifications about creation of new AppDomain in the current process. So the question is…
2
votes
1 answer

Could not load file or assembly SharpDX

I use easyhook and SharpDX to get fps data from a DirectX game. Sometimes it works. However, when I start it next time (maybe just some minutes later), it throws the exception System.IO.FileNotFoundException: Could not load file or assembly SharpDX.…
2
votes
1 answer

How to get EasyHook to work?

I'm trying to learn how easyhook works for an upcoming project. For this, I decided to try and hijack GetMonitorInfoW and GetDeviceCaps in firefox.exe process to get window.screen.width and height to return crazy values. Here is what I…
Arsen Zahray
  • 24,367
  • 48
  • 131
  • 224
2
votes
1 answer

EasyHook, .NET Remoting sharing interface between both client and server?

How can both the IPC client and IPC server call the shared remoting interface (the class inheriting MarshalByRefObject) to communicate, without having to put the interface class inside in the injecting application? For example, if I put the…
Jason
  • 6,878
  • 5
  • 41
  • 55
2
votes
1 answer

How to change NotifyIcon's context menu in explorer.exe?

I want to extend the default Speakers notificon's (tray icon) right-click context menu with a new item. Also, I want to handle the mouseclick using C++. Illustration What I know so far I learned how to dll-inject using CreateRemoteThread(),…
sabvente
  • 144
  • 8
1
vote
1 answer

Hooking into Win32 printing API from C# using EasyHook

Something similar was asked before, but didn't receive any answers. My question is a bit more generic. I'm looking for a way to use EasyHook library in a C# app that would enable me to intercept the key printing API calls from, say, notepad.exe. My…
aoven
  • 2,248
  • 2
  • 25
  • 36
1
vote
0 answers

EasyHook sample project "RemoteFileMonitor" get a unexpected result

I have downloaded the project 'RemoteFileMonitor' here: https://github.com/EasyHook/EasyHook-Tutorials/tree/master/Managed/RemoteFileMonitor This project generate a console log of all files opened by an input process id. the application run without…
user3449922
1
vote
2 answers

EasyHook with original function call

I am developing an application, that uses EasyHook library to inject code to desired process and intercept calls from a specific dll. In my case the library is Oracle Call Interface, OCI.dll. I want to intercept executed sql statements in order to…
prelektr
  • 11
  • 1
  • 4
1
vote
0 answers

Solution to Hook methods of 3-d party managed assembly

I am looking for a way to inject(add/replace) code of methods in 3-d party managed .NET assemblies during run-time. I am doing this using C# in VS2017. I tried: PlayHooky(https://github.com/wledfor2/PlayHooky), works great, but it does not support…
1
vote
1 answer

Easyhook: How to hook a function from a DLL loaded with LoadLibrary

I have been playing with EasyHook for a while now and have been very successfull with statically linked DLLs. Now I tried to hook a function from a DLL that is dynamically loaded from the Host Application using the same approach as with the…
rollstuhlfahrer
  • 3,988
  • 9
  • 25
  • 38
1
vote
1 answer

Easyhook raises a System.NotSupportedException

I'm still trying to fully understand hooking and how easyhook works. I've now written a simple example: a form that contains a webbrowser element, and i'm trying to hook recv calls made from that. When compiling, the program returns this error: A…
kaharas
  • 597
  • 2
  • 17
  • 39