The information in this article applies to:
SYMPTOMSThe Visual C++ run-time API _open_osfhandle on Windows 95 and Windows 98 fails when called with a socket handle as the argument. The call returns -1 with errno set to EINVAL. CAUSEThe _open_osfhandle API makes a call to GetFileType to verify the handle type. Under Windows 95 and Windows 98, GetFileType returns FILE_TYPE_UNKNOWN for a socket handle instead of FILE_TYPE_PIPE. The _open_osfhandle API does not convert handles of unknown type. STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. MORE INFORMATION
Applications on Windows NT may use _open_osfhandle to get a C run-time file
descriptor from a Windows NT socket handle. This enables the application to
use the descriptor in C run-time I/O operations such as _lread() and so on.
Additional query words:
Keywords : kbnetwork kbAPI kbSDKPlatform kbVC400bug kbVC500bug kbWinOS95bug kbWinsock kbGrpNet |
Last Reviewed: June 24, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |