|
|
|
IRootStorage Interface |
|
IID_IRootStorage |
{00000012-0000-0000-C000-000000000046} |
|
The IRootStorage 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 IStorage::Commit is guaranteed to not consume additional memory.
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. This interface is also useful on older systems where limits on file handles can be exceeded.
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 in VTable order |
|
|
IUnknown Methods |
Description |
|
QueryInterface |
Returns pointers to supported interfaces. |
|
AddRef |
Increments reference count. |
|
Release |
Decrements reference count. |
|
IRootStorage Methods |
Description |
|
SwitchToFile |
Copies the file underlying this root storage object, and then associates this storage with the copied file. |
|
QueryInterface |
|
FUNCTION IRootStorage_QueryInterface ( _ BYVAL pthis AS DWORD PTR _ , BYREF riid AS GUID _ , BYREF ppvObj AS DWORD _ ) AS LONG
END FUNCTION
|
|
AddRef |
|
FUNCTION IRootStorage_AddRef ( _ BYVAL pthis AS DWORD PTR _
)
AS DWORD
LOCAL DWRESULT
AS LONG END FUNCTION
|
|
Release |
|
FUNCTION IRootStorage_Release ( _ BYVAL pthis AS DWORD PTR _
)
AS DWORD
LOCAL DWRESULT
AS DWORD END FUNCTION
|
|
SwitchToFile |
|
FUNCTION Proto_IRootStorage_SwitchToFile ( _ BYVAL pthis AS DWORD PTR _ , BYVAL pszFile AS DWORD _ )
AS LONG FUNCTION IRootStorage_SwitchToFile ( _ BYVAL pthis AS DWORD PTR _ , BYVAL strFile AS STRING _ )
AS LONG LOCAL HRESULT AS LONG LOCAL pszFile AS DWORD
IF LEN(strFile)
THEN pszFile = STRPTR(strFile)
END IF END FUNCTION
|
Page last updated on Friday, 17 March 2006 23:23:32 +0100