[Function Discovery is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]
Opens the property store for the function instance. The property store contains metadata about the function instance, such as its name, icon, installation date, and other information.
HRESULT OpenPropertyStore( DWORD dwStgAccess, IPropertyStore **ppIPropertyStore );
The access mode to be assigned to the open stream. For this method, the following access modes are supported:
A pointer to an IPropertyStore interface pointer.
Possible return values include, but are not limited to, the following.
||The method completed successfully.|
||The method could not open a writeable property store because the caller has insufficient access or the discovery provider does not allow write access to its property store.|
||The value of dwStgAccess is invalid.|
||The ppIPropertyStore points to invalid memory.|
||The method is unable to allocate the memory required to perform this operation.|
Only one property store per function instance can be open at a time. If OpenPropertyStore is called twice on the same function instance, both ppIPropertyStore pointers would point to the same property store. Furthermore, the access mode (as specified by the dwStgAccess parameter) would be determined by the most recent OpenPropertyStore call. Applications should call Release to close a property store before opening another.
It is possible that OpenPropertyStore will return a property store for a device that has been removed. In this case, the property keys in the store will be empty. This situation may occur if the device's devnode was deleted but the property store associated with the device's function instance is still accessible. This situation occurs rarely.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|