API Reference


Brew Release
Brew MP 1.0.2
See Also
AddrInfo error codes AEEAddrInfo AEECallback
This function sets the resolver query information and starts it. See RFC 3493 section 6.1 for more details.
A query can not be started more then once!
  • me
    the interface pointer
  • szNodeName
    NULL, host name, IP address or "\brewloopback"
  • szServName
    NULL or decimal port number string
  • paiHints
    some hints for the resolve process
  • pcb
    user-supplied callback that will be resumed upon completion; results will be available only then. If NULL then starts a synchronous query; a synchronous query only returns immediately available results (no network access) and cached results (if an address cache exists). If StartQuery() returns SUCCESS, results are immediately available. If an address needs to be resolved and is not found in the cache, AEE_NET_UNKDOMAIN is returned.
   int IAddrInfo_StartQuery
      IAddrInfo *me, 
      const char *szNodeName,
      const char *szServName, 
      const AEEAddrInfo *paiHints,
      AEECallback *pcb

AEE_SUCCESS : The query information was set.
All other values : indicate failure, in which case the query information is not set and the instance is unmodified. In this context, the following error codes have special meaning:

       AEE_EBADSTATE: The object is not in the proper state for the operation. i.e.,
                      StartQuery cannot be called again after a transaction was initiated. 
       AEE_NET_EAI_BADFLAGS: dwFlags in paiHints had an invalid value.
       AEE_NET_GENERAL_FAILURE: A non-recoverable error occurred when processing the parameters.
       AEE_NET_EAFNOSUPPORT: The address family was not recognized.
       AEE_NET_ENOMEM: There was a memory allocation failure.
       AEE_NET_EAI_BADREQUEST: request parameters are in error, i.e. neither szNodeName nor szServName 
                               were supplied (at least one of these must be supplied).
       AEE_NET_ESOCKNOSUPPORT: The intended socket type was not recognized.
       AEE_NET_EAI_UNSUPPFLAGS: dwFlags in paiHints had an unsupported value.
       AEE_NET_UNKDOMAIN: for an synchronous query, the address needs to be resolved but was not 
                          found in the address cache.

Other errors might be returned; the caller should verify that IAddrInfo_StartQuery() succeeded.
Side Effect
  • Follow