Returns the context alarm of an application. MidiGetApplAlarm allows to know the address of the context alarm function associated to the application. This alarm is automatically called by MidiShare to inform the application of all the changes that happen to the active Midi applications (name or connection changes, closing, opening, etc.)
pascal ApplAlarmPtr MidiGetApplAlarm(short refNum);
refNum
- a 16-bit integer, it is the reference number of the application.
The result, a ApplAlarmPtr, is the address of the alarm routine or NIL if no such routine was installed.
pascal void MyApplAlarm (short refNum, long code);
refNum
- a 16-bit integer, it is the reference number of the application.
code
- a 32-bit integer, the context modification code.
Temporarily disables the applications context alarm.
ApplAlarmPtr p; /* ....... */ p = MidiGetApplAlarm( myRefNum ); MidiSetApplAlarm( myRefNum, NIL ); /* Disable application context alarm*/ /* ....... */ MidiSetApplAlarm( myRefNum, p ); /* Restore application context alarm*/