Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-06

Crt and remote terminal

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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

Michael Van Canneyt
to Carsten Bager
Carsten Bager wrote 12 lines
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.

Jonas Maebe
to Carsten Bager: Hi I would like to have the possibility to log in to my program via TCP and use the crt…
Carsten Bager wrote 9 lines
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

Michael Van Canneyt
to Jonas Maebe
Jonas Maebe wrote 12 lines
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.