Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all:

I can use command line to get the power GUID,
like this:
http://i.imgur.com/86xoMQo.jpg[^]
If I want to set the command and get the result by using MFC, how I can do?
I have researched the articles, like
http://stackoverflow.com/questions/5562877/how-to-get-the-command-line-arguments-in-mfc-applications[^]
A Command Line Class[^]
but I still haven't direction how to do this?

Hope someone can help me,
thank you!

best regard.
Posted

Create a Pipe, redirect stdin and stdout of a new Process which executes the command you want.

http://msdn.microsoft.com/en-us/library/ms682499.aspx[^]

After That wait for completition and read Output of the Process from Pipe.
 
Share this answer
 
v3
I found a easy to solve this problem!
Use <b>ShellExecute </b>function can complete the problem.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900