Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionzip format using md5 rather than crc32? Pin
Seungbeom Roh30-Jan-07 14:30
Seungbeom Roh30-Jan-07 14:30 
AnswerRe: zip format using md5 rather than crc32? Pin
Christian Graus30-Jan-07 16:19
protectorChristian Graus30-Jan-07 16:19 
GeneralRe: zip format using md5 rather than crc32? Pin
Seungbeom Roh30-Jan-07 16:22
Seungbeom Roh30-Jan-07 16:22 
GeneralRe: zip format using md5 rather than crc32? Pin
Hamid_RT31-Jan-07 19:58
Hamid_RT31-Jan-07 19:58 
QuestionOne last IOCP question :) Pin
Polity4h30-Jan-07 11:51
Polity4h30-Jan-07 11:51 
AnswerRe: One last IOCP question :) Pin
Mark Salsbery30-Jan-07 12:21
Mark Salsbery30-Jan-07 12:21 
GeneralRe: One last IOCP question :) Pin
Polity4h30-Jan-07 12:55
Polity4h30-Jan-07 12:55 
GeneralRe: One last IOCP question :) Pin
Mark Salsbery30-Jan-07 13:42
Mark Salsbery30-Jan-07 13:42 
Reusing the overlapped struct is no problem. You just can't use it in more than one pending
(uncompleted) overlapped operation at a time.

I suggest carefully checking error conditions here. The documented results for
GetQueuedCompletionStatus() should be handled something like this:
BOOL bIORet = GetQueuedCompletionStatus ( // Get a completed IO request
                                  pThis->m_hIOCompiltionPort,
                                  &dwIoSize,
                                  reinterpret_cast(pThis),
                                  &ptrOverlapped, INFINITE);
 
(pseudocode)
if (bIORet)
{
   if (was overlapped socket operation)
   {
      if (dwIoSize == 0)
      {
         // socket closed
      }
      else
      {
         if (AfterRecieve)
         {
            if (dwIoSize < numberofbytesrequested)
               receive (numberofbytesrequested - dwIoSize) more bytes
            else
               // all bytes received
         }
      }
   }
}
else
{
   if (ptrOverlapped)
   {
      // I/O failed on the operation associated with this completion packet
      //  GetLastError() for extended error info
   }
   else
   {
      //GetQueuedCompletionStatus() failed
      //  GetLastError() for extended error info
   }
}

Can you post the code that calls WSARecvFrom, including the parameters passed and how you are
checking for errors? Please use the "pre" tags instead of the "code" tags as well Smile | :)
GeneralRe: One last IOCP question :) Pin
Polity4h30-Jan-07 14:04
Polity4h30-Jan-07 14:04 
GeneralRe: One last IOCP question :) Pin
Mark Salsbery30-Jan-07 14:39
Mark Salsbery30-Jan-07 14:39 
GeneralRe: One last IOCP question :) Pin
Mark Salsbery30-Jan-07 14:48
Mark Salsbery30-Jan-07 14:48 
GeneralRe: One last IOCP question :) Pin
Polity4h1-Feb-07 9:30
Polity4h1-Feb-07 9:30 
GeneralRe: One last IOCP question :) Pin
Mark Salsbery1-Feb-07 10:19
Mark Salsbery1-Feb-07 10:19 
GeneralRe: One last IOCP question :) Pin
Polity4h1-Feb-07 11:08
Polity4h1-Feb-07 11:08 
GeneralRe: One last IOCP question :) Pin
Mark Salsbery1-Feb-07 11:12
Mark Salsbery1-Feb-07 11:12 
GeneralRe: One last IOCP question :) Pin
Polity4h1-Feb-07 11:31
Polity4h1-Feb-07 11:31 
GeneralRe: One last IOCP question :) Pin
Mark Salsbery1-Feb-07 11:53
Mark Salsbery1-Feb-07 11:53 
GeneralRe: One last IOCP question :) Pin
Polity4h1-Feb-07 11:54
Polity4h1-Feb-07 11:54 
GeneralRe: One last IOCP question :) Pin
Mark Salsbery1-Feb-07 11:58
Mark Salsbery1-Feb-07 11:58 
GeneralRe: One last IOCP question :) Pin
Polity4h1-Feb-07 12:05
Polity4h1-Feb-07 12:05 
GeneralRe: One last IOCP question :) Pin
Mark Salsbery1-Feb-07 12:12
Mark Salsbery1-Feb-07 12:12 
Questiondisappearing check boxes Pin
maladuk30-Jan-07 11:13
maladuk30-Jan-07 11:13 
AnswerRe: disappearing check boxes Pin
James R. Twine30-Jan-07 11:23
James R. Twine30-Jan-07 11:23 
GeneralRe: disappearing check boxes Pin
maladuk30-Jan-07 23:31
maladuk30-Jan-07 23:31 
AnswerRe: disappearing check boxes Pin
PJ Arends30-Jan-07 15:51
professionalPJ Arends30-Jan-07 15:51 

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.