Win32::Console Question: How to attache a process to console

[email protected] (lacunasolutions)
Newsgroups perl.libwin32
Message-ID <[email protected]>
Hi to all,

I am looking how to attache a cmdline tool to a console and controll  
it then.

1. Is this possible?

2. How do I attache the console to the spawned process?

a) do i first spawn the process and ttache the console
b) do I first launch console and start a process
c) how do I use $CONSOLE->Aloc(); togehter with the process?
Aloc() is ment not to have anny arguments . . . .

My sample code:
#! perl -w

use strict;
use Win32;
use Win32::Console;

my $pid;
my $process = Win32::Spawn('testapp', 'testapp.exe with arguments',  
$pid);

my $CONSOLE = Win32::Console->new();
$CONSOLE->Alloc();

$CONSOLE->Title("Console Control");
$CONSOLE->Display() or die "Cant display Console";

sleep 30;


__END__
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.