RE: [boost] Re: IOStream mmap too restrictive?

2 Sep
2004
2 Sep
'04
1:46 p.m.
Jonathan Graehl <jonathan@graehl.org> 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.
7586
Age (days ago)
7586
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ben Hutchings