Uses the specified ICreateObject instead of CoCreateInstance to create an instance of the property handler associated with the Shell item on which this method is called. Most calling applications do not need to call this method, and can call IShellItem2::GetPropertyStore instead.
HRESULT GetPropertyStoreWithCreateObject( [in] GETPROPERTYSTOREFLAGS flags, [in] IUnknown *punkFactory, [in] REFIID riid, [out] void **ppv );
- flags [in]
The GETPROPERTYSTOREFLAGS constants that modify the property store object.
- punkFactory [in]
A pointer to a factory for low-rights creation of type ICreateObject.
The method CreateObject creates an instance of a COM object. The implementation of IShellItem2::GetPropertyStoreWithCreateObject uses CreateObject instead of CoCreateInstance to create the property handler, which is a Shell extension, for a given file type. The property handler provides many of the important properties in the property store that this method returns.
This method is useful only if the ICreateObject object is created in a separate process (as a LOCALSERVER instead of an INPROCSERVER), and also if this other process has lower rights than the process calling IShellItem2::GetPropertyStoreWithCreateObject.
- riid [in]
A reference to the IID of the object to be retrieved.
- ppv [out]
When this method returns, contains the address of the requested IPropertyStore interface pointer.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Note When this method is called on a property store for a file, that file is held open for the lifetime of the IPropertyStore object.
Minimum supported client
|Windows Vista [desktop apps only]|
Minimum supported server
|Windows Server 2008 [desktop apps only]|