Crt and remote terminal

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Crt and remote terminal

Carsten Bager
Hi

I would like to have the possibility to log in to my program via TCP and use
the crt unit.  (I monitor a connection attempt on a specific port number, and
opens a line when it is necessary)

I can easily create some code where input output is redirected to the
remote terminal but the crt unit still sends its commands to the terminal
where the program was started.
Is it possible to re-Initialize the crt unit after the program is started and a tcp
connection is opened and Finalize when the connection is closed or should
I write a new unit.

Regards Carsten



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Crt and remote terminal

Michael Van Canneyt


On Mon, 9 Jun 2008, Carsten Bager wrote:

> Hi
>
> I would like to have the possibility to log in to my program via TCP and use
> the crt unit.  (I monitor a connection attempt on a specific port number, and
> opens a line when it is necessary)
>
> I can easily create some code where input output is redirected to the
> remote terminal but the crt unit still sends its commands to the terminal
> where the program was started.
> Is it possible to re-Initialize the crt unit after the program is started and a tcp
> connection is opened and Finalize when the connection is closed or should
> I write a new unit.

Writing a new unit is probably your best shot.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Crt and remote terminal

Jonas Maebe-2
In reply to this post by Carsten Bager

On 09 Jun 2008, at 10:26, Carsten Bager wrote:

> I can easily create some code where input output is redirected to the
> remote terminal but the crt unit still sends its commands to the  
> terminal
> where the program was started.
> Is it possible to re-Initialize the crt unit after the program is  
> started and a tcp
> connection is opened and Finalize when the connection is closed or  
> should
> I write a new unit.

You can probably use the assigncrt() routine for your purpose, no?


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Crt and remote terminal

Michael Van Canneyt


On Mon, 9 Jun 2008, Jonas Maebe wrote:

>
> On 09 Jun 2008, at 10:26, Carsten Bager wrote:
>
> >I can easily create some code where input output is redirected to the
> >remote terminal but the crt unit still sends its commands to the terminal
> >where the program was started.
> >Is it possible to re-Initialize the crt unit after the program is started and
> >a tcp
> >connection is opened and Finalize when the connection is closed or should
> >I write a new unit.
>
> You can probably use the assigncrt() routine for your purpose, no?

Totally forgot about this call. Jonas is correct, this call should work
if you can open the terminal in a file.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal