Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IShellItem2::GetPropertyStoreWithCreateObject method

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.

Syntax


HRESULT GetPropertyStoreWithCreateObject(
  [in]   GETPROPERTYSTOREFLAGS flags,
  [in]   IUnknown *punkFactory,
  [in]   REFIID riid,
  [out]  void **ppv
);

Parameters

flags [in]

Type: GETPROPERTYSTOREFLAGS

The GETPROPERTYSTOREFLAGS constants that modify the property store object.

punkFactory [in]

Type: IUnknown*

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]

Type: REFIID

A reference to the IID of the object to be retrieved.

ppv [out]

Type: void**

When this method returns, contains the address of the requested IPropertyStore interface pointer.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

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.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.