This function retrieves OIDs and optionally name-value records matching a query. If the selects list is NULL, only OIDs are retrieved. If selects is not NULL, name-value records are also retrieved and should each be freed using hc_nvr_free. In both cases the result set should be freed using hc_qrs_free.
When a query is incorrect and elicits an error from the server, the error is often reported after hc_qrs_freeand not from hc_query_ez. Your application should be prepared to receive and report an error from either place.