Click here to Skip to main content
15,897,273 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Keep the program evaluating... even when minimized Pin
S Douglas15-Sep-05 0:42
professionalS Douglas15-Sep-05 0:42 
QuestionCString format and numbers Pin
mcgahanfl14-Sep-05 9:08
mcgahanfl14-Sep-05 9:08 
AnswerRe: CString format and numbers Pin
Alexander M.,14-Sep-05 9:12
Alexander M.,14-Sep-05 9:12 
AnswerRe: CString format and numbers Pin
bugDanny14-Sep-05 9:20
bugDanny14-Sep-05 9:20 
AnswerRe: CString format and numbers Pin
David Crow14-Sep-05 9:28
David Crow14-Sep-05 9:28 
GeneralRe: CString format and numbers Pin
mcgahanfl14-Sep-05 10:23
mcgahanfl14-Sep-05 10:23 
QuestionProblem with windows hook and window classes Pin
Alexander M.,14-Sep-05 8:07
Alexander M.,14-Sep-05 8:07 
QuestionCreating a Bitmap (with a palette) from Data Pin
Nick Usechak14-Sep-05 6:44
Nick Usechak14-Sep-05 6:44 
AnswerClarification Pin
Nick Usechak14-Sep-05 6:51
Nick Usechak14-Sep-05 6:51 
AnswerRe: Creating a Bitmap (with a palette) from Data Pin
Chris Losinger14-Sep-05 7:27
professionalChris Losinger14-Sep-05 7:27 
GeneralRe: Creating a Bitmap (with a palette) from Data Pin
Nick Usechak14-Sep-05 9:49
Nick Usechak14-Sep-05 9:49 
GeneralRe: Creating a Bitmap (with a palette) from Data Pin
Chris Losinger14-Sep-05 9:53
professionalChris Losinger14-Sep-05 9:53 
GeneralRe: Creating a Bitmap (with a palette) from Data Pin
Nick Usechak14-Sep-05 13:14
Nick Usechak14-Sep-05 13:14 
AnswerRe: Creating a Bitmap (with a palette) from Data Pin
Mircea Puiu14-Sep-05 7:35
Mircea Puiu14-Sep-05 7:35 
AnswerRe: Creating a Bitmap (with a palette) from Data Pin
normanS14-Sep-05 19:41
normanS14-Sep-05 19:41 
QuestionWin32 Api CreateProcess( ) <-- Making me crazy Pin
Nitefall206014-Sep-05 5:51
Nitefall206014-Sep-05 5:51 
Hey all I hope you can help,

I need to open a dos console from within my windows enviornment, I have used CreateProcess() to do this once before but this case is more complicated.
My dos console, (lets call it (foo.exe)) takes a binary file(lets call it(input.file)) and converts it into 0-3 text files and a log file. foo.exe also requires keyboard input so that the user can tell foo.exe which of the
0-3 files to produce. What I need to do is supply foo.exe with the input.file and redirect a text file(lets call this key.txt) into foo.exe to handle the keyboard input. I can open foo.exe with just input.file and it works great, but I need this whole process to be transparent to my user, hence the need to bring key.txt in to the mix.

I have tried both a using the cmd.exe and a batch file approach and trying to do the redirection directly from the commandd line neither way works. I am not sure if I was even doing the cmd.exe, batch file version of this correctly, since I could never get it to work. Mad | :mad:

Here is what I have at the moment.

CreateProcess( NULL,
lpCommandLine,
NULL,
NULL,
0,
dwCreateFlags, <-- Set to CREATE_NEW_CONSOLE
NULL,
NULL,
&si,
&pi );

lpCommandLine is set as follows:
(I fudged the path names but you will get the general idea)
"C:\Documents and Settings\bob\very very\long\path\foo.exe "C:\Documents and Settings\bob\very very\long\path\input.file" < "C:\Documents and Settings\bob\very very\long\path\key.txt""

I have been looking around on this for a few days and know that the quotes can be a big problem?

My current permutation above opens the console window for a split second but nothing happens, the directory where the files should be created remains unchanged. D'Oh! | :doh:

Thanks for any suggestions. Big Grin | :-D
AnswerRe: Win32 Api CreateProcess( ) &lt;-- Making me crazy Pin
David Crow14-Sep-05 6:31
David Crow14-Sep-05 6:31 
GeneralRe: Win32 Api CreateProcess( ) &lt;-- Making me crazy Pin
Nitefall206014-Sep-05 7:19
Nitefall206014-Sep-05 7:19 
GeneralRe: Win32 Api CreateProcess( ) &lt;-- Making me crazy Pin
David Crow14-Sep-05 8:26
David Crow14-Sep-05 8:26 
AnswerRe: Win32 Api CreateProcess( ) &lt;-- Making me crazy Pin
ky_rerun14-Sep-05 16:01
ky_rerun14-Sep-05 16:01 
GeneralRe: Win32 Api CreateProcess( ) &lt;-- Making me crazy Pin
David Crow15-Sep-05 3:13
David Crow15-Sep-05 3:13 
AnswerRe: Win32 Api CreateProcess( ) &lt;-- Making me crazy Pin
Ravi Bhavnani14-Sep-05 6:43
professionalRavi Bhavnani14-Sep-05 6:43 
AnswerRe: Win32 Api CreateProcess( ) &lt;-- Making me crazy Pin
charlieg14-Sep-05 12:01
charlieg14-Sep-05 12:01 
QuestionMANIPULATING(insert,update,delete) MS SQL VIEWS Pin
Anonymous14-Sep-05 5:40
Anonymous14-Sep-05 5:40 
QuestionRemote PC Shutdown Pin
Anonymous14-Sep-05 4:57
Anonymous14-Sep-05 4:57 

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.