简体   繁体   中英

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

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 call 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM