|
IPersistStorage::SaveCompleted
Notifies the object that it can revert from NoScribble or HandsOff mode, in
which it must not write to its storage object, to Normal mode, in which it can.
The component object enters NoScribble mode when it receives an IPersistStorage::Save call.
HRESULT SaveCompleted(
IStorage *pStgNew
| //Pointer to the current storage object
| );
|
|
Parameter
pStgNew
[in]Points to the new storage object, if different from the storage object
prior to saving. This pointer can be NULL if the current storage object does not
change during the save operation. If the object is in HandsOff mode, this
parameter must be non-NULL.
Return Values
S_OK
The object was successfully returned to Normal mode.
E_OUTOFMEMORY
The object remained in HandsOff mode or NoScribble mode due to a lack of
memory. Typically, this error occurs when the object is not able to open the
necessary streams and storage objects in pStgNew.
E_INVALIDARG
The pStgNew parameter is not valid. Typically, this error occurs if pStgNew is NULL when the object is in HandsOff mode.
E_UNEXPECTED
The object is in Normal mode, and there was no previous call to IPersistStorage::Save or IPersistStorage::HandsOffStorage.
Comments
This method notifies an object that it can revert to Normal mode and can once
again write to its storage object. The object exits NoScribble mode or HandsOff
mode.
If the object is reverting from HandsOff mode, the pStgNew parameter must be non-NULL. In HandsOffFromNormal mode, this parameter is the
new storage object that replaces the one that was revoked by the IPersistStorage::HandsOffStorage method. The data in the storage object is a copy of the data from the revoked
storage object. In HandsOffAfterSave mode, the data is the same as the data
that was most recently saved. It is not the same as the data in the revoked
storage object.
If the object is reverting from NoScribble mode, the pStgNew parameter can be NULL or non-NULL. If NULL, the component object once again
has access to its storage object. If it is not NULL, the component object should
simulate receiving a call to its IPersistStorage::HandsOffStorage method. If the component object cannot simulate this call, its container must
be prepared to actually call the IPersistStorage::HandsOffStorage method.
The IPersistStorage::SaveCompleted method must recursively call any nested objects that are loaded or running.
If this method returns with an error code, the object is not returned to
Normal mode. Thus, the container object can attempt different save strategies.
See Also
IAdviseSink::OnSave, IOleObject::Close, IPersistStorage::HandsOffStorage, IPersistStorage::Save, IRootStorage::SwitchToFile, OleSave
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|