[fpc-pascal]w2000 file opening - was dos approx delay fn that releases cpu

Gabor DEAK JAHN djg at tramontana.co.hu
Thu May 10 04:18:42 CEST 2001

At 5/9/01 02:30 PM, you wrote:


 > I wish I could be more help about the rest of the filemode settings for
 > Win32, but unfortunately I don't recall where I got that info from. Sorry.

 From the file Win32.inc:

    fmShareCompat    = $00000000;
    fmShareExclusive = $10;
    fmShareDenyWrite = $20;
    fmShareDenyRead  = $30;
    fmShareDenyNone  = $40;

If you check out Syswin32.pp from the RTL source (procedure Do_Open), you'll
see that the single Filemode value passed on by routines like Reset or
Rewrite will not be used directly but dissected into several flags and then
fed to the appropriate Win32 routines. I didn't check if every possible
value and flag is handled by the FPC RTL or not, but you can always call the
Win32 file I/O functions directly, providing whatever flag you want. The
MSDN documentation of CreateFile has a description of all flags accepted by


Gabor DEAK JAHN -- Budapest, Hungary.
E-mail: djg at tramontana.co.hu

More information about the fpc-pascal mailing list