Solved

Console Application (for CGI)

Posted on 1998-09-24
8
242 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
  • 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

790 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