[Mono-list] shell does not work on Widnwos Vista

Stephen Liu satimis at yahoo.com
Mon Apr 26 22:26:01 EDT 2010


Hi Jonathan,


Thanks for your advice and URL.

I'm now learning mono/GTK# on mono making a cross platform .exe.  The shell.exe which I'm testing is only a test sample created/compiled by me on mono


On Window Vista "Command Prompt"

C:>@start "" /b "C:\Program Files\Internet Explorer\iexplore.exe" %*
IE started without problem


On Mono-2.6.3 Command Prompt run
C:>mono \path\to\shell.exe

It starts the small window.  

On the said window run;
@start "" /b "C:\Program Files\Internet Explorer\iexplore.exe" %*

OR
@start "" /b "C:\Program Files\Internet Explorer\iexplore.exe" www.mono-project.com


The small window crashes with following warnings printed on Mono Command Prompt:-
Marshaling clicked signal
Exception in Gtk# callback delegate
Note: Applications can use GLib.ExceptionManager.UnhandledException to handle
the exception.
System.Reflection.TargetInvocationException: Exception has been thrown by the ta
rget of an invocation. ---> System.ComponentModel.Win32Exception: ApplicationNam
e='@start', CommandLine='""', CurrentDirectory=''
at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartIn
fo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown
>:0
at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInf
o startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>
:0
at System.Diagnostics.Process.Start () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
at MainWindow.onButtonRunClicked (System.Object sender, System.EventArgs e) [0
x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (ob
ject,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invoke
Attr, System.Reflection.Binder binder, System.Object[] parameters, System.Global
ization.CultureInfo culture) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invoke
Attr, System.Reflection.Binder binder, System.Object[] parameters, System.Global
ization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] par
ameters) [0x00000] in <filename unknown>:0
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <file
name unknown>:0
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000]
in <filename unknown>:0
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <filename
unknown>:0
at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args
) [0x00000] in <filename unknown>:0
at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in <file
name unknown>:0
at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val,
UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal
_data) [0x00000] in <filename unknown>:0
at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean
is_terminal)
at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val,
UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal
_data)
at Gtk.Application.gtk_main()
at Gtk.Application.Run()
at shell.MainClass.Main(System.String[] args)
- end -
 
 
> If you just want to open a web page in the user's default browser, use:
> Process.Start ("http://www.mono-project.com");

Could you please explain in more detail.  Whether to edit the codes and recompile the same?  Then can the program work on Linux?

TIA

B.R.
satimis


 


----- Original Message ----
From: Jonathan Pobst <monkey at jpobst.com>
To: Stephen Liu <satimis at yahoo.com>
Cc: mono-list at lists.ximian.com
Sent: Tue, April 27, 2010 12:53:08 AM
Subject: Re: [Mono-list] shell does not work on Widnwos Vista

On 4/26/2010 11:39 AM, Stephen Liu wrote:
> However it can't work on Vista.
>
> Start ->  Mono 2.6.3 for Windows ->  Mono-2.6.3 Command Prompt
>
> C>mono \path\to\shell.exe
>
> Starts the small window ->  on top box, type "firefox www.mono-project.com" (without quote) ->
> The said small window closes.  Following are the output on mono-2.6.3 command prompt

'firefox' is not a program on Windows.  You will have to find where 
firefox.exe is on the target machine, and then use the full path to it.

- Or -

If you just want to open a web page in the user's default browser, use:

Process.Start ("http://www.mono-project.com");

This will work on every system.

Jonathan





More information about the Mono-list mailing list