Retrieving property values

When you send a TProperty instance to MPropertyStore to read a value, MPropertyStore looks at the label--the TPropertyID instance--to see what property it needs to locate. MPropertyStore then retrieves the value and places it inside the TProperty instance.

To read property values, MPropertyStore provides these member functions:

    Retrieves a single property value based on the property identifier of the TProperty instance that you pass, and places this value into the TProperty instance.
    Retrieves the properties for all identifiers in a property set. MPropertyStore empties the set of all values, then fills in each TProperty instance of the set with the values it retrieves.
    This function retrieves the properties for all identifiers in a property set. Unlike ReadAllProperties, ReadProperties overwrites existing values in the set instead of clearing the set first.
    This member function also returns True when all properties specified in the set return valid values. ReadProperties marks a member of the TPropertySet as invalid if the corresponding property does not exist. In this case, the function returns False.
This example reads the name property of a file by calling the ReadProperty function of aFile (an instance of TFile).

      TExtendedProperty<FileSystemEntityName> prop(TFileSystemEntity::kName);
      aFile.ReadProperty(prop);

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker