Interrogating Variables Checking the state of the variables is handled by Apple Guide context checks. In this case, two longs are passed in the pInputData parameter. The easiest way to access them is to create a structure. If command contains a 0, then a check is made to see if the value is 0. If it contains a 1, then the check sees it if the value is non-0.
Index is used to define which variable to check.
The result is returned in this way because it is part of a far wider mechanism. MySetContextResult creates a pointer and moves the value in result into to it. Next, it returns the newly created pointer and the size of the data within it. Apple Guide is responsible for deallocating this pointer. Setting the context check result.