I am writing a C# application that uses an unmanaged C++ dll. The
unmanaged C++ dll is wrapped in a managed C++ assembly.
I would like to capture what is being written to stdout and stderr by
the unmanaged dll. I am not spawning a new process for this dll, it
runs in the C# application process.
I've tried PInvoking freopen but I get an exception about a NULL
reference.
I've tried running freopen in the managed C++ code, but I get the same
NULL reference exception.
Anyone have any ideas?
Thanks,
- Andrew
Lloyd Dupont - 06 May 2005 06:49 GMT
read the documentation!
and try to gather more information from the error function:
_doserrno, errno, _sys_errlist, and _sys_nerr
>I am writing a C# application that uses an unmanaged C++ dll. The
> unmanaged C++ dll is wrapped in a managed C++ assembly.
[quoted text clipped - 13 lines]
> Thanks,
> - Andrew