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 |
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
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
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 defined 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 below); the value chosen is up to the higher layer that provides it to the Windows Search Protocol Specification, but the Windows Search Protocol Specification treats VT_UINT and VT_UI4 as identical with the exception noted above.
VT_ERROR
0x000A
A 4-byte unsigned integer containing an HRESULT, 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 defined in [IEEE754].
VT_CY
0x0006
An 8-byte two's complement integer (vValue divided by 10,000).
VT_DATE
0x0007
A 64-bit floating point number 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 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 below under vValue.
VT_CF
0x0011
A VT_CF structure as specified in section 2.2.1.1.1.7.
VT_LPSTR
0x001E
A null-terminated string using the system code page.
VT_LPWSTR
0x001F
A null-terminated, 16-bit Unicode string. See [UNICODE].
Note The protocol uses UTF-16 LE encoding.
VT_COMPRESSED_LPWSTR
0x0023
A compressed version of a null-terminated, 16-bit Unicode string as specified in section 2.2.1.1.1.6.
Note The protocol uses UTF-16 LE encoding.
VT_VARIANT
0x000C
CBaseStorageVariant.
-
The following table specifies the type modifiers for vType. Type modifiers can be binary OR'd with vType 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.
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 vTypes, 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 vTypes, 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.
-
For fixed-length data types, the following table specifies the size of the vValue field 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
-
For other types, the structure of vValue depends upon the value of vType as shown in the following table and diagrams.
-
Value of vType
Structure of vValue
Notes
VT_BLOB
First diagram.
VT_BLOB_OBJECT
First diagram.
VT_BSTR
First diagram.
VT_LPSTR
Second diagram.
string is a null-terminated system code page string. cLen is the string's length in system code page characters.
VT_LPWSTR
Second diagram.
String is a null-terminated Unicode string. cLen is the string's length in Unicode characters.
-
0
1
2
3
4
5
6
7
8
91
0
1
2
3
4
5
6
7
8
92
0
1
2
3
4
5
6
7
8
93
0
1cbSize
blobData (variable)
...
-
cbSize (4 bytes): A 32-bit unsigned integer.
-
Note Indicates the size of the blobData field in bytes.
-
-
blobData (variable): MUST be of length cbSize in bytes.
-
For vType set to VT_BLOB or VT_BLOB_OBJECT, 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. 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 diagram below, with the following caveats:
-
If vType is set to VT_LPSTR, then cLen indicates the size of the string in system code page characters and string is null-terminated.
If vType is set to VT_LPWSTR, then 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
91
0
1
2
3
4
5
6
7
8
92
0
1
2
3
4
5
6
7
8
93
0
1cLen
string (variable)
...
-
-
cLen (4 bytes): A 32-bit unsigned integer, indicating the size of the string field including the terminating null.
-
Note A value of 0x00000000 indicates that no such string is present.
-
-
string (variable): Null-terminated string.
-
Note This field MUST be absent if cLen equals 0x00000000.
-
-