<div class="content" name="TYPEATTR" uuid="0ca10d08-61d2-4059-9109-7bbaf545715e"><p>The TYPEATTR structure is used by an <a href="99504cf9-16d8-401e-a873-83b85d1ee4aa" data-linktype="relative-path">ITypeInfo server</a> to
describe a type, as specified in section <a href="b96292a8-c06e-4b9c-905e-129b95697ee4" data-linktype="relative-path">3.7.4.1</a>.</p><dl>
<dd>
<div><pre> 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;
</pre></div>
</dd></dl><p><b>guid:</b>  MUST be set to the <a href="5583e1b8-454c-4147-9f56-f72416a15bee#gt_f49694cc-c350-462d-ab8e-816f0103c6c1" data-linktype="relative-path">GUID</a> that is associated
with the type, or to IID_NULL, if the type was not declared with the [uuid]
attribute (see section <a href="ae4d27fa-faaa-4d5f-b0f9-15bfbaaae9b4" data-linktype="relative-path">2.2.49.2</a>).</p><p><b>lcid:</b>  MUST be set to the locale ID
of the type&#39;s member names and documentation strings (see section 2.2.49.2).</p><p><b>dwReserved1:</b>  MUST be set to 0, and
MUST be ignored on receipt.</p><p><b>dwReserved2:</b>  MUST be set to -1, and
MUST be ignored on receipt.</p><p><b>dwReserved3:</b>  MUST be set to -1, and
MUST be ignored on receipt.</p><p><b>lpstrReserved4:</b>  MUST be set to
NULL, and MUST be ignored on receipt.</p><p><b>cbSizeInstance:</b>  MUST be set to a
value that is specified by the value of <b>typekind</b>.</p><table><thead>
  <tr>
   <th>
   <p>Value of typekind</p>
   </th>
   <th>
   <p>Value of cbSizeInstance</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>TKIND_COCLASS</td>
  <td>MUST be set to the system pointer size (see section 3.7.1.2).</td>
 </tr><tr>
  <td>TKIND_DISPATCH</td>
  <td>MUST be set to the system pointer size (see section 3.7.1.2).</td>
 </tr><tr>
  <td>TKIND_INTERFACE</td>
  <td>MUST be set to the system pointer size (see section 3.7.1.2).</td>
 </tr><tr>
  <td>TKIND_MODULE</td>
  <td>MUST be set to 2.</td>
 </tr><tr>
  <td>TKIND_ENUM</td>
  <td>MUST be set to an implementation-specific value&lt;23&gt; that specifies the size of an integer.</td>
 </tr><tr>
  <td>TKIND_UNION</td>
  <td>MUST be set to an implementation-specific value&lt;24&gt; that specifies the size of its largest element.</td>
 </tr><tr>
  <td>TKIND_RECORD</td>
  <td>MUST be set to an implementation-specific value&lt;25&gt; that specifies the size in bytes, of the structure.</td>
 </tr><tr>
  <td>TKIND_ALIAS</td>
  <td>MUST be set to an implementation-specific value&lt;26&gt; that specifies the size, in bytes, of the predefined type for which this type is an alias.</td>
 </tr></tbody></table><p><b>typekind:</b>  MUST be set to a value of
