"Shell function" in VB 
Author Message
 "Shell function" in VB

Question: What is the equivalent approach in a C++ console
application to the "Shell function" in VB to start running
another application?

For example:

Dim RetVal
RetVal = Shell("C:\WINDOWS\CALC.EXE", 1)      



Wed, 20 Apr 2005 12:42:47 GMT  
 "Shell function" in VB
CreateProcess(...);
With CreateProcess(...), you can wait for the process execution using
WaitForSingleObject(PROCESS_INFORMATION.hProcess).
You can use also WinExec, but it's obsolete.


Question: What is the equivalent approach in a C++ console
application to the "Shell function" in VB to start running
another application?

For example:

Dim RetVal
RetVal = Shell("C:\WINDOWS\CALC.EXE", 1)



Wed, 20 Apr 2005 23:06:55 GMT  
 "Shell function" in VB

Quote:
> Question: What is the equivalent approach in a C++ console
> application to the "Shell function" in VB to start running
> another application?

> For example:

> Dim RetVal
> RetVal = Shell("C:\WINDOWS\CALC.EXE", 1)

ShellExecute() is available, too. It is somewhat easier to use though less
capable than CreateProcess().

Regards,
Will



Thu, 21 Apr 2005 00:43:22 GMT  
 "Shell function" in VB
Another simple approach in C++ which is equivalent to Shell:

    ShellExecute(NULL, "open", "mysample.exe", "parameter value i want to
pass", szApplicationPathComesHere, 1);

HTH,

--
---------------------------------------------------------------
Vimal Kumar, Delhi (India) "C++/VC++/COM/FileNET Internals"
"Quality speaks - first time, every time"
favorite links:
http://www.codeguru.com
http://www.mindfiresolutions.com
---------------------------------------------------------------


Quote:
> CreateProcess(...);
> With CreateProcess(...), you can wait for the process execution using
> WaitForSingleObject(PROCESS_INFORMATION.hProcess).
> You can use also WinExec, but it's obsolete.



> Question: What is the equivalent approach in a C++ console
> application to the "Shell function" in VB to start running
> another application?

> For example:

> Dim RetVal
> RetVal = Shell("C:\WINDOWS\CALC.EXE", 1)



Sat, 23 Apr 2005 18:12:05 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. VB "project style" app shell

2. VB "now()" function in C#

3. reading output from "exec"ed shell command

4. Implementing "cp" shell command

5. Want sample code for "shell"

6. strange things "Shell Shadow"

7. Newbie: What exactly is "The Shell"?

8. Passing "callback" function to a function

9. The equivalent of VB "with"

10. Equivalent of "VB Modules" in C#

11. Rules for "implements" in VB

12. VB accessing a "C++ DLL"

 

 
Powered by phpBB® Forum Software