[Mono-dev] a set of tests to find out the difference between .Net and Mono implementation (Mono-devel-list Digest, Vol 113, Issue 25)

何子杰Hzj_jie hzj_jie at hotmail.com
Tue Sep 16 14:50:36 UTC 2014


Yes, in the scenario to start a URL or an xls file, the behavior is correct. But think about a different scenario, the logic extract a set of files from a gzip package to the hard disk, start the executable file in the package, the Process.Start will fail. And except for some tricks, dev cannot chmod the file, since there is no native API to call chmod in Windows. Refer to https://geminibranch.codeplex.com/SourceControl/latest#osi/root/utils/mono/chmod.vb. The implementation is not so beautiful. Since you need to load the assembly at runtime.

.Hzj_jie
________________________________
From: Nikita Tsukanov<mailto:keks9n at gmail.com>
Sent: ‎16/‎9/‎2014 21:19
To: Jo Shields<mailto:directhex at apebox.org>
Cc: mono-devel-list<mailto:mono-devel-list at lists.ximian.com>
Subject: Re: [Mono-dev] a set of tests to find out the difference between .Net and Mono implementation (Mono-devel-list Digest, Vol 113, Issue 25)

 >>If you really mean to execute an arbitrary file
(Process.Start("foo.xlsx") will open foo.xlsx in Excel, on Windows, for
example) then call "/usr/bin/xdg-open thing" - this is probably the most
useful use-case, and is also valid when thing is a URL, opening in the
default browser.
AFAIK, xdg-open is used by Mono implementation of Process.Start if
UseShellExecute=true (which is default). It's same on Windows -
CreateProcess doesn't start Excel, it returns you an error, while
ShellExecute does.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20140916/1b43f9ec/attachment.html>
-------------- next part --------------
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


More information about the Mono-devel-list mailing list