delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/09/17/11:05:23

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: =?ISO-8859-1?Q?Rafael_Garc=EDa?= <rafael_no_spam_no_ AT geninfor DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: calling unzip32 from C program
Date: Fri, 17 Sep 2004 16:28:30 +0200
Organization: Telefonica Data Espagna
Lines: 16
Message-ID: <ciesel$60c$1@nsnmpen3-gest.nuria.telefonica-data.net>
NNTP-Posting-Host: 100.red-80-34-252.pooles.rima-tde.net
Mime-Version: 1.0
X-Trace: nsnmpen3-gest.nuria.telefonica-data.net 1095431445 6156 80.34.252.100 (17 Sep 2004 14:30:45 GMT)
X-Complaints-To: usenet AT nsnmpen3-gest DOT nuria DOT telefonica-data DOT net
NNTP-Posting-Date: Fri, 17 Sep 2004 14:30:45 +0000 (UTC)
User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207)
X-Accept-Language: es-es, es
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I put this in a C program:

ret=system("unzip prueba.zip");

then I write an "unzip.bat" with:

unzip32 %1 %2 %3 %4 %5 %6

At execution, unzip32 works OK but return value from system is 1. When I 
execute unzip.bat from the console, errorlevel from unzip32 is 0 but 
when called from system in the C program, it returns 1.

(Running WinXP)

Anybody can explain?
Thanks

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019