Link to home
Start Free TrialLog in
Avatar of philter
philter

asked on

How to inject a dll into a process and extract a bitmap from a static control?

Avatar of philter
philter

ASKER

I need help writing the dll that will enumerate over the child windows and find the bitmap...I need to extract info out of a closed source app...
Refer
https://www.experts-exchange.com/questions/20371701/subclassing-window.html

I already posted the code to inject dll into another process space.
Avatar of ambience
this might help

"Load Your 32-bit DLL into Another Process's Address Space Using INJLIB"

http://www.microsoft.com/msj/code1993to1997/MSJMAY94.exe
By the way most of these articles discuss the use of CreateRemoteThread and other registry methods to load dll into other processes .. theres another eaiser way of doing that by using ShLoadInProc.

i guess you might have a look at that too..
I'm probably missing the point, (maybe you need this in real time)but...
you can open the exe in the resource editor if it is just a static bitmap you want to acquire. (Plus if the window is visible you don't need to get into his address space to simply blit your own copy of a visible bitmap.)
Avatar of philter

ASKER

Ggrundy - yes, if all i needed was a static screen shot, I'd just hit the Print Screen key ;-)  Too bad this isn't that easy...
Avatar of philter

ASKER

BeyondWu,

hook.cpp(67) : error C2491: 'SubClassWindowEx' : definition of dllimport function not allowed

http://www.complete-ideas.com/cpp/testhook.zip
ASKER CERTIFIED SOLUTION
Avatar of BeyondWu
BeyondWu
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of philter

ASKER

maybe i need to hire you BeyondWu as a consultant (to help me with this) philyer@hotmail.com if you are interested...
Hehe...Seems good.
My email is BeyondWu@yahoo.com