1. You execute code via a small console executable of your own which include the DLL
2. You launch that console executable hidden from your main application and capture the output via interprocess communication.
can you reassign stdout to another stream and use it? I forget the details on this, so I apologize in advance, but I seem to recall that you could override the streams to use other devices (where a device can just be a buffer you share?!)