TCPIP_DNS_HandlerRegister Function
C
TCPIP_DNS_HANDLE TCPIP_DNS_HandlerRegister(
TCPIP_NET_HANDLE hNet,
TCPIP_DNS_EVENT_HANDLER handler,
const void* hParam
);
Description
This function registers a DNS client event handler. The DNS client module will call the registered handler when a DNS client event (TCPIP_DNS_EVENT_TYPE) occurs.
Preconditions
The DNS module must be initialized.
Paramaters
Parameters | Description |
---|---|
hNet | Interface handle. Use hNet == 0 to register on all interfaces available. |
handler | Handler to be called when a DNS client event occurs. |
hParam | Pointer to non-volatile ASCIIZ string to be used in the handler call. It is used as a domain/host name. If not NULL, a DNS notification will be delivered only for a name resolution that matches the hParam. If the hParam == 0, then the notification is triggered for any host name resolution. |
Returns
Returns a valid handle if the call succeeds.
Returns null handle if the call failed (out of memory, for example).
Remarks
The handler has to be short and fast. It is meant for setting an event flag, not for lengthy processing.