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.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Padding1 (variable) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
vType |
vData1 |
vData2 |
|||||||||||||||||||||||||||||
vValue (variable) |
|||||||||||||||||||||||||||||||
... |
Padding1 (variable): This field MUST be 0 to 3 bytes in length. The length of this field MUST be such that the following field begins at an offset that is a multiple of 4 bytes from the beginning of the message that contains this structure. If this field is present (that is, length nonzero), the value it contains is arbitrary. The content of this field MUST be ignored by the receiver.
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
vValue is not present.
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 MSSearch Query Protocol, but the MSSearch Query Protocol treats VT_UINT and VT_UI4 as identical, with the exception noted previously.
VT_ERROR
0x000A
A 4-byte unsigned integer containing an HRESULT, as specified in [MS-ERREF], section 2.
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 (UTC).
VT_FILETIME
0x0040
A 64-bit integer representing the number of 100-nanosecond intervals since 00:00:00 on January 1, 1601, UTC.
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 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 following section under vValue.
VT_LPSTR
0x001E
A null-terminated ANSI string.
VT_LPWSTR
0x001F
A null-terminated Unicode (as specified in [UNICODE]) string.
VT_VARIANT
0x000C
When used in a CTableColumn description, vValue is a CRowVariant structure. Otherwise, it is a CBaseStorageVariant structure. MUST be combined with a type modifier of VT_VECTOR.
-
The following table specifies the type modifiers for vType. Type modifiers can be combined with vType using the bitwise OR operation to change the meaning of vValue to indicate it is one of the 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.1.
This type modifier MUST NOT be combined with the following types: VT_INT, VT_UINT, VT_BLOB, and VT_BLOB_OBJECT.
-
When the VT_VARIANT vType is used in a CBaseStorageVariant structure, it MUST be combined with a type modifier of 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): The value of this field MUST be set to 0x00.
vData2 (1 byte): The value of this field 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_CLSID
16
-
If vType is set to VT_BLOB or VT_BSTR, the structure of vValue is specified in the following diagram.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbSize |
|||||||||||||||||||||||||||||||
blobData (variable) |
|||||||||||||||||||||||||||||||
... |
-
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. The protocol client and protocol 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.
cbSize (4 bytes): 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 (variable): MUST be of length cbSize in bytes.
-
For a vType set to either VT_LPSTR or VT_LPWSTR, the structure of vValue is shown in the following diagram, with these caveats:
§ If vType is set to VT_LPSTR, cLen indicates the size of the string in ANSI characters, and string is a null-terminated ANSI string.
§ 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.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cLen |
|||||||||||||||||||||||||||||||
String (variable) |
|||||||||||||||||||||||||||||||
... |
cLen (4 bytes): 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 (variable): Null-terminated string. This field MUST be absent if cLen equals 0x00000000.