2.2.1.1 CBaseStorageVariant

The CBaseStorageVariant structure contains the value on which to perform a match operation for a property specified in the CPropertyRestriction structure.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

vType

vData1

vData2

vValue (variable)

...

vType (2 bytes): A type indicator that indicates the type of vValue. It MUST be one of the values specified in the following table.

Value

Meaning

VT_EMPTY

0x0000

vValue is not present. VT_NULL (0x0001) also has the same meaning.

VT_I1

0x0010

A 1-byte signed integer.

VT_UI1

0x0011

A 1-byte unsigned integer.

VT_I2

0x0002

A 2-byte signed integer.

VT_UI2

0x0012

A 2-byte unsigned integer.

VT_BOOL

0x000B

A Boolean value; a 2-byte integer.

Note Contains 0x0000 (FALSE) or 0xFFFF (TRUE).

VT_I4

0x0003

A 4-byte signed integer.

VT_UI4

0x0013

A 4-byte unsigned integer.

VT_R4

0x0004

An IEEE 32-bit floating point number, as specified in [IEEE754].

VT_INT

0x0016

A 4-byte signed integer.

VT_UINT

0x0017

A 4-byte unsigned integer. Note that this is identical to VT_UI4 except that VT_UINT cannot be used with VT_VECTOR (defined in the following table); the value chosen is a choice made by the higher layer that provides it to the Content Indexing Services Protocol, but the Content Indexing Services Protocol treats VT_UINT and VT_UI4 as identical, with the exception noted earlier in this paragraph.

VT_ERROR

0x000A

A 4-byte unsigned integer containing an HRESULT value, as specified in [MS-ERREF] section 2.1.

VT_I8

0x0014

An 8-byte signed integer.

VT_UI8

0x0015

An 8-byte unsigned integer.

VT_R8

0x0005

An IEEE 64-bit floating point number, as specified in [IEEE754].

VT_CY

0x0006

An 8-byte two's complement integer (scaled by 10,000).

VT_DATE

0x0007

A 64-bit floating point number, as specified in [IEEE754], representing the number of days since 00:00:00 on December 31, 1899 (Coordinated Universal Time).

VT_FILETIME

0x0040

A 64-bit integer representing the number of 100-nanosecond intervals since 00:00:00 on January 1, 1601 (Coordinated Universal Time).

VT_DECIMAL

0x000E

A DECIMAL structure, as specified in section 2.2.1.1.1.1.

VT_CLSID

0x0048

A 16-byte binary value containing a GUID.

VT_BLOB

0x0041

A 4-byte unsigned integer count of bytes in the binary large object (BLOB) followed by that many bytes of data.

VT_BLOB_OBJECT

0x0046

A 4-byte unsigned integer count of bytes in the binary large object (BLOB) followed by that many bytes of data.

VT_BSTR

0x0008

A 4-byte unsigned integer count of bytes in the string followed by a string, as specified in the vValue definition in this section.

VT_LPSTR

0x001E

A null-terminated ANSI string.

VT_LPWSTR

0x001F

A null-terminated Unicode (as specified in [UNICODE]) string.

VT_VARIANT

0x000C

  1. When used in a CTableColumn description, a CRowVariant structure.

  2. When not used in a CTableColumn description, a CBaseStorageVariant structure. MUST be combined with a type modifier of VT_ARRAY or VT_VECTOR.

The following table specifies the type modifiers for vType. Type modifiers can be combined with vType by using the bitwise OR operation to change the meaning of vValue to indicate that it is one of two possible array types.

Value

Meaning

VT_VECTOR

0x1000

If the type indicator is combined with VT_VECTOR by using an OR operator, vValue is a counted array of values of the indicated type. See section 2.2.1.1.1.2.

This type modifier MUST NOT be combined with the following types: VT_INT, VT_UINT, VT_DECIMAL, VT_BLOB, and VT_BLOB_OBJECT.

VT_ARRAY

0x2000

If the type indicator is combined with VT_ARRAY by an OR operator, the value is a SAFEARRAY, containing values of the indicated type.

This type modifier MUST NOT be combined with the following types: VT_I8, VT_UI8, VT_FILETIME, VT_CLSID, VT_BLOB, VT_BLOB_OBJECT, VT_LPSTR, and VT_LPWSTR.

When the VT_VARIANT vType is used in a CBaseStorageVariant structure, it MUST be combined with a type modifier of VT_ARRAY or VT_VECTOR. There is no such limitation when the VT_VARIANT vType is used in a CTableColumn structure, which specifies individual binding.

vData1 (1 byte): When vType is VT_DECIMAL, the value of this field is specified as the Scale field in section 2.2.1.1.1.1. For all other vType fields, the value MUST be set to 0x00.

vData2 (1 byte): When vType is VT_DECIMAL, the value of this field is specified as the Sign field in section 2.2.1.1.1.1. For all other vType fields, the value MUST be set to 0x00.

vValue (variable): The value for the match operation. The syntax MUST be as indicated in the vType field.

The following table summarizes sizes for the vValue field, dependent on the vType field for fixed-length data types. The size is in bytes.

vType

Size

VT_I1, VT_UI1

1

VT_I2, VT_UI2, VT_BOOL

2

VT_I4, VT_UI4, VT_R4, VT_INT, VT_UINT, VT_ERROR

4

VT_I8, VT_UI8, VT_R8, VT_CY, VT_DATE, VT_FILETIME

8

VT_DECIMAL, VT_CLSID

16

If vType is set to VT_BLOB or VT_BSTR, the structure of vValue is specified in the following diagram.

For vType set to VT_BLOB, this field is opaque binary BLOB data.

For vType set to VT_BSTR, this field is a set of characters in an OEM selected character set. The client and server MUST be configured to have interoperable character sets (which is not addressed in this protocol). There is no requirement that it be null-terminated.

For a vType set to either VT_LPSTR or VT_LPWSTR, the structure of vValue is shown in the following diagram with the following caveats:

  1. If vType is set to VT_LPSTR, cLen indicates the size of the string in system code page characters, and string is a null-terminated string.

  2. If vType is set to VT_LPWSTR, cLen indicates the size of the string in Unicode characters, and string is a null-terminated Unicode string.


    0


    1


    2


    3


    4


    5


    6


    7


    8


    9

    1
    0


    1


    2


    3


    4


    5


    6


    7


    8


    9

    2
    0


    1


    2


    3


    4


    5


    6


    7


    8


    9

    3
    0


    1

    cbSize

    blobData (variable, optional)

    ...

    ...

cbSize: A 32-bit unsigned integer. Indicates the size of the blobData field in bytes. If vType is set to VT_BSTR, cbSize MUST be set to 0x00000000 when the string represented is an empty string.

blobData: MUST be of length cbSize, in bytes.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

cLen

string (variable, optional)

...

...

cLen: A 32-bit unsigned integer, indicating the size of the string field including the terminating null. A value of 0x00000000 indicates that no such string is present.

string: Null-terminated string. This field MUST be absent if cLen equals 0x00000000.