IPackageDebugSettings::RegisterForPackageStateChanges method
Register for package state-change notifications.
Syntax
HRESULT RegisterForPackageStateChanges( [in] LPCWSTR packageFullName, [in] IPackageExecutionStateChangeNotification *pPackageExecutionStateChangeNotification, [out] DWORD *pdwCookie );
Parameters
- packageFullName [in]
-
The package full name.
- pPackageExecutionStateChangeNotification [in]
-
Package state-change notifications are delivered by the OnStateChanged function on pPackageExecutionStateChangeNotification.
- pdwCookie [out]
-
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
|
Minimum supported client |
Windows 8 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2012 [desktop apps only] |
|
Header |
|
|
IDL |
|
See also
Show: