我从UWP应用程序使用下面的代码运行Win32应用程序:返回码LaunchFullTrustProcessForCurrentAppAsync
var operation = FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync(groupId);
operation.Completed = new AsyncActionCompletedHandler(asyncHandler);
....
private static void asyncHandler(IAsyncAction asyncInfo, AsyncStatus status)
{
if (status == AsyncStatus.Completed)
{
System.Diagnostics.Debug.WriteLine(asyncInfo.ToString());
System.Diagnostics.Debug.WriteLine(asyncInfo.ErrorCode);
}
}
的异步处理函数被调用,完成状态,但没有错误代码出现。
如何获得可信的win32进程的结果返回码?
谢谢!
它只是启动应用程序,它不会等到它完成。所以不,没有什么可以找到它的。 –
明白了。是否有可能等待进程完成或在其上设置回调? – algor