[Gtk-sharp-list] spawning apps

Glenn Pierce glennpierce@connectfree.co.uk
19 Sep 2002 13:08:26 +0000


--=-msD1KqAYVJw6nF/d7b1H
Content-Type: text/plain
Content-Transfer-Encoding: 7bit


Does anyone not how I can pass parameters to 

gboolean    g_spawn_command_line_sync       (const gchar *command_line,
                                             gchar **standard_output,
                                             gchar **standard_error,
                                             gint *exit_status,
                                             GError **error);

so I can recieve the standard output in a string, but I not sure which
paramets to pass.

The example in gnome-hellooworld does not need to get any return output.

Currently I am doing something like this

[DllImport("glib-2.0")]
         static extern bool g_spawn_command_line_sync (string command,
string[] std_out, string[] std_err, int exit_status, IntPtr err);


ps  I have tried the process classes from System.Diagnostics but can't
get them working.


Thanks for the help



_____________________________

--=-msD1KqAYVJw6nF/d7b1H
Content-Type: text/html; charset=utf-8

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/1.0.4">
</HEAD>
<BODY>

<BR>
Does anyone not how I can pass parameters to 
<BR>

<BR>
gboolean&nbsp;&nbsp;&nbsp; g_spawn_command_line_sync&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (const gchar *command_line,
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gchar **standard_output,
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gchar **standard_error,
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gint *exit_status,
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GError **error);
<BR>

<BR>
so I can recieve the standard output in a string, but I not sure which paramets to pass.
<BR>

<BR>
The example in gnome-hellooworld does not need to get any return output.
<BR>

<BR>
Currently I am doing something like this
<BR>

<BR>
[DllImport(&quot;glib-2.0&quot;)]
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; static extern bool g_spawn_command_line_sync (string command, string[] std_out, string[] std_err, int exit_status, IntPtr err);
<BR>

<BR>

<BR>
ps&nbsp; I have tried the process classes from System.Diagnostics but can't get them working.
<BR>

<BR>

<BR>
Thanks for the help
<BR>

<BR>

<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<A HREF="mailto:glennpierce@connectree.co.uk"><FONT COLOR="#808080"><FONT SIZE="2"></FONT></FONT></A>
<BR>
<FONT COLOR="#6c51e8">_____________________________</FONT>
</TD>
</TR>
</TABLE>

</BODY>
</HTML>

--=-msD1KqAYVJw6nF/d7b1H--