Lazarus
Home
Forum
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Using the Lazarus IDE
»
General
»
A question about TProcess, .CommandLine etc.
Downloads
Daily Snapshots
FAQ
Wiki
Bugtracker
IRC channel
Developer Blog
Follow us on Twitter
Mailing List
Free pascal
Other languages
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
About donations (wiki)
Bookstore
Lazarus, the complete guide
Search
Advanced search
« previous
next »
Print
Pages: [
1
]
Author
Topic: A question about TProcess, .CommandLine etc. (Read 1527 times)
Anonymous
Guest
A question about TProcess, .CommandLine etc.
«
on:
December 29, 2005, 03:10:54 pm »
Hi, I hope to not be too off topic here.
I'm building a cross platform application with Lazarus that will call some external executables that will be spawned from the main Lazarus application as TProcess.
Wit .CommandLine I can specify the command like to pass to the executables but unfortunately I'll have to pass as parameters (potentially) a list of thousands qualified filenames, so it will result a really LONG command line.
Being the application multiplatform I may incour, AFAIK, in several problems: various length of command tail length allowed by the various operating systems, length of command line allowed by the various command interpreter (usually shorter), and moreover, I wonder, will I incour in some other limits in command line length allowed by the Lazarus IDE to be passed as (name of process variable).CommandLine?
Not all the external executables I'll call can read the command line parameters form a saved external file, so I cannot even save a file with parameters and then pass them to the executables.
The only solution I see is to check the .CommandLine length and if it exceed a certain value split the command line in more command lines and then run sequentially more instance of the command, it will lead almost to the same result than ideally running the command with all the parameters in a single huge command line, however, "almost" so I would prefer to do it in a single pass calling the executable with the whole big list of parameters if only it's possible...
Can someone please help me in understyanding better how can I pass an huge amount of parateres to an external executable with Lazarus/FreePascal and otherwise, if I can't, if Lazarus/FreePascal pose some utter limitation in the size of the command line I could pass to an external executable?
Thank you a lot in advance!
Giorgio
Logged
SergKam
New member
Posts: 29
RE: A question about TProcess, .CommandLine etc.
«
Reply #1 on:
January 03, 2006, 10:07:29 am »
Yes. Lenght of command line is limited.32000 in linux and ~2Kb-dos. Beter use pipe. Chaild process may read from stdin.
Logged
Excuse for my English
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Using the Lazarus IDE
»
General
»
A question about TProcess, .CommandLine etc.
Recent
ListBox Filter
by
lainz
[
Today
at 05:00:07 am]
BGRAControls
by
lainz
[
Today
at 03:10:41 am]
FPCUp FPC/Lazarus SVN ins...
by
lainz
[
Today
at 03:09:38 am]
What is this Delphi Heade...
by
DirkS
[
Today
at 12:11:59 am]
Build of SQLite3 for WINC...
by
bambamns
[
Today
at 12:09:01 am]
Lazarus crashes after “Re...
by
and4977
[May 20, 2012, 11:26:31 pm]
Scrambled dragimage
by
Ocye
[May 20, 2012, 10:30:19 pm]
Transparency with Qt on D...
by
Ocye
[May 20, 2012, 08:14:43 pm]
DragImage adds as new win...
by
Ocye
[May 20, 2012, 08:05:24 pm]
TFrame size
by
iru
[May 20, 2012, 07:03:22 pm]