|
Hi all,
I need to execute an exe file from my C++ program.This I'm able to do using the CreateProcess method provided.I'm able to execute the exe and even see the output.My need is to store that output into a text file.As we may do it on the command line using redirection.I assigned the command line string to the second parameter in the CreateProcess method but the problem is not solved.
That is
CreateProcess( "D:\\filename.exe", // No module name (use command line).
"filename >pas.txt", // Command line.
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
FALSE, // Set handle inheritance to FALSE.
0, // No creation flags.
NULL, // Use parent's environment block.
NULL, // Use parent's starting directory.
&si, // Pointer to STARTUPINFO structure.
&pi ) // Pointer to PROCESS_INFORMATION structure.
Can anybody help me.
Thanks and Regards,
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
Suppose thats me who could help here
Look at Controlling Console Applications[^]
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
Hi!
I want to make a backup of my development directory which is already about 700 MB big, I want to put it on a CD-R. But I only want to include the neccessary files.
There are some files with the extension *.pch or similar that are not necessary since they are recreated in the next compile. So what files can I delete safely to safe disk space?
(Of coure at first I will make a full copy of my development directory on my HD)
best regards
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Everything in the Debug and Release folders is regenerated at compile time. The rest of the files are pretty much needed apart from .CLW and .NCB (which store the classwizard and class view information)
.pch are pre-compiled headers and can be safely deleted.
Michael
Time flies like an arrow. Fruit flies like a banana
|
|
|
|
|
In addition to Martin's reply: you can safely delete *.aps and *.plg files. I'm usually deleting .opt file as well - it has workspace-related info like executable name for debugging .dlls.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
Assuming you can recompile from your sources (i.e. you're not dependent on any .libs or .dlls), all you need are the .cpp, .h, .txt, .rc, .dsp, .dsw and /res files.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thank you Michael, Tomasz, Ravi and anyone else
modified 12-Sep-18 21:01pm.
|
|
|
|
|
And if you're looking for a free backup utility, why not try my EZBackup[^] tool?
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Does it distinguish between needed files and garbage?
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
Um... did you click the link?
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Yes, of course. Right now But it keeps telling me that it doesnt find the server. Are you hiding it, so that no one can see that EZBackup doesnt know what files Gregor needs? Shame on you.
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
Good opportunity to make some advertisement, eh?
But your app has a big bug, take a look: http://foxhunter.ath.cx/ezbackup.jpg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Someone else mentioned the resize problem, but I can't seem to duplicate it on Win2K or Win98. Can you try minimizing/restoring the resized app and see if it goes away? Thanks!
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Ugh, never mind I was able to reproduce it! A fix is on its way. Thanks for pointing out the problem!
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
You can safely delete all variants of Release and Debug subdirectories.
You can also delete NCB file whitch stores IDE layout informations and takes some space.
Sonork 100.15206;PavelK
|
|
|
|
|
Is there any way to import values directly into a string table rather than having to type each one of them individually in?
Could you please post the exact method of doing so if indeed there is a way.
Thanks
ashish
|
|
|
|
|
Don't know about an easy way.
You can create an RC file with string table and include it into Your main RC file.
Sonork 100.15206;PavelK
|
|
|
|
|
You mean creating a string resource automated? Well, you could use a macro for this or just any text tool that writes properly formated text into the projects .rc file. Or write your own app that works with the .rc file and inserts the strings.
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
signature for atof is as follows:
double atof( const char *string );
My question is, what API can I use if I need "long double" precision?
thanx.
norm
|
|
|
|
|
istringstream::operator >> (long double &n) should do nicely.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
but the code also invoked:
sqrt
fabs
...etc
any alternative?
norm
|
|
|
|
|
norm wrote:
any alternative?
You want functions operating on long doubles? While there are ones operating on long doubles (like sqrtl) in math.h, they are just casting parameters to double before performing calculations using plain, 'double' versions.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
check this out:
http://www-ccs.ucsd.edu/c/math.html#ceil
i was looking at MSDN, i dont think it says abs() supports "long double"...?
norm
|
|
|
|
|
|
MSDN say to this:
Previous 16-bit versions of Microsoft C/C++ and Microsoft Visual C++ supported the long double, 80-bit precision data type. In Win32 programming, however, the long double data type maps to the double, 64-bit precision data type. The Microsoft run-time library provides long double versions of the math functions only for backward compatibility. The long double function prototypes are identical to the prototypes for their double counterparts, except that the long double data type replaces the double data type. The long double versions of these functions should not be used in new code.
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|