| View previous topic :: View next topic |
| Author |
Message |
Partaud Guest
|
Posted: Wed Oct 26, 2005 8:55 am Post subject: WinExec prblem |
|
|
Hello,
I try to use WinExec method to use it with the "rar.exe" compressor. or
"winrar"
is it the good way?
Question is there another method to launch exe files with arguments?(but not
as complicated than "CreateProcess"
I have looked at the Window SDK and C++ library and have not find
compression methods or algorithms is it normal?
I have tried with rar.exe and winrar.exe
My code is :
//-------------------------------------------------------
char nomacopi[100];
AnsiString arguments,nomagicler,chemapplic;
chemapplic=ExtractFilePath(Application->ExeName);
// nomrar is read in a TStringList
nomagicler=chemapplic+nomrar+".rar";
//Erasing existing rar file
if(FileExists(nomagicler))DeleteFile(nomagicler);
//command
//rarfiles.lst is build from a TStringList containing directories path
arguments=chemapplic+"winrar a "+nomrar+" @rarfiles.lst";
strcpy(nomacopi,arguments.c_str());
WinExec(nomacopi,SW_HIDE);
//----------------------------------------------------------
The program stops in the WinExec command and show the CPU windows stopped in
the rar.exe thread.
(I don't understand the cpu window and how to use it)
I have try it in the command line window and rar works fine
I have tried wrinting the exact path in two cotes in the WinExec's first
argument => nothing is created
I have tried with "argumen.c_str() in the first argument too but it stop at
the cpu window too
If you have any idea say to me please
Or if you have an other way to compress directories!!!!
I thank you very much in advance
And excuse my English
Patrick
|
|
| Back to top |
|
 |
Bruce Salzman Guest
|
Posted: Wed Oct 26, 2005 10:10 pm Post subject: Re: WinExec prblem |
|
|
| Quote: | Or if you have an other way to compress directories!!!!
|
Cabinet files are easy to make with the Cabinet SDK from MS:
http://tinyurl.com/daub
The examples show how to call cabinet.ddl functions from your
application.
--
Bruce
|
|
| Back to top |
|
 |
Partaud Guest
|
Posted: Thu Oct 27, 2005 3:39 pm Post subject: Re: WinExec prblem |
|
|
Thank you very much, I think it is the best way than third patry tool.
Thank you again very much
Patrick
" Bruce Salzman" <bruce (AT) nospam (DOT) org> a écrit dans le message de news:
[email]435ffe2b (AT) newsgroups (DOT) borland.com[/email]...
| Quote: | Or if you have an other way to compress directories!!!!
Cabinet files are easy to make with the Cabinet SDK from MS:
http://tinyurl.com/daub
The examples show how to call cabinet.ddl functions from your application.
--
Bruce
|
|
|
| Back to top |
|
 |
Partaud Guest
|
Posted: Fri Oct 28, 2005 8:29 am Post subject: Re: WinExec prblem |
|
|
Thank you
I have downloaded the SDK, have you an example simple how to use the dll or
where I can find one,
If it exists.
Thank you again
Patrick
" Bruce Salzman" <bruce (AT) nospam (DOT) org> a écrit dans le message de news:
[email]435ffe2b (AT) newsgroups (DOT) borland.com[/email]...
| Quote: | Or if you have an other way to compress directories!!!!
Cabinet files are easy to make with the Cabinet SDK from MS:
http://tinyurl.com/daub
The examples show how to call cabinet.ddl functions from your application.
--
Bruce
|
|
|
| Back to top |
|
 |
|