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?!)
I do not know if this will work: does the dll use the overridden printf or its own local instance? All I can say is, try it... it isnt much code to test one example maybe?