diff --git a/src/host/exe/Host.EXE.vcxproj b/src/host/exe/Host.EXE.vcxproj
index 3deb6f37f3..6c21ade7a8 100644
--- a/src/host/exe/Host.EXE.vcxproj
+++ b/src/host/exe/Host.EXE.vcxproj
@@ -88,6 +88,7 @@
true
winmm.lib;imm32.lib;%(AdditionalDependencies)
+ ext-ms-win-com-ole32-l1.dll
icu.dll;%(DelayLoadDLLs)
diff --git a/src/host/srvinit.cpp b/src/host/srvinit.cpp
index 883489fea4..942865e89a 100644
--- a/src/host/srvinit.cpp
+++ b/src/host/srvinit.cpp
@@ -544,6 +544,7 @@ try
myStartupInfo.wShowWindow = settings.GetShowWindow();
+ if (IsApiSetImplemented("ext-ms-win-com-ole32-l1-1-1"))
{
HRESULT hr = CoAllowSetForegroundWindow(handoff.Get(), nullptr);
TraceLoggingWrite(g_hConhostV2EventTraceProvider, "PtyHandoffAllowSetForegroundWindow", TraceLoggingHResult(hr));