2.2.3.3 CPMCreateQueryIn

The CPMCreateQueryIn message creates a new search query. The format of the CPMCreateQueryIn message that follows the header is shown in the following diagram.


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

Size

A

Align0 (variable)

...

ColumnSet (variable)

...

B

Reserved2

Align1 (variable)

...

Restriction (variable)

...

C

Align2 (variable)

...

SortSet (variable)

...

Reserved0

Align3 (variable)

...

RowSetProperties (variable)

...

PidMapper (variable)

...

Reserved1

LCID

Size (4 bytes): A 32-bit unsigned integer indicating the number of bytes from the beginning of this field to the end of the message.

A - CColumnSetPresent (1 byte): A byte field indicating if the ColumnSet field is present. This field MUST be set to one of the following values.

Value

Meaning

0x00

The ColumnSet field MUST be absent.

0x01

The ColumnSet field MUST be present.

Align0 (variable): A field structure of 0, 1, 2 or 3 bytes that is used to align the next field to a 4-byte boundary. MUST be ignored by the protocol server.

ColumnSet (variable): A CColumnSet structure containing the property offsets for properties in CPidMapper that are returned as a column.

B - CRestrictionPresent (1 byte): A byte field indicating if the Restriction field is present.

Note  If set to any nonzero value, the Restriction field MUST be present. If set to 0x00, Restriction MUST be absent.

Reserved2 (2 bytes): A 16-bit reserved field. MUST contain the value 0x0101.

Align1 (variable): A field structure of 0, 1, 2 or 3 bytes that is used to align the next field to a 4-byte boundary. MUST be ignored by the protocol server.

Restriction (variable): A CRestriction structure containing the command tree of the search query.

C - CSortSetPresent (1 byte): A byte field indicating if the SortSet field is present.

Note  If set to any nonzero value, the SortSet field MUST be present. If set to 0x00, SortSet MUST be absent.

Align2 (variable): A field structure of 0, 1, 2 or 3 bytes that is used to align the next field to a 4-byte boundary. MUST be ignored by the protocol server.

SortSet (variable): A CSortSet structure indicating the sort order of the search query.

Reserved0 (1 byte): An 8-bit reserved field reserved for future use. MUST be ignored by the protocol server.

Align3 (variable): A field structure of 0, 1, 2 or 3 bytes that is used to align the next field to a 4-byte boundary. MUST be ignored by the protocol server.

RowSetProperties (variable): A CRowsetProperties structure providing configuration information for the search query.

PidMapper (variable): A CPidMapper structure that maps from property offsets to full property descriptions.

Reserved1 (4 bytes): A 32-bit reserved field. MUST be set to 0x00000000.

LCID (4 bytes): A 32-bit unsigned integer, indicating the LCID of the search query, as specified in [MS-LCID].