From: <dan...@ya...> - 2002-03-08 04:25:05
|
--- Adam Megacz <mi...@li...> wrote: > > Danny Smith <dan...@ya...> writes: > > > In other words, if two threads try to write to the same file > > > descriptor with WriteFile(), is there any risk of trouble? > > > Yes. You need to provide your own locks/unlocks for the file handle. > > Hrm, what's the granularity here? Can I have multiple threads invoking > WriteFile() on different file descriptors? > > Also, what's the authoritative document for thread-safety? The API > reference (win32.hlp) that I'm using doesn't mention anything about > threading hazards. > Have a look here for specific WriteFile doc. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/filesio_3kkl.asp and here for synnchronization mechanisms: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/synchro_4ur8.asp http://movies.yahoo.com.au - Yahoo! Movies - Vote for your nominees in our online Oscars pool. |