IPersistStreamInit::InitNew method (ocidl.h)

Initializes an object to a default state. This method is to be called instead of IPersistStreamInit::Load.

Syntax

HRESULT InitNew();

Return value

This method can return the standard return valuesE_OUTOFMEMORY and E_UNEXPECTED, as well as the following values.

Return code Description
S_OK
The method completed successfully.
E_NOTIMPL
The object requires no default initialization. This error code is allowed because an object may choose to implement IPersistStreamInit simply for orthogonality or in anticipation of a future need for this method.

Remarks

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

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ocidl.h

See also

IPersistStreamInit