A query can not be started more then once!
- me:the interface pointer
- szNodeName[in]:NULL, host name, IP address or "\brewloopback"
- szServName[in]:NULL or decimal port number string
- paiHints[in]:some hints for the resolve process
- pcb[in]: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.