OpenersNotesSection(Spacer1)Details

MLLinkWaitCallBackObject is used with (NonWLLink[MLWaitForLinkActivityWithCallback(), paclet:/ref/c/MLWaitForLinkActivityWithCallback]).

A function used as a MLLinkWaitCallBackObject should return 1 to indicate (NonWLLink[MLWaitForLinkActivityWithCallback(), paclet:/ref/c/MLWaitForLinkActivityWithCallback]) should return.

MLLinkWaitCallBackObject is defined 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 WaitFunction(MLINK l, void *unused)
{
	return 0;
}

void f(MLINK l)
{
	switch(MLWaitForLinkActivityWithCallback(l, (MLLinkWaitCallBackObject)WaitFunction))
	{
		catch MLWAITERROR:
			/* handle the error. */
			break;
		catch MLWAITSUCCESS:
			/* Read the data off the link */
			break;
		catch MLWAITCALLBACKABORTED:
		default:
			/* wait was aborted */
	}
}

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