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 |
|
|
Library |
|
|
DLL |
|
See also