SOL9 Sample: DnsAnyRecordQuery

SOL9 2.0 Samples

1 Screenshot


2 Source code

/*
 * DnsAnyRecordQuery.cpp 
 * Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


// SOL9
// 2011/1/1
// 2011/1/21 Modified this file name to be DnsAnyRecordQuery

#include <sol/WSAInitializer.h>
#include <sol/dns/DnsAnyRecordQuery.h> //2011/1/21 Modified
#include <sol/Locale.h>


void _tmain(int argc, TCHAR** argv)
{
  if (argc !=2) {
    _tprintf(_T("Usage:%s hostDomain\n"), argv[0]);
    _tprintf(_T("Ex: %s google.com\n"), argv[0]);
    return;
  }
  WSAInitializer initializer;
  Locale locale;
  try {

    DnsAnyRecordQuery recordQuery;
    recordQuery.query(argv[1]);
    recordQuery.display();

  } catch (Exception& ex) {
    ex.printf();
  } catch (...) {
    _tprintf(_T("Exception\n"));
  }
}

Last modified: 2 May 2016

Copyright (c) 2016 Antillia.com ALL RIGHTS RESERVED.