Condividi tramite


Metodo IPackageDebugSettings::RegisterForPackageStateChanges (shobjidl_core.h)

Registrare le notifiche di modifica dello stato del pacchetto.

Sintassi

HRESULT RegisterForPackageStateChanges(
  [in]  LPCWSTR                                  packageFullName,
  [in]  IPackageExecutionStateChangeNotification *pPackageExecutionStateChangeNotification,
  [out] DWORD                                    *pdwCookie
);

Parametri

[in] packageFullName

Nome completo del pacchetto.

[in] pPackageExecutionStateChangeNotification

Le notifiche di modifica dello stato del pacchetto vengono recapitate dalla funzione OnStateChanged in pPackageExecutionStateChangeNotification.

[out] pdwCookie

Identificatore di registrazione univoco per il listener corrente. Usare questo identificatore per annullare la registrazione per le notifiche di modifica dello stato del pacchetto usando il metodo UnregisterForPackageStateChanges .

Valore restituito

Se questo metodo ha esito positivo, restituisce S_OK. In caso contrario, restituisce un codice di errore HRESULT .

Commenti

Le notifiche vengono generate quando il pacchetto entra in esecuzione, sospendendo e sospendendo gli stati.

Requisiti

   
Client minimo supportato Windows 8 [solo app desktop]
Server minimo supportato Windows Server 2012 [solo app desktop]
Piattaforma di destinazione Windows
Intestazione shobjidl_core.h

Vedi anche

IPackageDebugSettings

IPackageExecutionStateChangeNotification

UnregisterForPackageStateChanges