
2 Sep
2004
2 Sep
'04
9:33 p.m.
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.
I almost never do any Windows specific code, so I didn't realize those _functions were VC++ only; thanks for pointing that out. And yes, I meant descriptor, not handle; that's a useful distinction I'll keep in mind.