# PROPSETFLAG

The PROPSETFLAG enumeration values define characteristics of a property set. The values are used in the IPropertySetStorage::Create method.

    typedef enum PROPSETFLAG {
        PROPSETFLAG_DEFAULT      = 0,
        PROPSETFLAG_NONSIMPLE    = 1,
        PROPSETFLAG_ANSI         = 2,
        } PROPSETFLAG

Elements

PROPSETFLAG_NONSIMPLE
  If specified, storage-valued and stream-valued properties are permitted in the newly created set. Otherwise, they are not permitted. In the compound file implementation, property sets may be transacted only if PROPSETFLAG_NONSIMPLE is specified.
PROPSETFLAG_ANSI
  If specified, all string values in the property set that are not explicitly Unicode (those other than VT_LPWSTR) are stored with the current system ANSI code page (see the Win32 function GetACP). Use of this flag is not recommended, as described in the following Remarks section.

  If this flag is absent, string values in the new property set are stored in Unicode. The degree of control afforded by this flag is necessary so clients using the property-related interfaces can interoperate well with standard property sets such as the OLE2 summary information, which may exist in the ANSI code page.

Remarks

These values can be set and checked for using bitwise operations, permitting up to four possible combinations: non-simple Unicode, simple Unicode, non-simple ANSI, and simple ANSI.

It is recommended that property sets be created as Unicode, by not setting the PROPSETFLAG_ANSI flag in the grfFlags parameter of IPropertySetStorage::Create. It is also recommended that you avoid using VT_LPSTR values, and use VT_LPWSTR values instead. When the property set code page is Unicode, VT_LPSTR string values are converted to Unicode when stored, and back to multibyte string values when retrieved. When the code page of the property set is not Unicode, property names, VT_BSTR strings, and non-simple property values are converted to multibyte strings when stored, and converted back to Unicode when retrieved, all using the current system ANSI code page.

See Also

IPropertySetStorage::Create, IPropertySetStorage::Open