Click here to Skip to main content
15,909,530 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Get/Kill focus in MFC Pin
geoyar6-Aug-10 16:08
professionalgeoyar6-Aug-10 16:08 
GeneralRe: Get/Kill focus in MFC Pin
Code-o-mat6-Aug-10 22:40
Code-o-mat6-Aug-10 22:40 
GeneralRe: Get/Kill focus in MFC Pin
geoyar7-Aug-10 10:01
professionalgeoyar7-Aug-10 10:01 
GeneralRe: Get/Kill focus in MFC Pin
Code-o-mat7-Aug-10 10:17
Code-o-mat7-Aug-10 10:17 
QuestionPosting a lot of data messages to MFC-based GUI Pin
kirilo_l4-Aug-10 5:30
kirilo_l4-Aug-10 5:30 
AnswerRe: Posting a lot of data messages to MFC-based GUI Pin
Chris Meech4-Aug-10 6:46
Chris Meech4-Aug-10 6:46 
Questiondebugging sprintf -VS/C++ Pin
Alan Kurlansky4-Aug-10 5:07
Alan Kurlansky4-Aug-10 5:07 
AnswerRe: debugging sprintf -VS/C++ Pin
Aescleal4-Aug-10 5:29
Aescleal4-Aug-10 5:29 
AnswerRe: debugging sprintf -VS/C++ Pin
Moak5-Aug-10 2:41
Moak5-Aug-10 2:41 
QuestionHow to create a dll wrapper Pin
VentsyV4-Aug-10 4:11
VentsyV4-Aug-10 4:11 
AnswerRe: How to create a dll wrapper Pin
Phil J Pearson4-Aug-10 4:31
Phil J Pearson4-Aug-10 4:31 
JokeRe: How to create a dll wrapper Pin
Sauro Viti4-Aug-10 4:38
professionalSauro Viti4-Aug-10 4:38 
GeneralRe: How to create a dll wrapper Pin
VentsyV4-Aug-10 5:33
VentsyV4-Aug-10 5:33 
GeneralRe: How to create a dll wrapper Pin
Aescleal4-Aug-10 5:55
Aescleal4-Aug-10 5:55 
GeneralRe: How to create a dll wrapper Pin
VentsyV4-Aug-10 6:09
VentsyV4-Aug-10 6:09 
AnswerRe: How to create a dll wrapper Pin
Aescleal4-Aug-10 5:02
Aescleal4-Aug-10 5:02 
I wouldn't try using library interpositioning for this sort of thing. While you can implement a DLL that calls selectively forwards functions to another DLL it ends up being a bit of a headache [1]. The approach I tend to use is...

- wrap the DLL in a class
- extract an interface class out of the class you've implemented (all the functions are pure virtual)
- implement the interface again, passing the bits you want through to the DLL and reimplementing the bits you don't want to
- select at runtime or compile time (depending on the type of testing you want to do) which implementation of the interface you want to use

This method is something to consider with any third party library so when it doesn't work properly you've got a central point to either replace it or patch its functionality.

Cheers,

Ash

[1] If you really want to do use library interpositioning then...

- reimplement the entire interface of the wrapped DLL, starting off by just returning succeeded, true, whatever is appropriate
- reimplement the functions you want to pass through by (a) manually loading the wrapped DLL and (b) calling the wrapped function
- reimplement the bits you don't want to pass through however you want

This saves the balls ache of link order of the wrapping and wrapped libraries.
GeneralRe: How to create a dll wrapper Pin
VentsyV4-Aug-10 5:31
VentsyV4-Aug-10 5:31 
GeneralRe: How to create a dll wrapper Pin
Aescleal4-Aug-10 5:47
Aescleal4-Aug-10 5:47 
GeneralRe: How to create a dll wrapper Pin
VentsyV4-Aug-10 6:11
VentsyV4-Aug-10 6:11 
GeneralRe: How to create a dll wrapper Pin
Aescleal4-Aug-10 7:54
Aescleal4-Aug-10 7:54 
AnswerRe: How to create a dll wrapper Pin
Shivanand Gupta5-Aug-10 0:40
Shivanand Gupta5-Aug-10 0:40 
Questioncompile file exe Pin
albertodiprima4-Aug-10 3:51
albertodiprima4-Aug-10 3:51 
AnswerRe: compile file exe Pin
Cedric Moonen4-Aug-10 3:57
Cedric Moonen4-Aug-10 3:57 
GeneralRe: compile file exe Pin
albertodiprima4-Aug-10 4:05
albertodiprima4-Aug-10 4:05 
AnswerRe: compile file exe Pin
Sauro Viti4-Aug-10 3:59
professionalSauro Viti4-Aug-10 3:59 

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.