Getting Information About Properties
To get information about properties, a consumer performs the following actions:
-
Determines the properties for which to get information.
-
Determines the property sets that contain the identified properties.
-
Allocates an array of DBPROPIDSET structures, one for each identified property set.
-
Allocates an array of DBPROPIDs for each property set. The number of elements in each array is the number of properties identified in step 1 that belong to that property set.
-
Places the ID of each property in the DBPROPID array.
-
Places the property set GUID in the DBPROPIDSET structure for each property set. It then places the count of elements in and the pointer to the corresponding DBPROPID array in the DBPROPIDSET structure.
-
Calls a method that gets properties and passes it the count and array of DBPROPIDSET structures.
To return property values, the provider performs the following actions:
-
Allocates an array of DBPROPINFOSET structures. The elements of this array correspond to the elements of the DBPROPIDSET array.
-
For each element of the DBPROPIDSET array, allocates an array of DBPROPINFO structures. The elements of the DBPROPINFO array correspond to the elements of the DBPROPID array.
-
Places the ID, description, type, property group, whether the property can be read from or written to, and list of valid values of each property in the DBPROPINFO structure that corresponds to the DBPROPID value for the property.
-
Places the property set GUID in the DBPROPINFOSET structure for each property set. It then places the count of elements in and the pointer to the corresponding DBPROPINFO array in the DBPROPINFOSET structure.
-
Returns the count and array of DBPROPINFOSET structures to the consumer.
For example, assume that the consumer wants to get information about five properties, where properties 1, 2, and 3 are in property set A and properties 4 and 5 are in property set B. The consumer uses the following structures.
An example of how a consumer gets information about properties
The provider returns the following structures.
An example of what property information a provider returns
The following table lists the methods consumers use to get information about properties.
Methods used by consumers to get property information