You've got this one back to front, as I understand it. That example starts the kernel in the same process as the application, so it can access the objects inside that application, but the actual console window is in a separate process, so it can't be embedded in the application's UI. This could be valuable, for example, to debug an application.

What you describe, with the console embedded, but the kernel in a separate process, is also possible, but I don't think we have an example for that.