3.2.6.4.3 Enterprise
The MQDS client MUST perform the following actions:
If iAttributeList was not provided as an argument, then an iAttributeList MUST be constructed that MUST contain the names of all Enterprise directory attributes listed in [MS-MQDMPR] section 3.1.1.6.
The value of iAttributeList MUST be copied to ReadIterator.AttributeList.
The pColumns argument for the S_DSLookupBegin method (section 3.1.4.17) MUST be computed. For each Enterprise attribute listed in the following table that appears in iAttributeList, the corresponding property identifier MUST be added to the aCol field of of the MQCOLUMNSET structure unless it is already present. (aCol MUST not contain duplicates.) Enterprise attributes that appear in iAttributeList but are not listed in the following table MUST be ignored, and the corresponding entry in iAttributeSortOrder, if any, MUST be removed.
Enterprise attribute
Property identifier
Name
WeakenedSecurity
PROPID_E_NAMESTYLE ([MS-MQMQ] section 2.3.5.2)
CrytographicProvider
PROPID_E_CSP_NAME ([MS-MQMQ] section 2.3.5.3)
Identifier
PROPID_E_ID ([MS-MQMQ] section 2.3.5.9)
DefaultTimeToLive
PROPID_E_LONG_LIVE ([MS-MQMQ] section 2.3.5.15)
OldDirectory
PROPID_E_VERSION ([MS-MQMQ] section 2.3.5.16)
Security
PROPID_E_SECURITY [MS-MQMQ] section 2.3.5.17)
The list of property identifiers in the aCol field of the MQCOLUMNSET structure MUST be copied to ReadIterator.PropidList.
The pRestriction argument for the S_DSLookupBegin method MUST be computed. For each attribute-filter expression that appears in iFilter, a MQPROPERTYRESTRICTION structure (section 2.2.11) MUST be added to the paPropRes field of the MQRESTRICTION structure. The MQPROPERTYRESTRICTION structure MUST be initialized as follows:
The value of the rel field MUST be computed from the operator in the attribute-filter expression according to the table in section 2.2.11.
The value of the prop field MUST be set to the property identifier that corresponds to the Enterprise attribute specified in the attribute-filter expression according to the table above.
The value of the prval field MUST be computed from the value in the original expression according to the following table.
Filtering on attribute
Filter value computation
Name
copy
WeakenedSecurity
see the table in section 3.2.6.3.3.1
CrytographicProvider
see the table in section 3.2.6.3.3.2
Identifier
copy
DefaultTimeToLive
copy
OldDirectory
TRUE converts to 3 FALSE converts to 200
Security
copy
The pSort argument for the S_DSLookupBegin method MUST be computed. For each attribute-sort-order expression that appears in iAttributeSortOrder that has a nonzero SortPriority, a MQSORTKEY structure (section 2.2.14) MUST be added to the aCol field of the MQSORTSET structure. The attribute-sort-order expressions MUST be processed in priority order according to the SortPriority field, highest priority first. Each MQSORTKEY structure MUST be initialized as follows:
The propColumn field MUST be set to the property identifier that corresponds to the Enterprise attribute indicated by the attribute-sort-order expression, according to the first table in this section.
The dwOrder field MUST be set to QUERY_SORTASCEND if SortAscend is TRUE, or QUERY_SORTDESCEND if SortAscend is FALSE.
Other input arguments for the S_DSLookupBegin method MUST be computed as described in section 3.1.4.17.
The S_DSLookupBegin method MUST be called with the given arguments. If the return value is not MQ_OK, processing MUST end. rStatus MUST be set to DirectoryOperationResult.GenericError and rQueryHandle is undefined.
Processing MUST end. rStatus MUST be set to DirectoryOperationResult.Success. rQueryHandle MUST be set to the PCONTEXT_HANDLE_TYPE returned by S_DSLookupBegin.