Click here to Skip to main content
15,918,889 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: number o fcontrols limited to 255? Pin
BlackDice2-Nov-05 7:58
BlackDice2-Nov-05 7:58 
GeneralRe: number o fcontrols limited to 255? Pin
elephantstar2-Nov-05 8:03
elephantstar2-Nov-05 8:03 
GeneralRe: number o fcontrols limited to 255? Pin
Renjith Ramachandran2-Nov-05 18:36
Renjith Ramachandran2-Nov-05 18:36 
GeneralRe: number o fcontrols limited to 255? Pin
toxcct2-Nov-05 21:06
toxcct2-Nov-05 21:06 
QuestionRe: number o fcontrols limited to 255? Pin
David Crow3-Nov-05 3:29
David Crow3-Nov-05 3:29 
AnswerRe: number o fcontrols limited to 255? Pin
Joe Woodbury2-Nov-05 9:30
professionalJoe Woodbury2-Nov-05 9:30 
AnswerRe: number o fcontrols limited to 255? Pin
BadKarma2-Nov-05 21:58
BadKarma2-Nov-05 21:58 
QuestionRedirecting output using ShellExecute or CreateProcess or system Pin
swati242-Nov-05 6:57
swati242-Nov-05 6:57 
Hallo everyone,
For the last two days I am stuck at a very silly problem. I want to call GNU zip (gzip.exe) from within a C++ program and redirect the output (compressed/uncompressed) files to a filename of my choice.

The command for compression/decompression is:
<br />
gzip.exe uncomp.txt > nuncomp.gz<br />
gzip.exe -d uncomp.gz > nuncomp.txt


I tried using different API functions :
<br />
With ShellExecute I have tried:<br />
ShellExecute(NULL, "open", "cmd", "/A /C \"D:\\gzip.exe\" D:\\uncomp.txt >D:\\nuncomp.gz", ".",<br />
SW_HIDE);<br />
ShellExecute(NULL, "open", "D:\\gzip.exe", "D:\\uncomp.txt >D:\\nuncomp.gz", ".", SW_HIDE);<br />

and some other variations. I have similarly tried to use the redirection operator > under system (STDLIB) and CreateProcess. But none seem to work. If any of you have perhaps used the redirection of output to a file in past please let me know.

I should mention that the functions work as expected when not using the redirection operator. The possible effects of adding a redirection are:
* the redirected file is never created and the function behaves as if there is no redirection
* a redirection file is created but the output is still written to the default file
* a redirection file is created but the executable (gzip.exe in this case) never exits or flushes the file.


Thank you

-- modified at 13:06 Wednesday 2nd November, 2005
AnswerRe: Redirecting output using ShellExecute or CreateProcess or system Pin
Graham Bradshaw2-Nov-05 13:18
Graham Bradshaw2-Nov-05 13:18 
AnswerRe: Redirecting output using ShellExecute or CreateProcess or system Pin
David Crow3-Nov-05 3:33
David Crow3-Nov-05 3:33 
QuestionAdd MCF support to an existing standard DLL Pin
ChemmieBro2-Nov-05 6:17
ChemmieBro2-Nov-05 6:17 
AnswerRe: Add MCF support to an existing standard DLL Pin
Blake Miller3-Nov-05 10:47
Blake Miller3-Nov-05 10:47 
QuestionC++ Where to start? Pin
Leather992-Nov-05 4:02
Leather992-Nov-05 4:02 
AnswerRe: C++ Where to start? Pin
ddmcr2-Nov-05 4:11
ddmcr2-Nov-05 4:11 
GeneralRe: C++ Where to start? Pin
Leather992-Nov-05 4:26
Leather992-Nov-05 4:26 
GeneralRe: C++ Where to start? Pin
Kevin McFarlane2-Nov-05 9:26
Kevin McFarlane2-Nov-05 9:26 
GeneralRe: C++ Where to start? Pin
David Crow3-Nov-05 3:39
David Crow3-Nov-05 3:39 
AnswerRe: C++ Where to start? Pin
toxcct2-Nov-05 4:32
toxcct2-Nov-05 4:32 
GeneralRe: C++ Where to start? Pin
Kevin McFarlane2-Nov-05 9:27
Kevin McFarlane2-Nov-05 9:27 
GeneralRe: C++ Where to start? Pin
toxcct2-Nov-05 20:46
toxcct2-Nov-05 20:46 
GeneralRe: C++ Where to start? Pin
Kevin McFarlane3-Nov-05 8:47
Kevin McFarlane3-Nov-05 8:47 
GeneralRe: C++ Where to start? Pin
David Crow3-Nov-05 3:42
David Crow3-Nov-05 3:42 
GeneralRe: C++ Where to start? Pin
Kevin McFarlane3-Nov-05 8:49
Kevin McFarlane3-Nov-05 8:49 
AnswerRe: C++ Where to start? Pin
Bob Stanneveld2-Nov-05 7:52
Bob Stanneveld2-Nov-05 7:52 
GeneralRe: C++ Where to start? Pin
Leather992-Nov-05 22:06
Leather992-Nov-05 22:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.