Boost logo

Boost :

From: Ben Hutchings (ben.hutchings_at_[hidden])
Date: 2004-09-02 08:46:33


Jonathan Graehl <jonathan_at_[hidden]> wrote:
<snip>
> I don't see how, in Windows, to atomically keep the file open before
> it's mmapped, because chsize takes an int fh and the (equivalent of)
> mmap takes a HANDLE (maybe there is some Win32 call to get the HANDLE
> from the int fh?).
<snip>

You mean file descriptor, not "int fh". "File handle" usually means a
FILE or FILE pointer. Anyway, file descriptors are a Unix feature
emulated by many C libraries and not by Win32. The VC++ library
provides the function _get_osfhandle which returns the underlying Win32
file handle for a file descriptor. Other C/C++ libraries for Windows
may provide similar functions.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk