[Mono-list] g_spawn_command_line_async

A Rafael D Teixeira rafael.teixeirabr@terra.com.br
Tue, 22 Mar 2005 14:27:04 -0300


Please use the managed (portable) classes to do that:

System.Diagnostics.Process

or

System.Diagnostics.ProcessStartInfo

See monodoc or msdn for documentation.

:)

On Mon, 2005-03-21 at 22:39 +0000, Phillip Neumann wrote:
> Hello.
> 
> 
> Im trying to start a new proces in the background with:
> 
>     g_spawn_command_line_async("command", IntPtr.Zero);
> 
> 
> it works fine on this unix mashine, but im trying the same on windows 
> and it has no effect...
> i have this:
> 
> 
>     [DllImport("libglib-2.0-0.dll")]
>     static extern bool g_spawn_command_line_async (string command, 
> IntPtr err);
>     public void RealPlayerStart(){
>         if (((int) System.Environment.OSVersion.Platform) >= 4){
>             //UNIX
>             g_spawn_command_line_async ("mpg123 
> http://sofsis.cl:8000/128.mp3", IntPtr.Zero);   
>         }
>         else{ //Windows
>             string s = "\"%ProgramFiles%\\Windows Media 
> Player\\wmplayer.exe\" http://sofsis.cl:8000/128.mp3";
>             Console.WriteLine("win32> "+s);
>             g_spawn_command_line_async (s, IntPtr.Zero);   
>         }
>     }
> 
> 
> on windows i get this output:
> 
>     win32>  %ProgramFiles%\Windows Media Player\wmplayer.exe" 
> http://sofsis.cl:8000/128.mp3
> 
> 
> witch looks fine, thinking that when i execute that on the msdos prompt 
> it works.. i.e. open the mediaplayer
> 
> 
> 
> 
> 
> whats the matter?
> 
> is this just not implemented on windows glib?
> 
> 
> 
> PD: im using mono 1.1.4 + gtk# installer
> 
> 
> 
> 
> thanks in advance!
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://mail.terra.com.br/protected_email/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,1111459340.479403.25774.malavi.terra.com.br,4878,Des15,Des15
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 21/03/2005 / Versão: 4.4.00 - Dat 4451
> Proteja o seu e-mail Terra: http://mail.terra.com.br/
>