<div class="content" name="VARENUM" uuid="3fe7db9f-5803-4dc4-9d14-5425d3f5461f"><p>The VARENUM enumeration constants are used in the
discriminant field, <b>vt</b>, of the VARIANT type specified in section <a href="a6a540af-38ac-48be-bd40-92e2c01e9aa6" data-linktype="relative-path">2.2.29.2</a>. When present,
the VT_BYREF flag MUST be in an OR relation with another value to specify the <a href="5583e1b8-454c-4147-9f56-f72416a15bee#gt_969e6685-c90a-4da6-99be-1a25efb6d1cd" data-linktype="relative-path">byref argument</a> for the
VARIANT. The VT_EMPTY and VT_NULL values MUST NOT be specified with the
VT_BYREF bit flag.</p><p>The following values are also used in the discriminant
field, <b>vt</b>, of the <b>TYPEDESC</b> structure specified in section <a href="95bb92a7-f783-477f-acbc-c947d754fa8b" data-linktype="relative-path">2.2.37</a>.</p><p>The meaning of each VARIANT type constant is specified as
follows. The Context column specifies the context in which each constant is
used. A constant MUST NOT be used in a VARIANT unless it is specified with a
&#34;V&#34;. A constant MUST NOT be used in a SAFEARRAY unless it is
specified with an &#34;S&#34;. A constant MUST NOT be used in a TYPEDESC
unless it is specified with a &#34;T&#34;.</p><dl>
<dd>
<div><pre> typedef  enum tagVARENUM
 {
   VT_EMPTY = 0x0000,
   VT_NULL = 0x0001,
   VT_I2 = 0x0002,
   VT_I4 = 0x0003,
   VT_R4 = 0x0004,
   VT_R8 = 0x0005,
   VT_CY = 0x0006,
   VT_DATE = 0x0007,
   VT_BSTR = 0x0008,
   VT_DISPATCH = 0x0009,
   VT_ERROR = 0x000A,
   VT_BOOL = 0x000B,
   VT_VARIANT = 0x000C,
   VT_UNKNOWN = 0x000D,
   VT_DECIMAL = 0x000E,
   VT_I1 = 0x0010,
   VT_UI1 = 0x0011,
   VT_UI2 = 0x0012,
   VT_UI4 = 0x0013,
   VT_I8 = 0x0014,
   VT_UI8 = 0x0015,
   VT_INT = 0x0016,
   VT_UINT = 0x0017,
   VT_VOID = 0x0018,
   VT_HRESULT = 0x0019,
   VT_PTR = 0x001A,
   VT_SAFEARRAY = 0x001B,
   VT_CARRAY = 0x001C,
   VT_USERDEFINED = 0x001D,
   VT_LPSTR = 0x001E,
   VT_LPWSTR = 0x001F,
   VT_RECORD = 0x0024,
   VT_INT_PTR = 0x0025,
   VT_UINT_PTR = 0x0026,
   VT_ARRAY = 0x2000,
   VT_BYREF = 0x4000
 } VARENUM;
