IPersistStreamInit::Load method

Initializes an object from the stream where it was saved previously.

Syntax


HRESULT Load(
  [in] LPSTREAM pStm
);

Parameters

pStm [in]

An IStream pointer to the stream from which the object should be loaded.

Return value

This method can return the following values.

Return codeDescription
S_OK

The method completed successfully.

E_OUTOFMEMORY

The object was not loaded due to lack of memory.

E_FAIL

The object was not loaded due to some reason other than a lack of memory.

 

Remarks

If the object has already been initialized with IPersistStreamInit::InitNew, then this method must return E_UNEXPECTED.

This method loads an object from its associated stream. The seek pointer is set as it was in the most recent IPersistStreamInit::Save method. This method can seek and read from the stream, but cannot write to it.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

OCIdl.h

IDL

OCIdl.idl

IID

IID_IPersistStreamInit is defined as 7FD52380-4E07-101B-AE2D-08002B2EC713

See also

IPersistStreamInit

 

 

Show: