Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

spawnl and NOWAIT

Posted on 1998-10-01
3
Medium Priority
?
512 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 400 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

Independent Software Vendors: 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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

704 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