开发者

Getting stdout when p-invoking to unmanaged DLL?

I've got an unmanaged DLL that is writing log messages to standar开发者_如何学运维d output. I'm calling this DLL with P-invokes from a WPF app and I need to get the standard output stream log. I've tried Console.SetOut, but that only seems to capture information written using Console.Write, etc.

Anyone have any ideas? I've found similar questions asked elsewhere but they don't have answers.


Since you're already calling PInvoke, I guess you wont mind an extra call to SetStdHandle. A similar thread is here Redirect stdout+stderr on a C# Windows service

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