OpenersNotesSection(Spacer1)Details

MLReleaseDomainNameList() is declared in the MathLink header file (RefLink[mathlink.h, paclet:ref/file/mathlink.h]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

#include "mathlink.h"

/* A function that reads the domain names available on a machine */

void f(MLENV env)
{
	char **theList = NULL;
	char *tmp;
	unsigned long length;

	theList = MLGetDomainNameList(env, &length);

	if(length > 0 && theList != (char **)0)
	{
		while((tmp = *theList++) != (char *)0)
		{
			/* ... */
		}

		MLReleaseDomainNameList(env, theList, length);
	}
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLGetDomainNameList(), paclet:/ref/c/MLGetDomainNameList])  ▪  (NonWLLink[MLGetNetworkAddressList(), paclet:/ref/c/MLGetNetworkAddressList])}})}})