2.2.1.23 RANGEBOUNDARY

The RANGEBOUNDARY structure contains a single range.


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

ulType

prVal (variable)

...

labelPresent

_padding (variable)

...

ccLabel

Label (variable)

...

ulType (4 bytes): A 32-bit unsigned integer that indicates which type of boundary is represented by this structure.

Note MUST be set to one of the following values.

Value

Meaning

DBRANGEBOUNDTTYPE_BEFORE

0x00000000

MUST only be used for Unicode string values in prVal. Items with a value less than the Unicode string immediately preceding prVal lexicographically are included in the range.

DBRANGEBOUNDTTYPE_EXACT

0x00000001

Items with a value less than prVal are included in the range.

DBRANGEBOUNDTTYPE_AFTER

0x00000002

MUST only be used for Unicode string values in prVal. Items with a value less than the Unicode string immediately after prVal lexicographically are included in the range.

For example, two RANGEBOUNDARY structures of DBRANGEBOUNDTTYPE_EXACT with a prVal of "a" and DBRANGEBOUNDTTYPE_AFTER with a prVal of "z" could be used to partition the full Unicode range into three buckets:

 1. x < "a"
 2. "a" <= x <= "z"
 3. x > "z"

prVal (variable): A CBaseStorageVariant structure.

Note Indicates the value for the range boundary. If ulType is set to DBRANGEBOUNDTTYPE_BEFORE or DBRANGEBOUNDTTYPE_AFTER, then the vType field of prVal MUST be set to a string type (VT_BSTR, VT_LPWSTR, or VT_COMPRESSED_LPWSTR).

labelPresent (1 byte): An 8-bit unsigned integer. MUST be set to one of the following values.

Value

Meaning

0x00

The _padding, ccLabel, and Label fields are omitted.

0x01

The _padding, ccLabel, and Label fields are present.

_padding (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 is nonzero), the value it contains is arbitrary. The content of this field MUST be ignored by the receiver.

Note This field MUST be omitted if labelPresent is set to 0x00.

ccLabel (4 bytes): A 32-bit unsigned integer representing the number of characters in the Label field.

Note ccLabel MUST be omitted if labelPresent is set to 0x00; otherwise, it MUST be greater than zero.

Label (variable): A non-null-terminated Unicode string representing the label for this range. The ccLabel field contains the length of the string.

Note Label MUST be omitted if labelPresent is set to 0x00; otherwise, it MUST NOT be empty.