mail-archives/gtk-sharp-list/2002-September/000364.html

81 строка
2.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Gtk-sharp-list] spawning apps
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:duncan%40ximian.com">
<META NAME="robots" CONTENT="index,nofollow">
<LINK REL="Previous" HREF="000363.html">
<LINK REL="Next" HREF="000365.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Gtk-sharp-list] spawning apps
</H1>
<B>Duncan Mak
</B>
<A HREF="mailto:duncan%40ximian.com"
TITLE="[Gtk-sharp-list] spawning apps">duncan@ximian.com
</A><BR>
<I>19 Sep 2002 10:08:23 -0400</I>
<P><UL>
<LI> Previous message: <A HREF="000363.html">[Gtk-sharp-list] spawning apps
</A></li>
<LI> Next message: <A HREF="000365.html">[Gtk-sharp-list] spawning apps
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#364">[ date ]</a>
<a href="thread.html#364">[ thread ]</a>
<a href="subject.html#364">[ subject ]</a>
<a href="author.html#364">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>On Thu, 2002-09-19 at 09:08, Glenn Pierce wrote:
&gt;<i> Currently I am doing something like this
</I>&gt;<i>
</I>&gt;<i> [DllImport(&quot;glib-2.0&quot;)]
</I>&gt;<i> static extern bool g_spawn_command_line_sync (string command,
</I>&gt;<i> string[] std_out, string[] std_err, int exit_status, IntPtr err);
</I>&gt;<i>
</I>
Have you tried using the Process class? You can spawn a command like
this:
using System.Diagnostics;
static void Main (string [] args)
{
string command = args [0];
Process p = new Process ();
p.StartInfo.FileName = command;
p.Start ();
...
}
--
Duncan Mak &lt;<A HREF="mailto:duncan@ximian.com">duncan@ximian.com</A>&gt;
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI> Previous message: <A HREF="000363.html">[Gtk-sharp-list] spawning apps
</A></li>
<LI> Next message: <A HREF="000365.html">[Gtk-sharp-list] spawning apps
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#364">[ date ]</a>
<a href="thread.html#364">[ thread ]</a>
<a href="subject.html#364">[ subject ]</a>
<a href="author.html#364">[ author ]</a>
</LI>
</UL>
</body></html>