IIsolatedProcessLauncher::AllowSetForegroundAccess 方法 (isolatedapplauncher.h)
允许远程窗口反映容器中发生的情况。
语法
HRESULT AllowSetForegroundAccess(
UINT pid
);
参数
pid
进程 ID。
返回值
返回 HRESULT 成功或错误代码。
注解
警告
这是一个已弃用的 API。
示例
下面的示例显示如何使用 AllowSetForegroundAccess
方法。
wil::com_ptr<IIsolatedProcessLauncher> isolatedProcessLauncher;
THROW_IF_FAILED(CoCreateInstance(
CLSID_IsolatedAppLauncher,
NULL,
CLSCTX_LOCAL_SERVER,
IID_PPV_ARGS(&isolatedProcessLauncher)));
THROW_IF_FAILED(isolatedProcessLauncher->AllowSetForegroundAccess(GetCurrentProcessId()));
要求
标头 | isolatedapplauncher.h |
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