ISideShowNotificationManager::Revoke Method 

Revokes a specific notification.

Declaration

[C++]

HRESULT Revoke(
    const NOTIFICATION_ID in_notificationId
);

Parameters

in_notificationId

[in] A numeric value that uniquely identifies the notification to be revoked.

Return Values

Possible values include, but are not limited to, those in the following table.

HRESULT value

Description

S_OK

Success.

S_FALSE

Either there are no Windows SideShow-compatible devices associated with this gadget, or notification revocation failed for at least one connected device.

E_FAIL

The Windows SideShow platform is not properly initialized.

Remarks

The numeric identifier passed as the value of the in_notificationId parameter must be the same as the value of the NotificationId property of the ISideShowNotification interface passed to the corresponding Show method.

Some Windows SideShow-compatible devices may not support notifications. Calling this method does not affect such devices.

Example

This example demonstrates how Windows SideShow gadgets can revoke previously shown notifications by passing the corresponding notification identifier to the Windows SideShow platform.

[C++]

HRESULT hr;

//
// Call Revoke using a previously established pointer to the
// NotificationManager object. In this example, NotificationID
// is a variable of type NOTIFICATION_ID that contains the
// notification identifier of the notification to be revoked.
// Also, check for failure.
//
hr = pISideShowNotificationManager->Revoke(NotificationID);

if (FAILED(hr))
{
    //
    // Handling of failures will be application-specific.
    //
    HandleFailure("Revoke", hr);
}

Applies To

ISideShowNotificationManager

See Also

Concepts

ISideShowNotificationManager::Show Method
ISideShowNotificationManager::RevokeAll Method