Instructs the object to initialize itself using the properties available in the property bag, and to notify the provided error log object when errors occur.
HRESULT Load( IPropertyBag *pPropBag, IErrorLog *pErrorLog );
- [in] The address of the caller's property bag, through which the object can read properties. This cannot be NULL.
- [in] The address of the caller's error log, in which the object stores any errors that occur during initialization. This can be NULL; in which case, the caller does not receive errors.
Returns one of the following values.
S_OK The object successfully initialized itself. E_UNEXPECTED This member was called after IPersistPropertyBag::InitNew was called. The two initialization methods are mutually exclusive. E_POINTER The address in pPropBag is not valid (such as NULL), and the object cannot initialize itself. E_FAIL The object was unable to retrieve a property that is necessary for the object's successful operation. The object was unable to initialize itself completely.
All property loading must take place in the IPersistPropertyBag::Load function call, because the object cannot hold the IPropertyBag pointer.
E_NOTIMPL is not a valid return code, because any object that implements this interface must support the entire functionality of the interface.