Click here to Skip to main content
15,884,986 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
This is actually more an experiment then a real life solution - i am trying to create my own layer without writing and installing one. It looks like this: some event is created in some function which sends some data over a socket:

WSAEVENT hEvent = WSACreateEvent();
::WSAEventSelect(sock, hEvent, FD_WRITE | FD_READ);
WSASend(....);


And then a thread waits for event, in fact event occurs when we got some bytes waiting for us or when we are able to write some bytes. WSASend is out of the question here, because all my job is done before WSASend gets executed. The pain is WSARecv, because after this call i have some thing to do and after i am done i can return control to a function which waits for WSARecv to complete. BTW, i am hooking these calls so when WSAsomething is called control goes to my function, where i am calling WSAsomething and additionally do some work with outgoing || incoming data.
So the thing is to prevent WSAsomething completion event signaling and signal it when i am done with my part.

I know it is wrong :P and all bad things might happen and there can be a disaster crash or something and this is not what i am going to implement in final solution. I am trying and learning how to dig into system and control it in every ways possible. About blocking event, well, i can save old event handle, select new event, do my stuff, and when done, - signal old event and delete mine, for example :P Or i can go deeper into the cave and try to hook something here and there and do some crazy stuff, you know Big Grin | :-D
011011010110000101100011011010000110100101101110
0110010101110011

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 
GeneralRe: I had this interview question Pin
Software200718-Jun-11 15:17
Software200718-Jun-11 15:17 
AnswerRe: I had this interview question Pin
Chuck O'Toole18-Jun-11 15:59
Chuck O'Toole18-Jun-11 15:59 
GeneralRe: I had this interview question Pin
Software200719-Jun-11 13:53
Software200719-Jun-11 13:53 
AnswerRe: I had this interview question Pin
Stefan_Lang19-Jun-11 23:23
Stefan_Lang19-Jun-11 23:23 
GeneralRe: I had this interview question Pin
Software200720-Jun-11 3:17
Software200720-Jun-11 3:17 

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.