title: write a C++ code to get the hostname
body: <p>I want to write a C++ Code to get the full information on all the host name, and ip address and sub net mask of computer that has been added to the domain control.</p>