From: cgf AT cygnus DOT com (Christopher G. Faylor) Subject: Re: Win32 files and cygwin files 24 Nov 1998 13:39:56 GMT Message-ID: <73ecvc$291$1@cronkite.cygnus.com> References: <199811231555 DOT KAA14580 DOT cygnus DOT gnu-win32 AT clay DOT sii-nh DOT com> X-Newsreader: trn 4.0-test63 (15 March 1998) In article <199811231555 DOT KAA14580 DOT cygnus DOT gnu-win32 AT clay DOT sii-nh DOT com>, David R. Dick wrote: >Because file locking seems to be unavailable in CygWin, >I probably need to use Win32 LockFile(). > >I know that I can link with Win32 libaries to use some >Windows functionality. > >Is there a way I can use LockFile() on files I have opened >with normal UNIX fopen() calls? or do I need to go all the >way in using Win32 file calls? HANDLE h = get_osfhandle (fd) returns the Windows handle associated with the cygwin fd. -- cgf AT cygnus DOT com http://www.cygnus.com/