When I try to start a new process, it finds the file to execute (as before, it threw another exception), but throws a denial of access to the exception. There is a similar problem here, but only part of the rights and permissions makes sense to me from the answers, which may be the problem. It was also an idea not to set RedirectStandardOutput to true to detect an error, so I disabled this line. Do I need special permissions, manifest entries, or something similar to enable the start of a new process from my Android application?
This is my code:
try { string strToFolder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), fileName = "stockfish-8-armeabi-v7a"; ProcessStartInfo psi = new ProcessStartInfo(); psi.FileName = System.IO.Path.Combine(strToFolder, fileName); psi.UseShellExecute = false; psi.CreateNoWindow = true; psi.WorkingDirectory = strToFolder; //psi.RedirectStandardOutput = true; //psi.RedirectStandardError = true; stockfishProcess = new System.Diagnostics.Process(); stockfishProcess.StartInfo = psi; stockfishProcess.Start(); } catch (Exception e) { string estr = e.ToString(); initialized = false; }
And this is the exception text
System.ComponentModel.Win32Exception (0x80004005): ApplicationName = '/data/user/0/AlienChessAndroid.AlienChessAndroid/files/stockfish-8-armeabi-v7a', CommandLine = '', CurrentDirectory = '///0/AlienChessAndroid.AlienChessAndroid/', = System.Diagnostics.Process.StartWithCreateProcess(System.Diagnostics.ProcessStartInfo startInfo) [0x0018b] /Users/builder/data/lanes/ 4009/3a62f1ea/source/mono/mcs/class/System/System.Diagnostics/Process.cs:737
, . .
string[] cmd = { "chmod", "744", Path.Combine(strToFolder, fileName) }; Java.Lang.Runtime.GetRuntime().Exec(cmd);
, .
, , , , . java (stockfish-8-armeabi-v7a)., ( PInvoke).
.
Source: https://habr.com/ru/post/1678434/More articles:Yahoo Finance intraday data with new API (May 2017) - yahoo-apiHow to replace maximum column values with 1.0 using Theano? - pythonПочему я получаю разные результаты, если я использую first() vs last() в QuerySet с длиной 1 - pythonКак я могу включить (или расширить) основную функцию Odoo из ListView (например, Instance.web.ListView.extend) - javascriptEncounter order collections - best practice and example - javaHow to evenly distribute the circumference of an ellipse? - pythonProcess.Start () throws an "Access Denied" error - redirectHow does the linker handle identical template instances between translation units? - c ++Find equidistant points on an ellipse or basieux curves - javascriptThe difference between MOV r / m8, r8 and MOV r8, r / m8 - assemblyAll Articles