Click here to Skip to main content
15,889,527 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Prevent an property page to close Pin
David Crow17-Nov-11 8:44
David Crow17-Nov-11 8:44 
AnswerRe: Prevent an property page to close Pin
_Flaviu17-Nov-11 21:11
_Flaviu17-Nov-11 21:11 
Questionvideo(Playing using directx) refreshing Problem Pin
VCProgrammer16-Nov-11 21:21
VCProgrammer16-Nov-11 21:21 
AnswerRe: video(Playing using directx) refreshing Problem Pin
Code-o-mat17-Nov-11 4:23
Code-o-mat17-Nov-11 4:23 
QuestionOverlapped IO sockets sending and receiving at the same time Pin
jtlancer16-Nov-11 9:36
jtlancer16-Nov-11 9:36 
AnswerRe: Overlapped IO sockets sending and receiving at the same time Pin
Richard Andrew x6416-Nov-11 10:19
professionalRichard Andrew x6416-Nov-11 10:19 
GeneralRe: Overlapped IO sockets sending and receiving at the same time Pin
jtlancer16-Nov-11 11:51
jtlancer16-Nov-11 11:51 
GeneralRe: Overlapped IO sockets sending and receiving at the same time Pin
Mark Salsbery16-Nov-11 12:14
Mark Salsbery16-Nov-11 12:14 
I personally don't like the idea of waiting on OVERLAPPED handles. I'd much rather not introduce more (or any) synchronization objects to the IOCP handler threads but instead let the IOCP do its magic with all threads waiting on GetQueuedCompletionStatus.

I take advantage of the fact that the same overlapped structure pointer you pass to an overlapped function will be returned to you so I use extended OVERLAPPED structures like the one in this article[^]

C++
typedef struct _OVERLAPPEDPLUS {
    OVERLAPPED        ol;
    SOCKET            s, sclient;
    int               OpCode;
    WSABUF            wbuf;
    DWORD             dwBytes, dwFlags;
    // other useful information
} OVERLAPPEDPLUS;


The opcode can be used to indicate read or write (and many other things including non-I/O tasks you
want to queue on the IOCP). Also gives you a handy place to keep buffers associated with the operation.
Mark Salsbery
Java | [Coffee]

GeneralRe: Overlapped IO sockets sending and receiving at the same time Pin
Richard Andrew x6416-Nov-11 12:50
professionalRichard Andrew x6416-Nov-11 12:50 
QuestionCSimpleDate and Visual Studio 2010 Pin
xyloweb16-Nov-11 4:39
xyloweb16-Nov-11 4:39 
AnswerRe: CSimpleDate and Visual Studio 2010 Pin
Chris Losinger16-Nov-11 4:54
professionalChris Losinger16-Nov-11 4:54 
SuggestionRe: CSimpleDate and Visual Studio 2010 Pin
David Crow16-Nov-11 5:03
David Crow16-Nov-11 5:03 
AnswerRe: CSimpleDate and Visual Studio 2010 Pin
Maximilien16-Nov-11 8:59
Maximilien16-Nov-11 8:59 
AnswerRe: CSimpleDate and Visual Studio 2010 Pin
xyloweb25-Nov-11 9:09
xyloweb25-Nov-11 9:09 
SuggestionCollaborated Tool/Library development Pin
BrainlessLabs.com15-Nov-11 22:59
BrainlessLabs.com15-Nov-11 22:59 
GeneralRe: Collaborated Tool/Library development Pin
Richard MacCutchan15-Nov-11 23:51
mveRichard MacCutchan15-Nov-11 23:51 
GeneralRe: Collaborated Tool/Library development Pin
BrainlessLabs.com16-Nov-11 6:53
BrainlessLabs.com16-Nov-11 6:53 
QuestionEnumerating Registry Subkeys c++ Pin
Member 824522215-Nov-11 20:06
Member 824522215-Nov-11 20:06 
AnswerRe: Enumerating Registry Subkeys c++ Pin
Richard MacCutchan15-Nov-11 22:09
mveRichard MacCutchan15-Nov-11 22:09 
AnswerRe: Enumerating Registry Subkeys c++ Pin
User 742933815-Nov-11 22:14
professionalUser 742933815-Nov-11 22:14 
GeneralRe: Enumerating Registry Subkeys c++ Pin
Richard MacCutchan15-Nov-11 23:55
mveRichard MacCutchan15-Nov-11 23:55 
Questionsimple static library linking to dll issue. Pin
Android Lava15-Nov-11 16:32
Android Lava15-Nov-11 16:32 
AnswerRe: simple static library linking to dll issue. Pin
Richard MacCutchan15-Nov-11 22:04
mveRichard MacCutchan15-Nov-11 22:04 
AnswerRe: simple static library linking to dll issue. Pin
Chuck O'Toole16-Nov-11 5:41
Chuck O'Toole16-Nov-11 5:41 
AnswerRe: simple static library linking to dll issue. Pin
jschell16-Nov-11 10:00
jschell16-Nov-11 10:00 

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.