Поделиться через


ISideShowContentManager::Remove Method 

Removes a specific item of content from the caches of the devices that are associated with the Windows SideShow gadget.

Declaration

[C++]

HRESULT Remove(
    const CONTENT_ID in_contentId
);

Parameters

in_contentId

[in] The identifier associated with the content that the Windows SideShow gadget is specifying for the Windows SideShow platform to remove from the caches of the devices that are associated with the gadget.

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 devices associated with the Windows SideShow gadget, or content removal failed for at least one connected device.

E_FAIL

The Windows SideShow platform is not properly initialized.

Remarks

If the item of content that is associated with the passed identifier exists in the cache of any associated device, it is removed. There is no guarantee, however, that the identified content actually exists in the cache of any connected device, nor that any specific device is currently connected.

If an device is not connected when this call is made and the content that is to be removed exists in its cache, it is not automatically removed when the device is reconnected.

Example

This example demonstrates how Windows SideShow gadgets can remove previously added content by passing the corresponding content identifier to the Windows SideShow platform.

[C++]

HRESULT hr;

//
// Call Remove using a previously established pointer to the
// ContentManager object. In this example, ContentID is a variable
// of type CONTENT_ID that contains the content identifier of the
// content to be removed. Also, check for failure.
//
hr = pISideShowContentManager->Remove(ContentID);

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

Applies To

ISideShowContentManager

See Also

Concepts

ISideShowContentManager::RemoveAll Method