Solved

Console Application (for CGI)

Posted on 1998-09-24
8
243 Views
Last Modified: 2013-11-18
Hi...

I want to develop a console application with Delphi, to use it as a CGI application. So I need to read/write from/to the standard in/output. How can I do this...?

Thanx
  Sven
0
Comment
Question by:sven99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1340763
try
{$APPTYPE CONSOLE}
in your project source

regs,
Black Death
0
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1340764
example:

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

{$R *.RES}

var
  i: integer;
 
begin
  Write('enter value:');
  Readln(i);
  Writeln('you entered: ' + inttostr(i));
  Write('press ENTER to end the program');
  Readln;
end.
0
 

Author Comment

by:sven99
ID: 1340765
Thank you very much... do you mark the question to answered, that I can give you the Points...

Bye
  Sven
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:viktornet
ID: 1340766
Hello you two!

I know this that's the way to do a console app, and I've tried many other ways, and some kinda components, but never got it working. here is similar to what I get....When I try to run the app I get "This program can not run without Microsoft Windows", or something similar. I can't exactly see what it says because it closes it immediately and the app runs in the background. When I open the task menager by pressing Ctrl+Alt+Del and close the app so it stops running, my computer hangs up and the on;ly way to get out of that is ti press the Reset button. Any ideas on why it is doing that? or maybe what settings I need to set so it can run on my computer too...

regards,
Viktor Ivanov
0
 

Author Comment

by:sven99
ID: 1340767
Hmmm, I have tried it, ad it works... You can give me your EMail adress, and I will sent you my Testproject, including the EXE-File.

I use Borland Delphi 3.0 and Windows NT.

Bye
  Sven
0
 
LVL 1

Accepted Solution

by:
BlackDeath earned 50 total points
ID: 1340768
you're welcome
0
 

Author Comment

by:sven99
ID: 1340769
Thanx.


0
 

Author Comment

by:sven99
ID: 1340770
"victornet", you can reach me under sschaefer@interflex.de
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question