your problem with this approach is that the two terminals will run in different processes so even though you could manage to link to the exported function in the executable (possible but...