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