Επεξεργασία

Κοινή χρήση μέσω


IPackageDebugSettings::RegisterForPackageStateChanges method (shobjidl_core.h)

Register for package state-change notifications.

Syntax

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

Parameters

[in] packageFullName

The package full name.

[in] pPackageExecutionStateChangeNotification

Package state-change notifications are delivered by the OnStateChanged function on pPackageExecutionStateChangeNotification.

[out] pdwCookie

A unique registration identifier for the current listener. Use this identifier to unregister for package state-change notifications by using the UnregisterForPackageStateChanges method.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Notifications are raised when the package enters the running, suspending, and suspended states.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h

See also

IPackageDebugSettings

IPackageExecutionStateChangeNotification

UnregisterForPackageStateChanges