PSCreateMemoryPropertyStore function
Applies to: desktop apps only
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 |
|---|---|
|
Minimum supported server | Windows Server 2003 with SP1 |
|
Redistributable | Windows Desktop Search (WDS) 3.0 |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 2/3/2012