TIP: Click on subject to list as thread! ANSI
echo: delphi
to: SRDJAN DAKIC
from: RYAN POTTS
date: 1996-11-23 13:03:00
subject: Flushing disk-buffers

SRDJAN DAKIC wrote in a message to ALL:
 SD>     Q: Is it possible to disallow Windows interrupting my
 SD> program ?    
 SD> ----------------------------------------------------------
I don't know of a sure fire way.
 SD>     I need perfect timing for my program. For my Delphi
I can relate.
 SD> will be the only task     started in the enviroment. Is it
 SD> possible to ensure that all data     written (in cache) by
You might try having your program post a message to itself so the message is 
at the bottom of the que.  Then perform an application.processmessages.  
Hopefully the message you just posted will be the last message processed.  
When you receive it in your program you can be 'better' assured that windows 
has been flushed.
In Delphi 2.0 you can also SendMessages to yourself instead of posting to the 
que.  You might utilize this somehow to help maintain windows undivided 
attention.
My first method would be more suited at for the point in your program just 
before the time critical point of your code is reached.
My second would bring any other windows programs to pretty much a screaching 
halt.
I've never tried my second idea.  The first though works real well; again 
though it is no guarantee that more messages have been dumped on the que 
right after you post your message.
Thanks,
           Ryan 
---
---------------
* Origin: Midnight Express, Fairlawn Ohio (1:157/110)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.