Problem with CGI-Library

Everything else that doesn't fall into one of the other PB categories.
dige
Addict
Addict
Posts: 1416
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Problem with CGI-Library

Post 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
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post 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).
El_Choni
dige
Addict
Addict
Posts: 1416
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post 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
Post Reply