OpenersNotesSection(Spacer1)Details

The memory used by the name n must have been created by a call to (NonWLLink[MLLowLevelDeviceName(), paclet:ref/c/MLLowLevelDeviceName]).

MLReleaseLowLevelDeviceName() 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"

int main(int argc, char **argv)
{
	MLENV env;
	MLINK link;
	int error;
	const char *name;
	int apiResult;

	env = MLInitialize((MLEnvironmentParameter)0);
	if(env == (MLENV)0)
	{ /* Unable to create environment object */ }

	link = MLOpenArgcArgv(env, argc, argv, &error);
	if(link == (MLINK)0 || error != MLEOK)
	{ /* Unable to create the link object */ }

	MLActivate(link);

	apiResult = MLLowLevelDeviceName(link, &name);
	if(apiResult == 0)
	{ /* Failed to retrieve low level name */ }

	/* ... */

	MLReleaseLowLevelDeviceName(link, name);		

	/* .... */

	MLClose(link);
	MLDeinitialize(env);
	return 0;
}

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