开发者

Allow native DLL to output stdout / stderr in c# console application

开发者 https://www.devze.com 2022-12-25 18:33 出处:网络
I have a native DLL which outputs via stdout / stderr. I have a C# console application which calls this DLL and outputs binary data to a parent C# application which started the C# console exe, proces

I have a native DLL which outputs via stdout / stderr.

I have a C# console application which calls this DLL and outputs binary data to a parent C# application which started the C# console exe, processing stdout / stderr.

Currently when I c开发者_运维技巧all the C# exe it works just fine (the DLL hooks up to the stdout of my console application and puts its data in just fine).

Is this by design (and shouldn't be broken in future .NET framework versions)?

Are there limitations on my managed code's deployment with this strategy (full-trust, permission requirements, GAC issues, etc)?

I can't seem to find any documentation about stdout with a managed exe and an unmanaged dll both putting data in that standard output on MSDN.

Thanks,


This will work just fine. Be aware that your code will need full trust permissions on the client machine in order to call into a native DLL, however.

0

精彩评论

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