</pre></div>
</dd></dl><p><b>VT_EMPTY:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V</td>
  <td>The type of the contained field is undefined. When this flag is specified, the VARIANT MUST NOT contain a data field. The VARIANT definition is specified in section 2.2.29.2.</td>
 </tr></tbody></table><p><b>VT_NULL:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V</td>
  <td>The type of the contained field is NULL. When this flag is specified, the VARIANT MUST NOT contain a data field. The VARIANT definition is specified in section 2.2.29.2.</td>
 </tr></tbody></table><p><b>VT_I2:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be a 2-byte signed integer.</td>
 </tr></tbody></table><p><b>VT_I4:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be a 4-byte signed integer.</td>
 </tr></tbody></table><p><b>VT_R4:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be a 4-byte IEEE floating-point number.</td>
 </tr></tbody></table><p><b>VT_R8:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be an 8-byte IEEE floating-point number.</td>
 </tr></tbody></table><p><b>VT_CY:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be CURRENCY (see section 2.2.24).</td>
 </tr></tbody></table><p><b>VT_DATE:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be DATE (see section 2.2.25).</td>
 </tr></tbody></table><p><b>VT_BSTR:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be BSTR (see section 2.2.23).</td>
 </tr></tbody></table><p><b>VT_DISPATCH:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be a pointer to IDispatch (see section 3.1.4).</td>
 </tr></tbody></table><p><b>VT_ERROR:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be HRESULT.</td>
 </tr></tbody></table><p><b>VT_BOOL:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be VARIANT_BOOL (see section 2.2.27).</td>
 </tr></tbody></table><p><b>VT_VARIANT:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be VARIANT (see section 2.2.29). It MUST appear with the bit flag VT_BYREF.</td>
 </tr></tbody></table><p><b>VT_UNKNOWN:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be a pointer to IUnknown.</td>
 </tr></tbody></table><p><b>VT_DECIMAL:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be DECIMAL (see section 2.2.26).</td>
 </tr></tbody></table><p><b>VT_I1:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be a 1-byte integer.</td>
 </tr></tbody></table><p><b>VT_UI1:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be a 1-byte unsigned integer.</td>
 </tr></tbody></table><p><b>VT_UI2:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be a 2-byte unsigned integer.</td>
 </tr></tbody></table><p><b>VT_UI4:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be a 4-byte unsigned integer.</td>
 </tr></tbody></table><p><b>VT_I8:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be an 8-byte signed integer.</td>
 </tr></tbody></table><p><b>VT_UI8:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be an 8-byte unsigned integer.</td>
 </tr></tbody></table><p><b>VT_INT:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be a 4-byte signed integer.</td>
 </tr></tbody></table><p><b>VT_UINT:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S, T</td>
  <td>Either the specified type, or the type of the element or contained field MUST be a 4-byte unsigned integer.</td>
 </tr></tbody></table><p><b>VT_VOID:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>T</td>
  <td>The specified type MUST be void.</td>
 </tr></tbody></table><p><b>VT_HRESULT:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>T</td>
  <td>The specified type MUST be HRESULT.</td>
 </tr></tbody></table><p><b>VT_PTR:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>T</td>
  <td>The specified type MUST be a unique pointer, as specified in [C706] section 4.2.20.2.</td>
 </tr></tbody></table><p><b>VT_SAFEARRAY:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>T</td>
  <td>The specified type MUST be SAFEARRAY (section 2.2.30).</td>
 </tr></tbody></table><p><b>VT_CARRAY:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>T</td>
  <td>The specified type MUST be a fixed-size array.</td>
 </tr></tbody></table><p><b>VT_USERDEFINED:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>T</td>
  <td>The specified type MUST be user defined.</td>
 </tr></tbody></table><p><b>VT_LPSTR:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>T</td>
  <td>The specified type MUST be a NULL-terminated string, as specified in [C706] section 14.3.4.</td>
 </tr></tbody></table><p><b>VT_LPWSTR:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>T</td>
  <td>The specified type MUST be a zero-terminated string of UNICODE characters, as specified in [C706], section 14.3.4.</td>
 </tr></tbody></table><p><b>VT_RECORD:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S</td>
  <td>The type of the element or contained field MUST be a BRECORD (see section 2.2.28.2).</td>
 </tr></tbody></table><p><b>VT_INT_PTR:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>T</td>
  <td>The specified type MUST be either a 4-byte or an 8-byte signed integer. The size of the integer is platform specific and determines the system pointer size value, as specified in section 2.2.21.</td>
 </tr></tbody></table><p><b>VT_UINT_PTR:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>T</td>
  <td>The specified type MUST be either a 4 byte or an 8 byte unsigned integer. The size of the integer is platform specific and determines the system pointer size value, as specified in section 2.2.21.</td>
 </tr></tbody></table><p><b>VT_ARRAY:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S</td>
  <td>The type of the element or contained field MUST be a SAFEARRAY (see section 2.2.30.10).</td>
 </tr></tbody></table><p><b>VT_BYREF:  </b></p><table><thead>
  <tr>
   <th>
   <p>Context</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>V, S</td>
  <td>The type of the element or contained field MUST be a pointer to one of the types listed in the previous rows of this table. If present, this bit flag MUST appear in a VARIANT discriminant (see section 2.2.28) with one of the previous flags.</td>
 </tr></tbody></table><p> </p></div>