BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WinExec prblem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Native API)
View previous topic :: View next topic  
Author Message
Partaud
Guest





PostPosted: Wed Oct 26, 2005 8:55 am    Post subject: WinExec prblem Reply with quote



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





PostPosted: Wed Oct 26, 2005 10:10 pm    Post subject: Re: WinExec prblem Reply with quote



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





PostPosted: Thu Oct 27, 2005 3:39 pm    Post subject: Re: WinExec prblem Reply with quote



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





PostPosted: Fri Oct 28, 2005 8:29 am    Post subject: Re: WinExec prblem Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Native API) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.