将StartProcess.dll导入unity
链接:https://pan.baidu.com/s/1qo1wftmlRx0Tj3sMKCWccw
提取码:niwv
静态类InternalServerProcess如下
using System.IO;
using System.Runtime.InteropServices;
using UnityEngine;
internal static class InternalServerProcess
{
public static uint openProcess(string dir, string command)
{
return StartProcess(dir, command);
}
[DllImport("StartProcess")]
static extern uint StartProcess(string dir, string command);
}
调用:打开word并打开指定文档
string winworld = "C:\Program Files\Microsoft Office\root\Office16\WI