freopen (msvcrt)
Last changed: -63.97.95.139

.
Summary
freopen tries to close any file already associated with the stream given as third parameter and disassociates it. Then, whether that stream was successfuly closed or not, freopen opens the file whose name is passed in the first parameter, filename, and associates it with the specified stream just as fopen would do using the mode value specified as the second parameter.

C# Signature:

[DllImport("msvcrt.dll", SetLastError=true)]
static extern TODO freopen(TODO);

VB Signature:

Declare Function freopen Lib "msvcrt.dll" (ByVal filename As String, ByVal mode As String, ByVal stream As IntPtr) As IntPtr

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

Mode can be any of the following:

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation
freopen on MSDN