Click here to Skip to main content
15,923,226 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionTrapping HTML w/out proxy??? Pin
10-Feb-01 13:32
suss10-Feb-01 13:32 
AnswerRe: Trapping HTML w/out proxy??? Pin
Michael Dunn10-Feb-01 17:07
sitebuilderMichael Dunn10-Feb-01 17:07 
AnswerRe: Trapping HTML w/out proxy??? Pin
11-Feb-01 11:05
suss11-Feb-01 11:05 
GeneralTransparent CStatic Pin
Tim Jones10-Feb-01 6:10
Tim Jones10-Feb-01 6:10 
GeneralRe: Transparent CStatic Pin
Joe Moldovan10-Feb-01 13:07
Joe Moldovan10-Feb-01 13:07 
General"Don't ask me this again" Pin
10-Feb-01 5:45
suss10-Feb-01 5:45 
GeneralRe: "Don't ask me again" Pin
Daniel Ferguson12-Feb-01 9:25
Daniel Ferguson12-Feb-01 9:25 
GeneralRe: Pin
12-Feb-01 13:51
suss12-Feb-01 13:51 
How are you hooking the MessageBox? do you simply replace the function pointer! if so you know what parameters are on the stack - as your hook function probably has the same prototype - we'll start with the basics a single exe multiple MessageBox calls note this is all off the top of my head -

Within the MessageBox replacement function get the return address off the stack this will be unique and the same everytime you call the function from a specifi place in the code (remeber were dealing in basics here)now if the user selects 'Don't ask me again' save the executable name + path and the address of the call (registry/flat file). Now if you restart the app get all the entries from the registry/file bingo you'll know what MessageBoxes not to show.

Things as far as see can get a little more complicated when dealing with DLL's that show MessageBoxes (something I'm totally against) the reason is rebasing! lets assume that the developer of an app ensured that none of his DLL's clashed when loading and hence no rebasing took place - the address will always be unique as in the simple case above. But if rebasing did occur then your addresses may change with each application run. (I'm thinking of running within a different proces such as IE and it loading ActiveX controls for instance)

So he's what I suppose you could do given the return address determine what module it belongs too (this is the tricky bit) get the modules preferred base address (as specified when compiling)and then do some math to get the relative position for this call - save the new relocation base address in the registry/file. Now if the user changes the base address or when an application changes the relocation at startup to something different with a bit more math you can determine if this is the same position as last time.

The last para needs a little more thought (hopefully by somebody else) and as I say it's off the top of my head but in theory I think it may just do the trick.

Regards.
Robert Rolls.


GeneralSolving leaks Pin
Joe Moldovan10-Feb-01 5:03
Joe Moldovan10-Feb-01 5:03 
GeneralRe: Solving leaks Pin
NormDroid10-Feb-01 5:47
professionalNormDroid10-Feb-01 5:47 
QuestionWebsites? Pin
10-Feb-01 4:54
suss10-Feb-01 4:54 
AnswerRe: Websites? Pin
10-Feb-01 11:03
suss10-Feb-01 11:03 
GeneralHelp..CEdit ( enabling and text selection ) Pin
10-Feb-01 4:47
suss10-Feb-01 4:47 
QuestionWhat is the windows message no. 0x101E is for ? Pin
winyu9-Feb-01 20:01
winyu9-Feb-01 20:01 
AnswerRe: What is the windows message no. 0x101E is for ? Pin
Erik Funkenbusch12-Feb-01 13:11
Erik Funkenbusch12-Feb-01 13:11 
GeneralHotKey in backend process Pin
Vickie9-Feb-01 17:37
Vickie9-Feb-01 17:37 
GeneralToolbar - MFC and COM Pin
9-Feb-01 10:44
suss9-Feb-01 10:44 
GeneralCount item in folder Pin
IAF9-Feb-01 9:07
IAF9-Feb-01 9:07 
GeneralRe: Count item in folder Pin
Daniel Ferguson9-Feb-01 10:05
Daniel Ferguson9-Feb-01 10:05 
QuestionChangin color? Pin
9-Feb-01 8:34
suss9-Feb-01 8:34 
AnswerRe: Changin color? Pin
Daniel Ferguson9-Feb-01 9:46
Daniel Ferguson9-Feb-01 9:46 
GeneralUsage of CArray<> with a CListCtrl derrived class. Pin
Henrik9-Feb-01 6:42
Henrik9-Feb-01 6:42 
GeneralRe: Usage of CArray<> with a CListCtrl derrived class. Pin
Chris Losinger9-Feb-01 8:57
professionalChris Losinger9-Feb-01 8:57 
GeneralRe: Usage of CArray<> with a CListCtrl derrived class. Pin
leonwoo9-Feb-01 13:48
leonwoo9-Feb-01 13:48 
Generalcreateing an unique number runtime Pin
9-Feb-01 5:26
suss9-Feb-01 5:26 

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.