Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
3/12/2014
This method runs the query and returns the media items to the query object.
Syntax
HRESULT RunQuery(
IMLQuery *pQuery,
MLRange range,
IMLSortOrder *sortOrder
);
Parameters
- pQuery
[in] Pointer to the.IMLQuery object that contains the query.
- range
[in] MLRange structure that contains the range of returned media items.
- sortOrder
[in] Pointer to the IMLSortOrder object that specifies the order of the returned media items.
Return Values
Returns the HRESULT values shown in the following table.
| Return code | Description |
|---|---|
S_OK |
The method was successful. |
E_INVALIDARG |
One or more parameters are invalid. |
E_POINTER |
A pointer parameter is invalid. |
E_FAIL |
The method was not successful. |
E_OUTOFMEMORY |
An out of memory error occurred. |
Remarks
This method queries the Media Library database and returns the query results in the IMLQuery results. The results are enumerated in the IMLQuery::GetResultByIndex method. If the total number of results matching the query exceeds the count obtained in IMLQuery::GetResultCount, you should increase the number of requested items in the MLRange structure and call this method again.
Requirements
Header |
mlibdll.h, |
Library |
mlibdll.lib |