473,387 Members | 3,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

system() call in win32 c++ app

When using the function system() in a win32 c++ application, i notice a
seperate shell window opens and closes quickly when the app is run and this
system() call is encountered. Is there a way to suppress or prevent this
seperate shell window from opening or being seen ?

ex:
int result = system("some_other_app.exe arg1 arg2");
Feb 1 '07 #1
1 9499
In article <6F**********************************@microsoft.co m>,
=?Utf-8?B?RXJpY1A=?= <Er***@discussions.microsoft.comwrote:
>When using the function system() in a win32 c++ application, i notice a
seperate shell window opens and closes quickly when the app is run and this
system() call is encountered. Is there a way to suppress or prevent this
seperate shell window from opening or being seen ?
Look up _spawnlp (and cousins) in MSDN, such as
http://msdn2.microsoft.com/en-gb/lib...fd(VS.80).aspx .
Basically, do something like

_spawnlp(_P_NOWAIT, "someprogram", "arg1", "arg2", ... , NULL); // NULL required as last argument.

Nathan Mates
--
<*Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
Feb 1 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
12
by: hykim | last post by:
Hello, everyone. according to MSDN, there is any constructor of System.DirectoryServices.SearchResultCollection Class. if I implement DirectorySearcher.FindAll() method by myself, then how can I...
0
by: Dave McIver | last post by:
Hello all, Any help on this issue appreciated because I am getting a bit stuck! I am using VS.NET 2003. I have wrapped a multithreaded win32 dll using managed C++ and added a C# interface,...
3
by: Sarah | last post by:
I have a function residing in a module that is doing some file copy and database query operations. This function is called from a regular form under a System.Windows.Forms.Timer control. The...
1
by: cwjacklin | last post by:
I read this article on http://msdn.microsoft.com/msdnmag/issues/03/07/NET/ which describes how to invoke C win32 dll from C# But I am running into a weird situation. I have an existing C...
0
by: Mike | last post by:
Hi, I have a collection object bound to a data grid, after I remove an item from the collection, the minute I click on the datagrid I get an error saying the specified argument was out of the...
8
by: =?Utf-8?B?YXVsZGg=?= | last post by:
i trying to collect windows services. i'm getting inconsistencies. the collection works every time locally. but remote collection yields different result depending on my lab environment. 1) in...
62
by: Laurent Deniau | last post by:
I just put the draft of my paper on the web: http://cern.ch/laurent.deniau/html/cos-oopsla07-draft.pdf I would be interested by any feedback from C programmers (with little OO knowledge) to...
3
by: sdDirtySox | last post by:
Hi all, I'm using system to invoke a script remotely on another machine. Something like this: system("/putty/plink.exe" 10.0.0.25 /home/foo); The problem is, sometimes the foo script freezes...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.