Question: I'm running win32 application from UWP application using the following code:

```
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);
    }
}

```

Async handler is called with Completed status, but there is no ErrorCode there. 

How can I get result return code of trusted win32 process?

Thank you!

Answer: 
> 
> How can I get result return code of trusted win32 process?
> 
> 
> 

@HansPassant's suggestion was correct. If you want to get some data from the win32 application process when you use LaunchFullTrustProcessForCurrentAppAsync APIs. You could use a [AppService](https://learn.microsoft.com/en-us/uwp/api/Windows.ApplicationModel.AppService) to pass the data between the UWP and win32 process. 

You could refer to the [code sample](https://github.com/Microsoft/DesktopBridgeToUWP-Samples/blob/8920cd391c0d1b6130b68291ea02089526f5ed79/Samples/SQLServer/BuildDemo/MainPage.xaml.cs#L102) for details.

In this sample, the UWP app uses LaunchFullTrustProcessForCurrentAppAsync to launch a win32 application. The win32 application is used to get data from sqlserver database. In UWP, it uses AppService and ValueSet to pass "connection" to win32 application. In win32 application, it uses AppService and ValueSet to return the data to UWP.
Not a professional way to do it, but I use clip board for passing data between the UWP application and the WPF application (the trusted executable file). We can set data to clip board using the below,

In WPF

```
Clipboard.SetText("Hello, clipboard"); 

```

In UWP

```
var dataPackage = new Windows.ApplicationModel.DataTransfer.DataPackage();
dataPackage.SetText(file.Path);
Windows.ApplicationModel.DataTransfer.Clipboard.SetContent(dataPackage);

```

**Note** I use this solution in a well known environment that will not be any issues due to multi threading or asynchronous changes in clip board. So ensure yourself before using this solution.