Freigeben über


IRootStorage:IUnknown (Windows CE 5.0)

Send Feedback

This interface contains a single method that switches a storage object to a different underlying file and saves the storage object to that file.

The save operation occurs even with low memory conditions and uncommitted changes to the storage object.

A subsequent call to the IStorage::Commit method is guaranteed not to consume additional memory.

When to Implement

Storage objects that are based on a file should implement IRootStorage in addition to the IStorage interface. For storage objects that are not file-based, this interface is not necessary.

OLE provides an implementation of a storage object, including the IRootStorage interface, as part of its compound file implementation.

When to Use

The primary use for the IRootStorage interface is to save a storage object to a file during low memory conditions. Typically, the container application calls the IRootStorage interface to switch to a new file.

If you have an IStorage pointer to a compound file object, you can call IStorage::QueryInterface with IID_IRootStorage to obtain a pointer to the IRootStorage interface.

Methods

The following table shows the method for this interface.

Method Description
SwitchToFile Copies the file underlying this root storage object, then associates this storage with the copied file.

Remarks

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Objidl.h, Objidl.idl.
Link Library: Ole32.lib, Uuid.lib.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.