共用方式為


2.2.9 ADVFEATUREFLAGS Advanced Feature Flags

The following values are used in the field fFeatures of a SAFEARRAY (section 2.2.30.10) data type.

 typedef  enum tagADVFEATUREFLAGS
 {
   FADF_AUTO = 0x0001,
   FADF_STATIC = 0x0002,
   FADF_EMBEDDED = 0x0004,
   FADF_FIXEDSIZE = 0x0010,
   FADF_RECORD = 0x0020,
   FADF_HAVEIID = 0x0040,
   FADF_HAVEVARTYPE = 0x0080,
   FADF_BSTR = 0x0100,
   FADF_UNKNOWN = 0x0200,
   FADF_DISPATCH = 0x0400,
   FADF_VARIANT = 0x0800
 } ADVFEATUREFLAGS;

FADF_AUTO:  MUST be set if the SAFEARRAY is allocated on the stack. This flag MUST be ignored on receipt.

FADF_STATIC:  MUST be set if the SAFEARRAY is statically allocated. This flag MUST be ignored on receipt.

FADF_EMBEDDED:  MUST be set if the SAFEARRAY is embedded in a structure. This flag MUST be ignored on receipt.

FADF_FIXEDSIZE:  MUST be set if the SAFEARRAY cannot be resized or reallocated. This flag MUST be ignored on receipt.

FADF_RECORD:  The SAFEARRAY MUST contain elements of a UDT (see section 2.2.28.1)

FADF_HAVEIID:  The SAFEARRAY MUST contain MInterfacePointers elements.

FADF_HAVEVARTYPE:  If this bit flag is set, the high word of the cLocks field of the SAFEARRAY MUST contain a VARIANT type constant that describes the type of the array's elements (see sections 2.2.7 and 2.2.30.10).

FADF_BSTR:  The SAFEARRAY MUST contain an array of BSTR elements (see section 2.2.23).

FADF_UNKNOWN:  The SAFEARRAY MUST contain an array of pointers to IUnknown.

FADF_DISPATCH:  The SAFEARRAY MUST contain an array of pointers to IDispatch (see section 3.1.4).

FADF_VARIANT:  The SAFEARRAY MUST contain an array of VARIANT instances.