Re: Console window opening during system() call inside GTK User Interface
- From: vijayasarathy setsindia net
- To: "Allin Cottrell" <cottrell wfu edu>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Console window opening during system() call inside GTK User Interface
- Date: Tue, 15 Jan 2008 11:06:34 +0530 (IST)
Thanks Allin, but now I have a slightly different problem:
I have a GTK base GUI, which takes an exe as input[from a text box entry]
and passes it to a function in a library, where there is a system() call.
So, there is no direct system() call in the GTK call back or main function
itself, GTK simply passes values to the library function, which calls
system(). And here is where the console window pops up.
Vijay
On Tue, January 15, 2008 7:29 am, Allin Cottrell wrote:
vijayasarathy wrote:
At some point of time inside the UI, I have to get an exe file
from the user, and then invoke the system() call to run the exe as if it
were run from a shell ...
When I invoke the system call from a call back function and run
the exe in windows, the problem is that another console window keeps
opening...
Using system() is a very bad idea on MS Windows. You should see
what glib offers in the way of spawning processes, e.g. at
http://developer.gimp.org/api/2.0/glib/glib-Spawning-Processes.html
If you need even more fine-grained control look at the win32 API:
http://msdn2.microsoft.com/en-us/library/ms682425(VS.85).aspx
Allin Cottrell
*************************************************************************************
DISCLAIMER
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may
contain confidential and privileged information.
Any use,distribution,copying or disclosure by any other person is strictly prohibited. If you have received
this transmission in error please notify SETS immediately either by replying to this e-mail or by telephone
+91-44-28205655 and then delete this e-mail. The sender does not accept any responsibility for any damage
which you sustain as a result of software viruses or malicious programs. You should therefore scan
attachments (if any) prior to opening them.
************************************************************************************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]