I use COM API RSearch objects to get the tickers.
On RSearchQuery update I receive an object of RSearchLib::IRSearchResponse * pIRSearchResponse.
Then I do
l_hr = pIRSearchResponse->get_Status(&l_RSearchQueryStatus);
When everything is fine I get S_OK.
But I get 0x80040223 when there is no results for given search criteria. This is actually not an error, so I need to differentiate it from other errors.
Is there a list of possible status codes/errors?
OK, now I see what you're looking for. Here's another example of the status you may receive: pIRSearchResponse.Status==0x8004021B, pIRSearchResponse.StatusDescription=="Invalid request response".
I'm afraid I don't have an exhaustive list of status codes and messages the library may produce. It's not documented anywhere, so to compile the list would require opening the source code. However, I believe that anything other than 0x80040223 is an error.
If you really need it, we could open the source code and get the exhaustive list.
I'm not sure I understand what you need to differentiate. An error in search criteria names, e.g. unsupported value for AssetClass property or incorrect criteria name in SearchCriteria property will result in object raising an exception when you execute Send method.
This is quite distinct from no results returned into OnUpdate event (also signified by pIRSearchResponse.Status being equal to 0x80040223 and pIRSearchResponse.StatusDescription saying "No results were found matching your criteria").
If your intention is to differentiate between various reasons why there may be no results matching your criteria, such as spelling errors in criteria values vs. no results matching some numeric criteria, there's no way to do this. The search service does not know what values you intended to provide, it only knows the values you have provided. It has no way of determining if the criteria value is unintentionally misspelled or intentionally set to the value that has no matches.