freopen_s

G

Guest

I'm compiling programs and getting rid of deprecated function such as fopen
and freopen in VS2005. I notice that fopen_s does not allow for file sharing
by design. It is recommended to use _fsopen, which works fine. However
freopen_s does the same thing as fopen_s and locks stdout and stderr to
viewing by other programs including "notepad" and "type". Using freopen
allows both notepad and type to view the files. Is there an equivalent
sharing function for freopen_s as it is valuable to look at stdout and stderr
while a service program is running.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top