Example: lr.get_host_name

The following example retrieves the host name, checks its validity, and sends it to the output.

string hostname=lr.get_host_name();

if(hostname==null)

lr.output_message("Failed to get the host name");

else

lr.output_message("Host Name= " +hostname);