Mail Archives: djgpp/1995/11/21/12:57:37
> From: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
> Date: Tue, 21 Nov 1995 11:16:45 GMT
>
> I have a Gnu C++ program that calls PKUNZIP.EXE thus:-
> k=spawnl(P_WAIT,UNZIP,ZIPWF,0);
> where P_WAIT is defined in #include<process.h>, UNZIP is a char* -> the full
> pathname of my copy of PKUNZIP.EXE, ZIPWF is a char* -> the full pathname of
> the zipfile that I want to unzip. But always when called thus, PKUNZIP behaves
> as it behaves when I call it directly from DOS without any arguments.
>
spawnl pass the parameter list to called program as argv, so
ZIPWF goes to argv[0], being the name of program. If you want to pass
it as the first parameter, use spawnl(P_WAIT,UNZIP,UNZIP,ZIPWF,NULL);
---
Alexander Lukyanov
lav AT video DOT yars DOT free DOT net
- Raw text -