DSpGetNextContext
You can use the DSpGetNextContext function to get the next context in a list of available contexts for a display. Use this function in conjunction with the DSpGetFirstContext function, which gets the first context in the list for a specified display.
OSStatus DSpGetNextContext ( DSpContextReference inCurrentContext, DSpContextReference *outContext);
inCurrentContext
- The context reference that was just returned by DSpGetFirstContext or DSpGetNextContext.
outContext
- On exit, a reference to the next context in the list of available contexts.
- function result
- A result code.
DESCRIPTION
The DSpGetNextContext function takes, in theinCurrentContext
parameter, a reference to a context in a list of contexts that are available for a display and returns, in theoutContext
parameter, a reference to the next context in the list. If inCurrentContext contains the last context in the list, DSpGetNextContext returns an error.A sample use would be:
DSpContextReference theContext; theError = DSpGetFirstContext(theDisplayID, &theContext); /* process the error */ while (theContext) { /* process the context */ /* get the next context */ theError = DSpGetNextContext(theContext, &theContext); /* process the error */ }CALLING RESTRICTIONS
Do not call this function during an interrupt.