Solved

spawnl and NOWAIT

Posted on 1998-10-01
3
507 Views
Last Modified: 2012-05-04
I use spawnl(_P_NOWAIT, <path_to_mshearts>); and hearts
will launch while letting my program continue.
I use the same statement with a simple program I made
using Devel.Studio Vis.C++ and it is launched synchronously
instead.
The program I made is a project in MicroSoft's Vis.C++, created as a Win32 Application. It is a simple dialog box which just has a button to end the program.
Why is spawnl ignoring the NOWAIT? Asynchronous spawning should work with a Win32 application right?

Thanks for any tips..
RDR
0
Comment
Question by:rderidder
3 Comments
 

Author Comment

by:rderidder
ID: 1174161
to be exact, the function call which works for hearts is:


_spawnl(_P_NOWAIT,"C:\\Progra~1\\hearts\\mshearts.exe"," ", NULL);

0
 
LVL 8

Accepted Solution

by:
Answers2000 earned 100 total points
ID: 1174162
Why ? Limitation of the runtime library

Use

UINT ui = WinExec( "C:\\Progra~1\\hearts\\mshearts.exe", SW_SHOWNORMAL ) ;

if ( ui <= 31 )
{
 // some kind of error occurred
} else
{
  // spawned okay
}
0
 
LVL 22

Expert Comment

by:nietod
ID: 1174163
I don't see any reason why spawnl() shouldn't be working.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question