Is it possible to extract file HANDLE f开发者_如何学Crom Windows file descriptor or from FILE* ?
As an example, FILE* is implemeted on top of file descriptors, and in turn file descriptors are implemented (on Windows) on top of HANDLEs. A FD can be extracted from FILE* using documented fileno() function. Extracting HANDLE from FD might be more hacking or more documented ....
Yes. See the _get_osfhandle
function.
精彩评论