Is there easy way to create FILE* from WinApi HANDLE which points to one end of pipe?
Something like we do in unix: fdopen(fd,<mode>);
Is there easy way to create FILE* from WinApi HANDLE which points to one
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do this but you have to do it in two steps. First, call
_open_osfhandle()to get a C run-time file descriptor from a Win32 HANDLE value, then call_fdopen()to get aFILE*object from the file descriptor.