TELCAMsgHand
Registers a call appearance message handler and specifies which messages it should receive.
pascal TELErr TELCAMsgHand ( TELDNHandle hTELDN, long eventMask, TelephoneCAMsgUPP msgProc, long globals);
hTELDN- A handle to the directory number record for the directory number for which you want to receive messages.
eventMask- A long integer that specifies which call appearance messages this message handler should receive. To have your message handler receive a certain message, set a bit to 1. See "Call Appearance Messages" on page 5-14 for a description of the bit masks you can use.
msgProc- A message handler (page 5-59).
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
TheTELCAMsgHandfunction registers the message handler specified by themsgProcparameter to respond to the call appearance messages issued by the directory number specified by thehTELDNparameter. You specify which messages you want to receive by setting bits in theeventMaskparameter.You can register more than one call appearance message handler. Thus, you can design a message handler to manage a particular feature or a set of related features and screen out unrelated call appearance messages.
Once you register a call appearance message handler, you cannot change the types of messages it is registered to receive. However, you can unregister the message handler by calling the
TELClrCAMsgHandfunction (page 5-55) and then register it again with a new value in theeventMaskparameter.SEE ALSO
To find out which call appearance messages a telephone tool supports, call theTELCAEventsSuppfunction (page 5-48).Use the
TELTermMsgHandfunction (page 5-50) to register a handler for terminal messages.Use the
TELDNMsgHandfunction (page 5-51) to register a handler for directory number messages.Call the
TELClrCAMsgHandfunction (page 5-55) to remove a call appearance message handler from the Telephone Manager's calling list.