diff --git a/wv2util/ExperimentalFeature.cs b/wv2util/ExperimentalFeature.cs
index e92a8f8..ce79f8f 100644
--- a/wv2util/ExperimentalFeature.cs
+++ b/wv2util/ExperimentalFeature.cs
@@ -128,8 +128,8 @@ public ExperimentalFeatureList()
"COREWEBVIEW2_HOSTING_MODE_WINDOW_TO_VISUAL",
null)
{
- Name = "Windows to visual hosting",
- Description = "Host apps use visual hosting instead of regular window hosting."
+ Name = "Window-to-Visual hosting",
+ Description = "Host apps use window-to-visual hosting instead of regular window hosting."
});
// To add more experimental features to the runtimes either:
diff --git a/wv2util/HostAppList.cs b/wv2util/HostAppList.cs
index 3469922..edbb79b 100644
--- a/wv2util/HostAppList.cs
+++ b/wv2util/HostAppList.cs
@@ -61,6 +61,7 @@ public HostAppEntry(
UserDataPath = userDataPath == null ? "Unknown" : userDataPath;
InterestingLoadedDllPaths = interestingLoadedDllPaths;
BrowserProcessPID = browserProcessPid;
+ VisualHosting = IsProcessInVisualHosting(pid);
}
public string DisplayLabel
@@ -89,6 +90,7 @@ public string DisplayLabel
public string ExecutablePathDirectory => Path.GetDirectoryName(ExecutablePath);
public int PID { get; private set; } = 0;
public int ParentPID { get; private set; } = 0;
+ public bool VisualHosting { get; private set; }
public string PIDAndStatus =>
"" + PID +
(this.Status != HostAppStatus.Running ? " " + this.StatusDescription : "");
@@ -124,6 +126,14 @@ public enum HostAppStatus
public HostAppStatus Status { get; set; } = HostAppStatus.Running;
public string StatusDescription => this.Status == HostAppStatus.Running ? "Running" : "Terminated";
+ public static bool IsProcessInVisualHosting(int pid)
+ {
+ string value;
+ if (!Process.GetProcessById(pid).StartInfo.Environment.TryGetValue("COREWEBVIEW2_FORCED_HOSTING_MODE", out value))
+ return false;
+ return value == "COREWEBVIEW2_HOSTING_MODE_WINDOW_TO_VISUAL";
+ }
+
public int CompareTo(HostAppEntry other)
{
int result = this.ExecutablePath.ToLower().CompareTo(other.ExecutablePath.ToLower());
diff --git a/wv2util/MainWindow.xaml b/wv2util/MainWindow.xaml
index 7336b1b..ee3beb1 100644
--- a/wv2util/MainWindow.xaml
+++ b/wv2util/MainWindow.xaml
@@ -230,6 +230,8 @@
+
+