Share this page

# Example: ms_dns_nextresult

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

    #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 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: