IPropertyStoreFactory::GetPropertyStore method (propsys.h)

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

[in] flags

Type: GETPROPERTYSTOREFLAGS

GETPROPERTYSTOREFLAGS values that modify the store that is returned.

[in] pUnkFactory

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.

[in] riid

Type: REFIID

A reference to IID of the object to create.

[out] ppv

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

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header propsys.h