Set ioresult

classic Classic list List threaded Threaded
2 messages Options
L-9
Reply | Threaded
Open this post in threaded view
|

Set ioresult

L-9
how to set it without writing a text driver plugin?

There was something like SetInOutRes for delphi in some unit.

Is global inoutres a threadvar, btw? Safe to set it directly as a global
variable (eek.. should there be some function?) The docs say that it is
"read only".

http://www.freepascal.org/docs-html/rtl/system/inoutres.html

Can this rule be broken in special cases..

p.s. I am working on a  operating system file locking solution that
plugs right into the regular Text or TextFile records using
fmShareDenyNone on windows and using fpFlock on windows. I don't want to
write my own text driver to do this if I don't have to,  and just use a
"cast" for now with my own special reset/assign calls. It's almost
reinventing my own text driver but not needed yet. I want to set the
inoutres based on some fpFlock and FileCreate(,fmsharedenynone) error
results. But eventually i may just write my own text driver. All this
will be available to the fpc community as a file sharing unit or text
driver plugin btw. I am sick of not having file sharing/locking for the
standard writeln Text handles.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
L-9
Reply | Threaded
Open this post in threaded view
|

Re: Set ioresult

L-9
I wrote:
> and using fpFlock on windows.

Typo: on unix
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal