Page 1 of 1

Problem with CGI-Library

Posted: Thu Jun 26, 2003 9:44 am
by dige
Hi El_Choni,

please try the following code:

Code: Select all

*mem = AllocateMemory ( 0, 4096, 0 )
Execute ( GetSysPath() + "\tracert.exe", "194.39.131.39", "", *mem, 1|4 )
Debug PeekS ( *mem )
The problem is: In this case, the cgi-lib returns only one (the first)
sentence. But if I start tracert.exe from commandline there are
more than 10 sentences.

Do you have a idea?

cya dige

Posted: Thu Jun 26, 2003 12:40 pm
by El_Choni
Maybe the returned sentences are concatenated null-terminated strings? To check that, see if the second sentence is at PeekS(*mem+Len(PeekS(*mem))+1).

Posted: Thu Jun 26, 2003 3:42 pm
by dige
El_Choni wrote:Maybe the returned sentences are concatenated null-terminated strings?
Ya, it seems to be the problem.
Is it possible to get the number of returned characters?
Or is there a better way to get output streams wich contains
zero bytes?

regards,

dige