Type: Posts; User: majic79
Search took 0.00 seconds.
January 21st, 2010, 04:19 AM
It sounds like you have almost exactly the same situation as I have (although my code doesn't fill my buffer that quickly)
(producer) thread 1) fill buffer until it catches up with the buffer read...
January 21st, 2010, 03:12 AM
I'm not familiar with Unix style threading (or the Posix pthreads library) - so I'm probably not the person to help, but don't you need to add the timer signal to your signal set? (sigaddset)
January 19th, 2010, 05:22 AM
you could easily tidy up your WaitCommEvent call - check the return value, if its non-zero, then it came back straight away, and you wont need to wait for the handle. You really only need to be...
January 15th, 2010, 05:03 PM
try to do your calculation in a step-by-step fashion (in a way that can be done with a while loop or a for loop) and to signal cancellation, insert a WaitForSingleObject with a timeout of 1ms or so,...
January 15th, 2010, 04:38 AM
well.... I'd have my main process thread (which is a UI thread with a message pump) create a new handle (global) at startup, then hook the log-off event, when the log-off occurs, set your global...
January 14th, 2010, 08:07 AM
typical thread function:
HANDLE m_hThreadExitEvent = NULL;
CWinThread *pThread = NULL;
January 12th, 2010, 11:20 AM
I think I found the problem - suitably obscure and innocuous
The thread that fails is writing data to a port - another thread is reading the port, naturally, this is done asynchronously. In my...
January 12th, 2010, 09:15 AM
I'm using VS 2005, but I have a copy of VS2008 I supposed I could build it on.
I've re-coded the function so it doesn't call LogMessage, but does the same implementation in the DebugOut function...
January 11th, 2010, 05:17 PM
you don't really need to make it multithreaded, although you could create a worker thread for each client that connects (waste of time and resources though)
Usually you listen on a port, on an...
January 11th, 2010, 04:22 PM
the only thing I do with m_sMsgList is to pull items off it as CStrings in the function GetLogItem - according to the documentation (if i read it right), you pass AddHead or AddTail a LPCTSTR and it...
January 11th, 2010, 10:38 AM
I tried - if I set a breakpoint, it works fine, no problems. it's all set to MBCS (I've been testing with both Unicode and MBCS, has the same issue with both, but my DDE server doesn't work properly...
January 11th, 2010, 09:53 AM
Hi - I've tried searching for a solution (or a means to find one) for my problem. I have several classes that derive from a generic "Logging" class - it allows me to easily log diagnostic output to...
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.