Click here to Skip to main content
15,881,092 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Moving Objects in small increments Pin
enhzflep19-Jun-11 16:23
enhzflep19-Jun-11 16:23 
GeneralRe: Moving Objects in small increments Pin
Cyclone_S19-Jun-11 16:49
Cyclone_S19-Jun-11 16:49 
GeneralRe: Moving Objects in small increments Pin
enhzflep19-Jun-11 18:24
enhzflep19-Jun-11 18:24 
GeneralRe: Moving Objects in small increments Pin
enhzflep19-Jun-11 21:35
enhzflep19-Jun-11 21:35 
GeneralRe: Moving Objects in small increments Pin
Cyclone_S20-Jun-11 14:33
Cyclone_S20-Jun-11 14:33 
GeneralRe: Moving Objects in small increments Pin
enhzflep20-Jun-11 18:45
enhzflep20-Jun-11 18:45 
QuestionWSA Events Pin
csrss19-Jun-11 3:32
csrss19-Jun-11 3:32 
AnswerRe: WSA Events Pin
enhzflep19-Jun-11 4:13
enhzflep19-Jun-11 4:13 
I don't know anything at all about WSA sockets, save for the few crumbs I just picked up reading the winsock function reference at msdn.

However, I can see nothing to indicate this to be the case - nor can I think of a reason why this would necessarily be included - i.e if it's a socket you've created, then surely it is also you thas already attached said event to it - in which case you'd already have it's handle.. At least that's the way I guess it.

With that in mind, and the preparedness to go poking about in windows' memory space, I'd suggest that there is likely to be a far simpler way - unless of course FunctionA is in the kernel.
When FunctionB ends, it has to be able to return control to FunctionA, right? With this address available, you can look at the (machine) code for FunctionA, so with a little fancy footwork you can easily get the location in memory of the variable that is used to store the newly created event, and snatch the handle from there..


You know how I'd go about it? I'd write a dummy FunctionB, and put a statement something like
printf("here is my marker");

I'd then fire-up the program in OllyDbg, and search for refferences to "here is my marker". When I'd found the place that the memory containing this string was referenced, I'd know that I'd found my FunctionB. From there I would simply place a break-point inside my function, start the program running and wait for it to hit the break-point. Single-stepping would then allow me to return to FunctionA, where I could grab the required handle from the memory it was originally stored into.

Might take 30 mins to come up with working code for a real FunctionB to grab the event handle, so long as there's no bumps along the way like protected memory. I forget how to go about reading a process's memory but I've got code some where to do it.

You sure have got me curious about your project.. Thumbs Up | :thumbsup:
GeneralRe: WSA Events Pin
csrss19-Jun-11 5:43
csrss19-Jun-11 5:43 
QuestionRe: WSA Events Pin
Mark Salsbery19-Jun-11 9:38
Mark Salsbery19-Jun-11 9:38 
GeneralRe: WSA Events Pin
csrss19-Jun-11 13:13
csrss19-Jun-11 13:13 
GeneralRe: WSA Events Pin
Mark Salsbery19-Jun-11 14:10
Mark Salsbery19-Jun-11 14:10 
GeneralRe: WSA Events Pin
csrss20-Jun-11 5:46
csrss20-Jun-11 5:46 
GeneralRe: WSA Events Pin
Mark Salsbery20-Jun-11 9:29
Mark Salsbery20-Jun-11 9:29 
GeneralRe: WSA Events Pin
csrss20-Jun-11 10:17
csrss20-Jun-11 10:17 
QuestionHow can I read all files from 'Recent File List' ? Pin
_Flaviu18-Jun-11 8:56
_Flaviu18-Jun-11 8:56 
AnswerRe: How can I read all files from 'Recent File List' ? Pin
Richard MacCutchan18-Jun-11 21:42
mveRichard MacCutchan18-Jun-11 21:42 
GeneralRe: How can I read all files from 'Recent File List' ? [modified] Pin
_Flaviu18-Jun-11 21:45
_Flaviu18-Jun-11 21:45 
GeneralRe: How can I read all files from 'Recent File List' ? Pin
Richard MacCutchan19-Jun-11 21:45
mveRichard MacCutchan19-Jun-11 21:45 
GeneralRe: How can I read all files from 'Recent File List' ? Pin
_Flaviu20-Jun-11 21:28
_Flaviu20-Jun-11 21:28 
GeneralRe: How can I read all files from 'Recent File List' ? Pin
_Flaviu22-Jun-11 20:24
_Flaviu22-Jun-11 20:24 
GeneralRe: How can I read all files from 'Recent File List' ? Pin
Richard MacCutchan22-Jun-11 21:56
mveRichard MacCutchan22-Jun-11 21:56 
QuestionBest Sound API for Game Development? Pin
AutoBot122518-Jun-11 5:04
AutoBot122518-Jun-11 5:04 
QuestionI had this interview question Pin
Software200718-Jun-11 4:26
Software200718-Jun-11 4:26 
AnswerRe: I had this interview question Pin
Philippe Mori18-Jun-11 5:14
Philippe Mori18-Jun-11 5:14 

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.