You don't, at least not as I understand it.
Only way to be part of an existing console is to have the executable set as a Console program. Otherwise, it doesn't get a console, and the console that it started from oesn't belong to it's process so you couldn't AttachConsole() to it anyway.