PSCreateMemoryPropertyStore function (propsys.h)
Creates an in-memory property store.
Syntax
PSSTDAPI PSCreateMemoryPropertyStore(
[in] REFIID riid,
[out] void **ppv
);
Parameters
[in] riid
Type: REFIID
Reference to the requested interface ID.
[out] ppv
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] |
Target Platform | Windows |
Header | propsys.h |
Library | Propsys.lib |
DLL | Propsys.dll (version 6.0 or later) |
Redistributable | Windows Desktop Search (WDS) 3.0 |