G
Guest
I have setup Console redirection within my Console app (via Console.SetOut
and Console.SetErrror) to route console WriteLine calls to a logfile. This
works just fine with one exception...
I use PInvoke to call into several unmanaged DLLs which write diagnostic
information out to stdout (and possibly stderr). When I run in a
"standalone" mode with no redirection, these DLLs do generate output to the
console window. But I want to run in a "batch" mode where the app is
launched without a window. In this mode I still get all Console.WriteLine
and Console.Error.WriteLine output properly redirected, but lose all output
from the unmanaged DLLs.
Is there anything I can do to get output from an unmanaged, PInvoke'd DLL to
get redirected properly?
Thanks!
-- Tom
and Console.SetErrror) to route console WriteLine calls to a logfile. This
works just fine with one exception...
I use PInvoke to call into several unmanaged DLLs which write diagnostic
information out to stdout (and possibly stderr). When I run in a
"standalone" mode with no redirection, these DLLs do generate output to the
console window. But I want to run in a "batch" mode where the app is
launched without a window. In this mode I still get all Console.WriteLine
and Console.Error.WriteLine output properly redirected, but lose all output
from the unmanaged DLLs.
Is there anything I can do to get output from an unmanaged, PInvoke'd DLL to
get redirected properly?
Thanks!
-- Tom