[Haskell-cafe] windows file locking
haskell at aeschbacher.ch
Wed Oct 11 09:16:39 EDT 2006
So far the windows API seems to work for me. Currently I'm still struggling
write garbage to the file but the shared access works now. Does anyone have
example how to use it (e.g. the implementation of hPutStr on windows or
i did not find it in the ghc source code)?
I tried to use Streams before but without the windows API.
2006/10/11, Bulat Ziganshin <bulat.ziganshin at gmail.com>:
> Hello Esa,
> Wednesday, October 11, 2006, 2:13:49 PM, you wrote:
> > Using base-package's IO-system, that is not possible as far as I know.
> > The flag you need to pass CreateFile (api call which is used to open
> > practically all files) is FILE_SHARE_READ.
> > You can find these in Win32-package, but files opened via raw api
> > bindings don't work well together with base-packages IO-system (ie,
> > you need to read and write using rawish api calls.)
> as usual, Streams library may be used to solve this problem, although
> this will need some additional programming. please write me if
> win32read/win32write API is inappropriate dor your needs
> Best regards,
> Bulat mailto:Bulat.Ziganshin at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe