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

PSCreateMemoryPropertyStore function

Creates an in-memory property store.

Syntax


HRESULT PSCreateMemoryPropertyStore(
  _In_   REFIID riid,
  _Out_  void **ppv
);

Parameters

riid [in]

Type: REFIID

Reference to the requested interface ID.

ppv [out]

Type: void**

When this function returns, contains a pointer to the desired interface, typically IPropertyStore or IPersistSerializedPropStorage.

Return value

Type: HRESULT

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

Remarks

This function creates an in-memory property store object that implements IPropertyStore, INamedPropertyStore, IPropertyStoreCache, IPersistStream, IPropertyBag, and IPersistSerializedPropStorage.

The memory property store does not correspond to a file and is designed for use as a cache. IPropertyStore::Commit is a no-op, and the data stored in the object persists only as long as the object does.

The memory property store is thread safe. It aggregates the free-threaded marshaller and uses critical sections to protect its data members.

Examples

The following example, to be included as part of a larger program, demonstrates how to use PSCreateMemoryPropertyStore.


IPropertyStore *ppropstore;

HRESULT hr = PSCreateMemoryPropertyStore(IID_PPV_ARGS(&ppropstore));

if (SUCCEEDED(hr))
{
    // ppropstore is now valid.  
    ppropstore->Release();
}

Requirements

Minimum supported client

Windows XP with SP2, Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 with SP1 [desktop apps only]

Redistributable

Windows Desktop Search (WDS) 3.0

Header

Propsys.h

Library

Propsys.lib

DLL

Propsys.dll (version 6.0 or later)

See also

PSCreateMultiplexPropertyStore

 

 

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

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.