Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Strange argv[]

Author: Odd Gunnar Malin

Date: 04:16:38 02/13/02

Go up one level in this thread


On February 13, 2002 at 06:03:53, Dann Corbit wrote:

>On February 13, 2002 at 05:23:50, Odd Gunnar Malin wrote:
>
>>Hi.
>>
>>When I try to start a consoleprogram from CA as Winboard Engine or UCI engine
>>the programpath is split in the argv[] (int main(int argc, char* argv[])).
>>
>>Ex.
>>Winboardengine
>>c:\Program Files\Chess Assistant6\PolarEngine.exe
>>would give
>>argv[0] = c:\Program
>>argv[1] = Files\Chess
>>argv[2] = Assistant6\PolarEngine.exe
>>
>>and not as from other program
>>argv[0]=c:\Program Files\Chess Assistant6\PolarEngine.exe
>>argv[1]=<empty>
>>
>>Is this an error in CA or in some common .dll files that follows
>>Delphi-programs?
>
>Try:
>"c:\Program Files\Chess Assistant6\PolarEngine.exe"
>
>The parser sees the white space as marking a new token.

You are probably right but since I don't have the source to CA I can not change
it :)
It either don't allow to put "" in the filename, but this had been a little hard
to ask all user's to do.

In normale startup procedure with use of CreateProcess(...) this problem don't
exist.

It's because of this I ask if this problem is in any Delphi .dll or in CA
itself. If it is a delphi problem a patch could maybe be found but if it is in
CA I guess we must wait and use /switch or -switch in the meantime for all
parameters.

Some Delhi programmer out there??

Odd Gunnar



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.