Re: OnWork *before* OnWorkBegin

Giganews Newsgroups
Subject: Re: OnWork *before* OnWorkBegin
Posted by:  Remy Lebeau (TeamB) (
Date: Tue, 28 Feb 2006

"poojo hackma" <> wrote in message

> The problem is that the posts show up in the wrong order in my main form

The OnWorkBegin event is guaranteed to always be triggered before the OnWork
event.  Internally, the code that triggers OnWorkBegin sets a flag that is
required for OnWork to be triggered.  So it is not possible for OnWork to be
triggered before the OnWorkBegin triggerer has set the flag.  Also, the code
that triggers the OnWorkEnd event clears the flag, so it is not possible for
the OnWork event to be triggered after the OnWorkEnd event.

The only possibilities are:

1) your message queue is removing FTH_WORK messages from the queue before
FTH_WBEGIN messages

2) you are not paying attention to the AWorkMode values, such that you are
actually getting an OnWorkBegin event for a writing operation and an OnWork
event for a reading operation, or vice versa.




In response to

BCB6: OnWork *before* OnWorkBegin posted by poojo hackma on Tue, 28 Feb 2006