Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

hook DLL is not loaded into the address space of the targeted process

Posted on 2004-04-26
3
Medium Priority
?
321 Views
Last Modified: 2008-03-03
I 've made a DLL for hooking into process and i cant get el GetCurrentProcess from them. Its works as a forward message and not as a DLL injected in every process.

My test:

When i detect WM_LBUTTONUP i send a message to my own exe where the LParam is the GetCurrentProcess() called from de DLL.

Type of Hook: WH_JOURNALRECORD

Type inject: SetWindowsHookEx (WH_JOURNALRECORD, @CustomProc, hHookLib, 0);
where hHookLib is the values from LoadModule.

i need get on every WM_LBUTTONUP the current process id to be sure i am in the same process space in order to patch a memory address.

Thanx,
Daniel Sp


0
Comment
Question by:Churo
3 Comments
 
LVL 22

Accepted Solution

by:
cookre earned 2000 total points
ID: 10923391
If only you could get the hWnd for the target, a call to GetWindowThreadProcessId() would give you its PID.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Starting up a Project

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question