Hi
Hmmmm, "MichaelSoft BinBows" don't always make things easy, do they?!?
On *nix, there's always a console nearby, not so much on winders...
In fact, as soon as you create a GUI app in winblows, you forego all things console!!!
So, where does that leave us?!?
· writeln is cool, granted, but did you know it has a sibling 'WriteStr'

· if you assign a 'Callback-Function/Procedure' from your host-app to the
library, so that the library can call that instead of 'writeln', you can let
'WriteStr' do the formatting and just call
'SomeCallbackInHost(SomeFormattedString); in the library.
· this alleviates the problem completely, 'cause you can direct the output of
the callback -> to a commandline via 'Writeln' or a GUI via e.g.: a Tmemo
on a form...
Anyway, that's how I'm solving conundrums like this...

Holler if you need more help...
Regards Benny