Comments (4)
Are you injecting into another process?
The problem appears to be less EasyHook specific, and more about the environment you are working within. LocalHook.GetProcAddress
is simply calling the native kernel32.dll GetModuleHandle
and GetProcAddress
.
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
public static extern IntPtr GetModuleHandle(String InPath);
[DllImport("kernel32.dll", CharSet=CharSet.Ansi)]
public static extern IntPtr GetProcAddress(IntPtr InModule, String InProcName);
from easyhook.
Can you try using manual calls to GetModuleHandle
, and GetProcAddress
?
from easyhook.
Yeah, this is what I did:
IntPtr hand = GetModuleHandle(dll);
IntPtr pAdd = GetProcAddress(hand, function);
IntPtr ptr = LocalHook.GetProcAddress(dll, function);
LocalHook h = LocalHook.Create(LocalHook.GetProcAddress(dll, function), proc, this);
With log statements after each one. The only one that failed was the Create call. Thanks for the responses.
from easyhook.
@arshrp sorry for the long delay, did the LocalHook.Create work for you when specifying the address using the manual call to GetProcAddress? If so I am thinking of closing this issue, otherwise I may need a simple sample app to test properly.
from easyhook.
Related Issues (20)
- -
- Hook stop in some messages HOT 16
- make the hooks permanent by modifying the binary HOT 1
- hook a non windows api function HOT 1
- EasyHook adding the executing dir to the system path HOT 3
- WOW64 barrier causing problem between release and debug builds
- Use EashHook to hook compileMethod of c# JIT, the program will crash HOT 3
- IpcServerChannel memory leak
- create and attatch blender crash
- Compilar Easyhook, code::block y dev-c++
- Injection DLL has exited, but EasyHook.dll is never released HOT 3
- Void hook skips original function causing crash HOT 3
- Hooking IDirect3DDevice9::CreateTexture fails HOT 2
- Add EasyHook as an embedded resource
- I don't understand how to send messages back in the tutorial HOT 3
- Error when loading a self-contained DLL
- i cant take target directx versions HOT 1
- App is cant taking without directx HOT 4
- Not Supported .NET Core delegate*
- Easyhook Native NuGet package dosn't work with newer build tools
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easyhook.