Share this page

# ms_dns_nextresult

DNS Functions (MS_DNS)

Advances to the next IP address in the list returned by ms_dns_query.

    char* ms_dns_nextresult( char *ipaddresslist );

ipaddresslist | A list of NULL terminated IP addresses, as returned from ms_dns_query or ms_dns_nextresult

The ms_dns_nextresult function looks up the next IP address in the list of IP addresses, that were returned by ms_dns_query.

A script that calls ms_dns_nextresultmust have an `#include "mic_socket.h"` statement.

## Return Values

Returns the next IP address in the list supplied by ms_dns_query

## Parameterization

Standard parameterization is not available for this function.

## Example

In the following example, the ms_dns_nextresult function prints all of the IP addresses in the list.

Copy code

    #include "mic_socket.h"
        int rescnt = 0;
        char *results = NULL;

        lr_load_dll ( "micsocket.dll" );

        results = (char *) ms_dns_query("transaction"
                 "URL=dns://<DnsServer>",
                 "QueryHost=<Hostname>",
                 NULL);

        // List all the results...
        while (*results) {
            rescnt++;
            lr_log_message( lr_eval_string("(%d) IP address for <Hostname> is %s"),
                rescnt, results);
            results = (char *) ms_dns_nextresult(results);
    }

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: