You can use any of a set of options:
1-use SetTimer and give the address of a callback function that performs the read
2- use SetWaitableTimer and wait on it, each time the timer
is signalled, read what you need and return to wait (this must be in a separate thread)
You can also use the multimedia timer, but if the cycle is
10 secs you probably do not need such an accurate timer.
The read operation can be done via a CFile object intialized
to contain the appropriate FILE handle (by using either
the CFile methods or by obtaining the handle and calling Attach.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.