Condividi tramite


Metodo IIsolatedProcessLauncher::AllowSetForegroundAccess (isolatedapplauncher.h)

Consente alla finestra remota di riflettere ciò che accade nel contenitore.

Sintassi

HRESULT AllowSetForegroundAccess(
  UINT pid
);

Parametri

pid

ID del processo.

Valore restituito

Restituisce un codice HRESULT riuscito o di errore.

Commenti

Avviso

Si tratta di un'API deprecata.

Esempio

Nell'esempio seguente viene illustrato come utilizzare il metodo 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()));

Requisiti

   
Intestazione isolatedapplauncher.h