Exemplo n.º 1
0
 private void Launch(IPublicAPI api)
 {
     try
     {
         var                   appManager = new ApplicationActivationManager();
         uint                  unusedPid;
         const string          noArgs  = "";
         const ACTIVATEOPTIONS noFlags = ACTIVATEOPTIONS.AO_NONE;
         appManager.ActivateApplication(UserModelId, noArgs, noFlags, out unusedPid);
     }
     catch (Exception)
     {
         var name    = "Plugin: Program";
         var message = $"Can't start UWP: {DisplayName}";
         api.ShowMsg(name, message, string.Empty);
     }
 }
Exemplo n.º 2
0
 public virtual extern void ActivateApplication([MarshalAs(UnmanagedType.LPWStr), In] string appUserModelId, [MarshalAs(UnmanagedType.LPWStr), In] string arguments, [In] ACTIVATEOPTIONS options, out uint processId);
 public HRESULT ActivateApplication([NativeTypeName("LPCWSTR")] ushort *appUserModelId, [NativeTypeName("LPCWSTR")] ushort *arguments, ACTIVATEOPTIONS options, [NativeTypeName("DWORD *")] uint *processId)
 {
     return(((delegate * unmanaged <IApplicationActivationManager *, ushort *, ushort *, ACTIVATEOPTIONS, uint *, int>)(lpVtbl[3]))((IApplicationActivationManager *)Unsafe.AsPointer(ref this), appUserModelId, arguments, options, processId));
 }