[fpc-pascal]w2000 file opening - was dos approx delay fn that releases cpu
LeeJ at logica.com
Wed May 9 19:01:54 CEST 2001
I was intending to address the file issue later when I'd got my dos program
working - which it is now but using a work around & doing an exec of 4nt
sleep-horrible but until I get dos delay working the best I can do. Another
reason for using dos is that a dos program sems to be more efficient using
less cpu overhead...but I'd be happy to use win32 if it'd work!
Anyway talking w2000 here...& I'm opening a file for read every 2 seconds
that is created by the nt/w2000 performance log service...I can open it &
read it ok in fpc go32 ok... but I get an access error in fpc win32
program...but it'd be good to have a proper dos calleable delay that
releases cpu anyway imo, that's why I'm trying to find/make one!
From: Michael Van Canneyt [mailto:michael.vancanneyt at wisa.be]
Sent: Wednesday, May 09, 2001 04:57
To: fpc-pascal at deadlock.et.tudelft.nl
Subject: Re: [fpc-pascal]dos approx delay fn that releases cpu
On Wed, 9 May 2001, Jonas wrote:
> On woensdag, mei 9, 2001, at 05:08 , Michael Van Canneyt wrote:
> >> Perhaps this is the problem area you should be addressing, rather than
> >> trying to find a sleep/delay procedure for GO32V2.
> > I also think this should be addressed then, instead of some ad-hoc
> > patch.
> > If you can explain (preferably with some example code) the probles
> > you're
> > having with locked files, maybe we can try to solve them.
> The problem is that Windows keeps a lock on a file for a few seconds
> after a (Win32) program has released it, that's all. It's an OS
> bug/feature, I don't think you can work around it in your program
> (except for always trying during 2 seconds or so to open a file before
> giving up, but that's not very nice)
? But don't dos programs have the same problem then when running under
fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal