SHLoadFromPropertyBag

This function loads an object’s property bag with items from another property bag.

Declaration

HRESULT 
SHLoadFromPropertyBag (
    IUnknown *punk, 
    IPropertyBag *ppb);

Parameters

The punk argument provides an arbitrary interface pointer to the object that is to be loaded with items.

The ppb argument provides the address of an IPropertyBag interface from which to obtain items.

Return Value

The function returns zero for success, else an error code.

Behaviour

The object is expected to implement the IPersistPropertyBag interface. Failure to get this interface is failure for the function. The function calls the object’s Load method, passing the given property bag (and no error log). The result from calling the method becomes the result of the function.

Availability

The SHLoadFromPropertyBag function is exported from SHLWAPI.DLL as ordinal 187 in version 5.00 and higher.

Though this function dates from as long ago as 1999, it was still not documented by Microsoft as late as the January 2007 edition of the Windows Vista Software Development Kit (SDK).