This method of the IPersistStorage interface initializes a new object, providing a pointer to the storage to be used for the object.
public void InitNew(IStorage pstg);
S_OK -- The new storage object was successfully initialized.
CO_E_ALREADYINITIALIZED -- The object has already been initialized by a previous call to either the IPersistStorage.Load method or the IPersistStorage.InitNew method.
E_OUTOFMEMORY -- The storage object was not initialized due to a lack of memory.
E_FAIL -- The storage object was not initialized for some reason other than a lack of memory.
[in] pstg | The IStorage pointer to the new storage object to be initialized. The container creates a nested storage object in its storage object (see CreateStorage). Then, the container calls the WriteClassStg function to initialize the new storage object with the object class identifier (CLSID). |