I have a WPF application that calls functions inside a native DLL (written in C ++). This feature in .DLL sometimes does a Process Exit, which kills a WPF application.
Example:
WPF App: ..... [DllImport("native.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] private static extern void NativeMethod(); ..... void CallFunction() {
There is a way out inside NativeMethod, and I cannot change the source code of the .dll. Does anyone know a way to capture this output in a DLL from .NET code?
Thanks in advance,
source share