Click here to Skip to main content
16,006,762 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Image List and List control Pin
krisn14-Aug-02 7:40
krisn14-Aug-02 7:40 
GeneralDocument telling DialogBar to Update Pin
JennyP13-Aug-02 10:05
JennyP13-Aug-02 10:05 
GeneralRe: Document telling DialogBar to Update Pin
Tomasz Sowinski13-Aug-02 10:09
Tomasz Sowinski13-Aug-02 10:09 
GeneralRe: Document telling DialogBar to Update Pin
Ernest Laurentin13-Aug-02 10:51
Ernest Laurentin13-Aug-02 10:51 
GeneralBringing another application to the front Pin
Dean Michaud13-Aug-02 9:57
Dean Michaud13-Aug-02 9:57 
GeneralRe: Bringing another application to the front Pin
567890123413-Aug-02 21:11
567890123413-Aug-02 21:11 
GeneralCan't terminate network thread. Pin
JohnnyG13-Aug-02 9:54
JohnnyG13-Aug-02 9:54 
GeneralRe: Can't terminate network thread. Pin
Ernest Laurentin13-Aug-02 11:08
Ernest Laurentin13-Aug-02 11:08 
If your thread is waiting on a socket. You may want to close the socket in question, this will force the function to fail but don't kill a thread unless this is really necessary.
Try with the following function:
DWORD ReadSocket(SOCKET s, LPBYTE lpBuffer, DWORD dwMaxSize, DWORD dwTimeout /*=INFINITE*/, SOCKADDR_IN* pAddrIn /*=NULL*/)
{
  fd_set	fdRead  = { 0 };
  TIMEVAL	stTime;
  TIMEVAL	*pstTime = NULL;

  if ( INFINITE != dwTimeout ) {
     stTime.tv_sec = 0;
     stTime.tv_usec = dwTimeout*1000;
     pstTime = &stTime;
  }

   // Set Descriptor
   if ( !FD_ISSET( s, &fdRead ) )
      FD_SET( s, &fdRead );

   // Select function returns if data is available
   DWORD dwBytesRead = 0L;
   int res = select( s+1, &fdRead, NULL, NULL, pstTime ); // (s+1) is ignored under WIN32
   if ( res > 0)
   {
     res = recvfrom( s, (LPSTR)lpBuffer, dwMaxSize, 0, pAddrIn, sizeof(SOCKADDR_IN));
     dwBytesRead = (DWORD)((res > 0)?(res) : (-1));
   }
   return dwBytesRead;
}


VOTD:"5. The Lord loves righteousness and justice;
the Earth is full of his unfailing love. "
-Psalm 33:5

GeneralRe: Can't terminate network thread. Pin
JT Anderson13-Aug-02 11:09
JT Anderson13-Aug-02 11:09 
GeneralRe: Can't terminate network thread. Pin
JohnnyG13-Aug-02 15:36
JohnnyG13-Aug-02 15:36 
Generallink error Pin
RocardoS13-Aug-02 9:37
sussRocardoS13-Aug-02 9:37 
GeneralRe: link error Pin
Tomasz Sowinski13-Aug-02 9:40
Tomasz Sowinski13-Aug-02 9:40 
GeneralRe: link error Pin
RocardoS13-Aug-02 9:56
sussRocardoS13-Aug-02 9:56 
GeneralRe: link error Pin
Tomasz Sowinski13-Aug-02 10:01
Tomasz Sowinski13-Aug-02 10:01 
GeneralRe: link error Pin
RocardoS13-Aug-02 10:16
sussRocardoS13-Aug-02 10:16 
Generalmultiple recordsets Pin
danag13-Aug-02 9:30
danag13-Aug-02 9:30 
GeneralRe: multiple recordsets Pin
Bill Wilson13-Aug-02 13:09
Bill Wilson13-Aug-02 13:09 
GeneralRe: multiple recordsets Pin
danag13-Aug-02 13:35
danag13-Aug-02 13:35 
GeneralRe: multiple recordsets Pin
Alexander Wiseman13-Aug-02 14:54
Alexander Wiseman13-Aug-02 14:54 
Generalmodeless dialog-Resizing Pin
udayGovekar13-Aug-02 9:23
udayGovekar13-Aug-02 9:23 
GeneralRe: modeless dialog-Resizing Pin
Tomasz Sowinski13-Aug-02 9:26
Tomasz Sowinski13-Aug-02 9:26 
QuestionHow do i use acmFormatEnum? All help is appreciated! Pin
redeemer13-Aug-02 9:10
redeemer13-Aug-02 9:10 
AnswerRe: How do i use acmFormatEnum? All help is appreciated! Pin
Ernest Laurentin13-Aug-02 10:46
Ernest Laurentin13-Aug-02 10:46 
AnswerRe: How do i use acmFormatEnum? All help is appreciated! Pin
Ernest Laurentin14-Aug-02 17:40
Ernest Laurentin14-Aug-02 17:40 
GeneralCOleSafeArray Pin
Mazdak13-Aug-02 9:08
Mazdak13-Aug-02 9:08 

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.