TELDNMsgHand
Registers a directory number message handler and specifies which messages it should receive.
pascal TELErr TELDNMsgHand ( TELDNHandle hTELDN, Boolean allDNs, long eventMask, TelephoneDNMsgUPP msgProc, long globals);
hTELDN- A handle to the directory number record for the directory number for which you want to receive messages.
allDNs- A Boolean value that indicates whether the message handler should get messages for all directory numbers associated with the same terminal as the one identified by the
hTELDNparameter. Set this parameter totrueto receive messages for all such directory numbers. Set this parameter tofalseto receive only messages for the directory number specified by thehTELDNparameter.eventMask- A long integer that specifies which directory number messages this message handler should receive. To have your message handler receive a certain message, set a bit to 1. See "Directory Number Messages" on page 5-12 for a description of the bit masks you can use.
msgProc- A message handler (page 5-57).
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
TheTELDNMsgHandfunction registers the message handler specified by themsgProcparameter to respond to the directory number messages issued by the directory number specified by thehTELDNparameter. You specify which messages you want to receive by setting bits in theeventMaskparameter. If you want to change a value in the message mask after you have registered a directory number message handler, you must first clear the message handler by calling theTELClrDNMsgHandfunction (page 5-55) and then register it again by callingTELDNMsgHand.SEE ALSO
Use theTELTermMsgHandfunction (page 5-50) to register a handler for terminal messages.Use the
TELCAMsgHandfunction (page 5-52) to register a handler for call appearance messages.Call the
TELClrDNMsgHandfunction (page 5-55) to remove a directory number message handler from the Telephone Manager's calling list.