TELTermMsgHand
Registers a terminal message handler and specifies which messages it should receive.
pascal TELErr TELTermMsgHand ( TELHandle hTEL, long eventMask, TelephoneTermMsgUPP msgProc, long globals);
hTEL- A handle to the telephone record for the terminal about which you want to receive messages. The telephone record is returned by the
TELNewfunction or theTELNewWithResultfunction, and is described in "Telephone Record" on page 1-22.eventMask- A long integer that specifies which terminal messages this message handler should receive. To have your message handler receive a certain message, set a bit in to 1. See "Terminal Messages" on page 5-9 for a description of the bit masks you can use.
msgProc- A message handler (page 5-56).
globals- A long integer for your use. The Telephone Manager passes this value to your message handler. You can use this value, for example, to access your application's global variables.
- function result
- A result code. See "Result Codes" on page 5-60 for a list of result codes that the Telephone Manager may return.
DESCRIPTION
TheTELTermMsgHandfunction registers the message handler specified by themsgProcparameter to respond to the terminal messages issued by the terminal specified by thehTELparameter. You specify which messages you want to receive from that terminal by setting bits in theeventMaskparameter. If you want to change a value in the message mask after you have registered a terminal message handler, you must first clear the message handler by calling theTELClrTermMsgHandfunction (page 5-54) and then register it again by callingTELTermMsgHand.SEE ALSO
Use theTELDNMsgHandfunction (page 5-51) to register a handler for directory number messages.Use the
TELCAMsgHandfunction (page 5-52) to register a handler for call appearance messages.Use the
TELClrTermMsgHandfunction (page 5-54) to remove a terminal message handler from the Telephone Manager's calling list.