Freigeben über


2.2.44 TYPEATTR

The TYPEATTR structure is used by an ITypeInfo server to describe a type, as specified in section 3.7.4.1.

 typedef struct tagTYPEATTR {
   GUID guid;
   LCID lcid;
   DWORD dwReserved1;
   DWORD dwReserved2;
   DWORD dwReserved3;
   LPOLESTR lpstrReserved4;
   ULONG cbSizeInstance;
   TYPEKIND typekind;
   WORD cFuncs;
   WORD cVars;
   WORD cImplTypes;
   WORD cbSizeVft;
   WORD cbAlignment;
   WORD wTypeFlags;
   WORD wMajorVerNum;
   WORD wMinorVerNum;
   TYPEDESC tdescAlias;
   DWORD dwReserved5;
   WORD wReserved6;
 } TYPEATTR,
  *LPTYPEATTR;

guid: MUST be set to the GUID that is associated with the type, or to IID_NULL, if the type was not declared with the [uuid] attribute (see section 2.2.49.2).

lcid: MUST be set to the locale ID of the type's member names and documentation strings (see section 2.2.49.2).

dwReserved1: MUST be set to 0, and MUST be ignored on receipt.

dwReserved2: MUST be set to -1, and MUST be ignored on receipt.

dwReserved3: MUST be set to -1, and MUST be ignored on receipt.

lpstrReserved4: MUST be set to NULL, and MUST be ignored on receipt.

cbSizeInstance: MUST be set to a value that is specified by the value of typekind.

Value of typekind

Value of cbSizeInstance

TKIND_COCLASS

MUST be set to the system pointer size (see section 3.7.1.2).

TKIND_DISPATCH

MUST be set to the system pointer size (see section 3.7.1.2).

TKIND_INTERFACE

MUST be set to the system pointer size (see section 3.7.1.2).

TKIND_MODULE

MUST be set to 2.

TKIND_ENUM

MUST be set to an implementation-specific value<23> that specifies the size of an integer.

TKIND_UNION

MUST be set to an implementation-specific value<24> that specifies the size of its largest element.

TKIND_RECORD

MUST be set to an implementation-specific value<25> that specifies the size in bytes, of the structure.

TKIND_ALIAS

MUST be set to an implementation-specific value<26> that specifies the size, in bytes, of the predefined type for which this type is an alias.

typekind: MUST be set to a value of the TYPEKIND enumeration, as specified in section 2.2.17.

cFuncs: MUST be set to a value specified by the value of typekind.

Value of typekind

Value of cfuncs

TKIND_COCLASS

MUST be set to 0.

TKIND_DISPATCH

MUST be set to the number of elements in the dispatch method table, as specified in section 3.7.1.2.

TKIND_INTERFACE

MUST be set to the number of elements in the method table, as specified in section 3.7.1.2.

TKIND_MODULE

MUST be set to the number of elements in the method table, as specified in section 3.7.1.2.

TKIND_ENUM

MUST be set to 0.

TKIND_UNION

MUST be set to 0.

TKIND_RECORD

MUST be set to 0.

TKIND_ALIAS

MUST be set to 0.

cVars: MUST be set to the number of elements in the data member table, as specified in section 3.7.1.2.

cImplTypes: MUST be set to the number of elements in the interface table, as specified in section 3.7.1.2.

cbSizeVft: MUST be set to a value specified by the value of typekind.

Value of typekind

Value of cbSizeVft

TKIND_COCLASS

MUST be set to 0.

TKIND_DISPATCH

MUST be set to the system pointer size value (see section 2.2.45) multiplied by seven.

TKIND_INTERFACE

MUST be set to the system pointer size value multiplied by the number of methods that are defined by the interface and all its inherited interfaces.

TKIND_MODULE

MUST be set to 0.

TKIND_ENUM

MUST be set to 0.

TKIND_UNION

MUST be set to 0.

TKIND_RECORD

MUST be set to 0.

TKIND_ALIAS

MUST be set to 0.

cbAlignment: MUST be set to 0 or to an implementation-specific positive value.<27>

wTypeFlags: MUST be either a combination of the TYPEFLAGS bit flags that are specified in section 2.2.16, or 0.

wMajorVerNum: MUST be set to the major version number of the automation scope that is associated with the ITypeLib server, as specified in section 2.2.49.2.

wMinorVerNum: MUST be set to the minor version number of the automation scope that is associated with the ITypeLib server, as specified in section 2.2.49.2.

tdescAlias: MUST contain a TYPEDESC (section 2.2.37) that describes the predefined type for which this type is an alias, if typekind is set to TKIND_ALIAS. Otherwise, MUST contain a TYPEDESC with the vt field set to VT_EMPTY.

dwReserved5: MUST be set to 0, and MUST be ignored on receipt.

wReserved6: MUST be set to 0, and MUST be ignored on receipt.