@leledumbo, you do not understand me, I want to catch self output.
@eny, thanks for hint, but it doesn't work, I also try with:
GetStdHandle(STD_OUTPUT_HANDLE)
ReadConsoleOutputCharacter
and it's work only with nogui app (without -WG) or if I use AllocConsole before GetStdHandle(STD_OUTPUT_HANDLE).
It seams that it will work only with console.
I wonder how can help --debug-log application parameter, which probably redirects STDOUT.