freopen_s

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
Back
Top