Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-05

w2000 file opening - was dos approx delay fn that releases cpu

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Lee, John

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!

Earlier message 35 lines
-----Original Message----- From: Michael Van Canneyt Sent: Wednesday, May 09, 2001 04:57 To: 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 windows? Michael.

Reply by email