IPropertyStoreFactory::GetPropertyStore method

Gets an IPropertyStore object that corresponds to the supplied flags.

Syntax


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

Parameters

flags [in]

Type: GETPROPERTYSTOREFLAGS

GETPROPERTYSTOREFLAGS values that modify the store that is returned.

pUnkFactory [in]

Type: IUnknown*

Optional. A pointer to the IUnknown of an object that implements ICreateObject. If pUnkFactory is provided, this method can create the handler instance using ICreateObject rather than CoCreateInstance, if implemented. The reason to provide pUnkFactory is usually to create the handler in a different process. However, for most users, passing NULL in this parameter is sufficient.

riid [in]

Type: REFIID

A reference to IID of the object to create.

ppv [out]

Type: void**

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

Return value

Type: HRESULT

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

Remarks

It is recommended that you use the IID_PPV_ARGS macro, defined in Objbase.h, to package the riid and ppv parameters. This macro provides the correct IID based on the interface pointed to by the value in ppv, which eliminates the possibility of a coding error.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Propsys.h

IDL

Propsys.idl

 

 

Community Additions

ADD
Show:
© 2015 Microsoft