BUG: Windows 95 Doesn't Allow open_osfhandle on Socket HandlesLast reviewed: June 5, 1997Article ID: Q139801 |
The information in this article applies to:
SYMPTOMSThe Visual C++ runtime API _open_osfhandle on Windows 95 fails when called with a socket handle as the argument. The call returns -1 with errno set to EINVAL.
CAUSE_open_osfhandle makes a call to GetFileType to verify the handle type. Under Windows 95, GetFileType returns FILE_TYPE_UNKNOWN for a socket handle instead of FILE_TYPE_PIPE. _open_osfhandle does not convert handles of unknown type.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONApplications on Windows NT may use _open_osfhandle to get a C-runtime file descriptor from a Windows NT socket handle. This enables the application to use the descriptor in C-runtime I/O operations like _lread(), etc. Windows 95 does not allow this operation.
|
Additional query words: 4.00 Windows 95
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |