Click here to Skip to main content
15,911,711 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to store and retrieve data from database via internet using VC++2008 Pin
Richard MacCutchan6-Aug-13 4:45
mveRichard MacCutchan6-Aug-13 4:45 
GeneralMessage Automatically Put Back Pin
Erudite_Eric6-Aug-13 4:33
Erudite_Eric6-Aug-13 4:33 
GeneralRe: How to store and retrieve data from database via internet using VC++2008 Pin
Rolf Kristensen3-Aug-13 1:01
Rolf Kristensen3-Aug-13 1:01 
AnswerRe: How to store and retrieve data from database via internet using VC++2008 Pin
jschell2-Aug-13 14:26
jschell2-Aug-13 14:26 
QuestionDevice context and dimensions Pin
Argonia1-Aug-13 4:54
professionalArgonia1-Aug-13 4:54 
QuestionHooking a running process 's Innermost dll's function Pin
dileep Perumbavoor1-Aug-13 1:26
dileep Perumbavoor1-Aug-13 1:26 
AnswerRe: Hooking a running process 's Innermost dll's function Pin
Erudite_Eric1-Aug-13 1:34
Erudite_Eric1-Aug-13 1:34 
AnswerRe: Hooking a running process 's Innermost dll's function Pin
pasztorpisti1-Aug-13 1:40
pasztorpisti1-Aug-13 1:40 
A module function may be imported by many other modules. I've used 2 different approaches:

1. I hooked the import table of all modules that imported the function of my interest.

2. If there were too many modules that imported the function then I did the following: I've hooked the function of my interest by writing a jump into the first few bytes of the function that jumps to my code. Of course before the hook code jumps back to the original function it must execute the instructions that have been overwritten by teh jump, depending on the first few instructions you may have to copy more than a few bytes.

Advantages of #1: You don't have to mess around with the instructions of the hooked function like you have to with #2.
Disadvantages of #1: You have to find and hook the import table of all modules that import the specified function.

A possible mistake in both cases: The program may unload/reload hooked DLLs and in this case you have to be aware of this and you have to repatch after reload.

Almost forgot to mention: approach #1 is often called "API redirection". You can find good stuff by googling this.
And another thing I forgot: if it wouldn't be obvious this task is easiest to perform by injecting your own DLL with the hook code into the guest process. Work inside the hookable process and not from outside.

modified 1-Aug-13 7:48am.

AnswerRe: Hooking a running process 's Innermost dll's function Pin
Santhosh G_3-Aug-13 23:30
Santhosh G_3-Aug-13 23:30 
QuestionSaving console output to .txt/.html file using C++/VC++ Pin
pk jain31-Jul-13 3:30
pk jain31-Jul-13 3:30 
AnswerRe: Saving console output to .txt/.html file using C++/VC++ Pin
Richard MacCutchan31-Jul-13 3:58
mveRichard MacCutchan31-Jul-13 3:58 
AnswerRe: Saving console output to .txt/.html file using C++/VC++ Pin
pasztorpisti31-Jul-13 4:25
pasztorpisti31-Jul-13 4:25 
QuestionCString to float conversion Pin
tagopi31-Jul-13 0:32
tagopi31-Jul-13 0:32 
AnswerRe: CString to float conversion Pin
pasztorpisti31-Jul-13 0:49
pasztorpisti31-Jul-13 0:49 
QuestionCan we Directly write a Class Object with vectors as member into FILE ? Pin
002comp31-Jul-13 0:26
002comp31-Jul-13 0:26 
AnswerRe: Can we Directly write a Class Object with vectors as member into FILE ? Pin
pasztorpisti31-Jul-13 0:38
pasztorpisti31-Jul-13 0:38 
GeneralRe: Can we Directly write a Class Object with vectors as member into FILE ? Pin
002comp31-Jul-13 1:34
002comp31-Jul-13 1:34 
GeneralRe: Can we Directly write a Class Object with vectors as member into FILE ? Pin
pasztorpisti31-Jul-13 1:50
pasztorpisti31-Jul-13 1:50 
GeneralRe: Can we Directly write a Class Object with vectors as member into FILE ? Pin
002comp31-Jul-13 2:23
002comp31-Jul-13 2:23 
GeneralRe: Can we Directly write a Class Object with vectors as member into FILE ? Pin
pasztorpisti31-Jul-13 4:03
pasztorpisti31-Jul-13 4:03 
GeneralRe: Can we Directly write a Class Object with vectors as member into FILE ? Pin
002comp31-Jul-13 18:11
002comp31-Jul-13 18:11 
GeneralRe: Can we Directly write a Class Object with vectors as member into FILE ? Pin
pasztorpisti31-Jul-13 22:37
pasztorpisti31-Jul-13 22:37 
QuestionOrder of Overlapped Operations Pin
Richard Andrew x6430-Jul-13 21:58
professionalRichard Andrew x6430-Jul-13 21:58 
AnswerRe: Order of Overlapped Operations Pin
Randor 30-Jul-13 22:52
professional Randor 30-Jul-13 22:52 
GeneralRe: Order of Overlapped Operations Pin
Richard Andrew x6430-Jul-13 23:01
professionalRichard Andrew x6430-Jul-13 23:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.