the <a href="78ccbd1c-d8ff-4301-9afc-df562372fb33" data-linktype="relative-path">TYPEKIND</a>
enumeration, as specified in section 2.2.17.</p><p><b>cFuncs:</b>  MUST be set to a value
specified by the value of <b>typekind</b>.</p><table><thead>
  <tr>
   <th>
   <p>Value of typekind</p>
   </th>
   <th>
   <p>Value of cfuncs</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>TKIND_COCLASS</td>
  <td>MUST be set to 0.</td>
 </tr><tr>
  <td>TKIND_DISPATCH</td>
  <td>MUST be set to the number of elements in the dispatch method table, as specified in section 3.7.1.2.</td>
 </tr><tr>
  <td>TKIND_INTERFACE</td>
  <td>MUST be set to the number of elements in the method table, as specified in section 3.7.1.2.</td>
 </tr><tr>
  <td>TKIND_MODULE</td>
  <td>MUST be set to the number of elements in the method table, as specified in section 3.7.1.2.</td>
 </tr><tr>
  <td>TKIND_ENUM</td>
  <td>MUST be set to 0.</td>
 </tr><tr>
  <td>TKIND_UNION</td>
  <td>MUST be set to 0.</td>
 </tr><tr>
  <td>TKIND_RECORD</td>
  <td>MUST be set to 0.</td>
 </tr><tr>
  <td>TKIND_ALIAS</td>
  <td>MUST be set to 0.</td>
 </tr></tbody></table><p><b>cVars:</b>  MUST be set to the number of
elements in the data member table, as specified in section 3.7.1.2.</p><p><b>cImplTypes:</b>  MUST be set to the
number of elements in the interface table, as specified in section 3.7.1.2.</p><p><b>cbSizeVft:</b>  MUST be set to a value
specified by the value of <b>typekind</b>.</p><table><thead>
  <tr>
   <th>
   <p>Value of typekind</p>
   </th>
   <th>
   <p>Value of cbSizeVft</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>TKIND_COCLASS</td>
  <td>MUST be set to 0.</td>
 </tr><tr>
  <td>TKIND_DISPATCH</td>
  <td>MUST be set to the system pointer size value (see section 2.2.45) multiplied by seven.</td>
 </tr><tr>
  <td>TKIND_INTERFACE</td>
  <td>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.</td>
 </tr><tr>
  <td>TKIND_MODULE</td>
  <td>MUST be set to 0.</td>
 </tr><tr>
  <td>TKIND_ENUM</td>
  <td>MUST be set to 0.</td>
 </tr><tr>
  <td>TKIND_UNION</td>
  <td>MUST be set to 0.</td>
 </tr><tr>
  <td>TKIND_RECORD</td>
  <td>MUST be set to 0.</td>
 </tr><tr>
  <td>TKIND_ALIAS</td>
  <td>MUST be set to 0.</td>
 </tr></tbody></table><p><b>cbAlignment:</b>  MUST be set to 0 or to
an implementation-specific positive value.<a id="Appendix_A_Target_27"></a><a aria-label="Product behavior note 27" href="ae19ad63-7433-4568-88e9-f70e5593547d#Appendix_A_27" data-linktype="relative-path">&lt;27&gt;</a></p><p><b>wTypeFlags:</b>  MUST be either a
combination of the <a href="155c66e2-ffe1-4f18-b849-f827ca989aa7" data-linktype="relative-path">TYPEFLAGS</a>
bit flags that are specified in section 2.2.16, or 0.</p><p><b>wMajorVerNum:</b>  MUST be set to the
major version number of the <a href="5583e1b8-454c-4147-9f56-f72416a15bee#gt_07ad91dc-c12a-44f7-9c64-7e496933183a" data-linktype="relative-path">automation
scope</a> that is associated with the ITypeLib server, as specified in section
2.2.49.2.</p><p><b>wMinorVerNum:</b>  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.</p><p><b>tdescAlias:</b>  MUST contain a <a href="95bb92a7-f783-477f-acbc-c947d754fa8b" data-linktype="relative-path">TYPEDESC (section 2.2.37)</a>
that describes the predefined type for which this type is an alias, if <b>typekind</b>
is set to TKIND_ALIAS. Otherwise, MUST contain a TYPEDESC with the <b>vt</b>
field set to VT_EMPTY.</p><p><b>dwReserved5:</b>  MUST be set to 0, and
MUST be ignored on receipt.</p><p><b>wReserved6:</b>  MUST be set to 0, and
MUST be ignored on receipt.</p></div>