How can I set the flag FILE_FLAG_BACKUP_SEMANTICS for an fstream object?
You can set most flags with fstream, but it seems like this one is not availble. You can read about the flag here.
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.
I’ve done this sort thing in the past but it’s been a while so I’m not sure I have it right.
Not well documented, but in vs2008, fstream takes a FILE object as a constructor. You can create a FILE object from a file id with _fdopen(). You can get a file id from an os handle using _open_osfhandle.
So I think it’s like: