CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: majic79

Search: Search took 0.02 seconds.

  1. Replies
    15
    Views
    13,841

    Re: Mutual exclusion strategy

    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...
  2. Replies
    4
    Views
    2,380

    Re: Problems designing a signal handler in UNIX

    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)
  3. Replies
    6
    Views
    1,194

    Re: Stumped by weird "crash"

    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...
  4. Replies
    2
    Views
    2,121

    Re: Problem with stopping Sub-Thread

    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,...
  5. Replies
    3
    Views
    5,820

    Re: Using Windows message as a Handle

    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...
  6. Replies
    3
    Views
    3,068

    Re: AfxEndThread from other function

    typical thread function:




    HANDLE m_hThreadExitEvent = NULL;

    void CreateThreads(void)
    {
    CWinThread *pThread = NULL;
  7. Replies
    8
    Views
    3,322

    Re: Run-Time Check Failure #2

    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...
  8. Replies
    8
    Views
    3,322

    Re: Run-Time Check Failure #2

    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...
  9. Replies
    3
    Views
    1,141

    Re: How can i make this multithreaded?

    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...
  10. Replies
    8
    Views
    3,322

    Re: Run-Time Check Failure #2

    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...
  11. Replies
    8
    Views
    3,322

    Re: Run-Time Check Failure #2

    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...
  12. Replies
    8
    Views
    3,322

    Run-Time Check Failure #2

    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...
Results 1 to 12 of 12





Click Here to Expand Forum to Full Width

Featured