Click here to Skip to main content
15,922,155 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Staticly linked MFC Pin
Randor 31-Dec-05 4:15
professional Randor 31-Dec-05 4:15 
GeneralRe: Staticly linked MFC Pin
DavidR_r31-Dec-05 6:41
DavidR_r31-Dec-05 6:41 
QuestionIs there any arraylist available in C++??? Pin
Ming Luo31-Dec-05 3:39
Ming Luo31-Dec-05 3:39 
AnswerRe: Is there any arraylist available in C++??? Pin
Prakash Nadar31-Dec-05 3:59
Prakash Nadar31-Dec-05 3:59 
AnswerRe: Is there any arraylist available in C++??? Pin
markkuk31-Dec-05 13:21
markkuk31-Dec-05 13:21 
Questionhappy new year, everyone! Pin
includeh1031-Dec-05 1:47
includeh1031-Dec-05 1:47 
AnswerRe: happy new year, everyone! Pin
Prakash Nadar31-Dec-05 4:03
Prakash Nadar31-Dec-05 4:03 
GeneralRe: happy new year, everyone! Pin
includeh1031-Dec-05 5:15
includeh1031-Dec-05 5:15 
GeneralRe: happy new year, everyone! Pin
Prakash Nadar31-Dec-05 5:43
Prakash Nadar31-Dec-05 5:43 
GeneralRe: happy new year, everyone! Pin
John R. Shaw31-Dec-05 18:34
John R. Shaw31-Dec-05 18:34 
GeneralRe: happy new year, everyone! Pin
ThatsAlok1-Jan-06 18:54
ThatsAlok1-Jan-06 18:54 
Questionhow does one prevent resizing columns in CListCtrl Pin
cpp_prgmer31-Dec-05 0:30
cpp_prgmer31-Dec-05 0:30 
AnswerRe: how does one prevent resizing columns in CListCtrl Pin
Sheng Jiang 蒋晟31-Dec-05 6:13
Sheng Jiang 蒋晟31-Dec-05 6:13 
NewsAt Last! My DCOM Tutorial for VS.NET is Here! Pin
Brian C Hart30-Dec-05 22:29
professionalBrian C Hart30-Dec-05 22:29 
QuestionI donn't find the mistakes! Pin
greenapplezlp30-Dec-05 20:15
greenapplezlp30-Dec-05 20:15 
AnswerRe: I donn't find the mistakes! Pin
QuickDeveloper30-Dec-05 21:43
QuickDeveloper30-Dec-05 21:43 
Generalthank you for your enthusiastic help! Pin
greenapplezlp1-Jan-06 20:03
greenapplezlp1-Jan-06 20:03 
AnswerRe: I donn't find the mistakes! Pin
Polymorpher30-Dec-05 22:13
Polymorpher30-Dec-05 22:13 
GeneralRe: I donn't find the mistakes! Pin
greenapplezlp1-Jan-06 20:03
greenapplezlp1-Jan-06 20:03 
QuestionProblem regarding DirectShow Pin
StarMeteor30-Dec-05 16:46
StarMeteor30-Dec-05 16:46 
QuestionHow to write data to a file when it is in a vector Pin
Larry Mills Sr30-Dec-05 14:12
Larry Mills Sr30-Dec-05 14:12 
AnswerRe: How to write data to a file when it is in a vector Pin
Garth J Lancaster30-Dec-05 15:34
professionalGarth J Lancaster30-Dec-05 15:34 
GeneralRe: How to write data to a file when it is in a vector Pin
Larry Mills Sr1-Jan-06 16:45
Larry Mills Sr1-Jan-06 16:45 
GeneralRe: How to write data to a file when it is in a vector Pin
Garth J Lancaster1-Jan-06 19:34
professionalGarth J Lancaster1-Jan-06 19:34 
QuestionNeed Help with ShellExecute Pin
Klerik8230-Dec-05 10:53
Klerik8230-Dec-05 10:53 
Hi-

Here is my problem-- I am having difficulty getting the following to work properly:
//the following was implemented in VS 2003 using Console App (.NET)

<br />
	string str ="*********";<br />
	str.append("\n psinfo");<br />
	str.append("\n*********\n");<br />
	<br />
        ofstream myfile("C:\\TEMP.txt");<br />
<br />
	        //test file open<br />
                if (!myfile)<br />
		{<br />
		cout << "error opening file" << endl;<br />
		return -1;<br />
<br />
		}<br />
   //write to file "TEMP.txt"<br />
   myfile << str << ShellExecute(NULL, "open", "Psinfo.exe",NULL, "C:\\",SW_SHOWNORMAL)<<endl;<br />
   myfile.close();<br />
<br />
	return 0;


It compiles and runs, its just after execution, when I open the file "Temp.txt", the output is not correct!
here is the output in notepad:

(start output)

*********
psinfo
*********
0000002A

(end output)

So I know that it is writing the string I created and I also know that the Psinfo.exe is executing cause I can see it on the dos prompt. However, the output from the Psinfo.exe is not writing to the text file "TEMP.txt"!

Could anyone shed some light as to why the Psinfo.exe information is not writing to the TEMP.txt file.

FYI- I created a batch file like so...

(start of .bat file)
<br />
@echo off<br />
<br />
rem This env variable stores the log file path.<br />
set PTH=C:\TEMP.txt<br />
<br />
rem  Get basic information about the machine.<br />
<br />
echo ************* >>%PTH%<br />
echo * PSINFO -d * >>%PTH%<br />
echo ************* >>%PTH%<br />
psinfo.exe -d >>%PTH%<br />

(end of .bat file)


and when the batch file is executed, the "TEMP.txt" file opened in notepad is similar to the following output:

(start of output)

*************
* PSINFO -d *
*************
System information for
Uptime:
Kernel version:
Product type:
Product version:
Service pack:
Kernel build number:
Registered organization:
Registered owner:
Install date:
Activation status:
IE version:
System root:
Processors:
Processor speed:
Processor type:
Physical memory:
Video driver:
Volume Type Format Label Size Free Free

(end output)

Which is exactly the output I am trying to get in the TEMP.txt file when implemented in VC++!

Thank you for your time.

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.