Generally speaking, a dde object expecting to interact with an application declares one or more callback lists as resources; the application adds to these callback lists the callbacks that are invoked whenever the predefined callback conditions are met. Callback lists are resources, so that the application can set or change the function that is invoked.
Callbacks are not necessarily invoked in response to any event; a dde object can call the specified routines at any arbitrary point in its code, whenever it wants to provide a "hook" for application interaction. For example, all dde objects provide a terminationCallback resource to enable applications to interpose a routine to be run when the DDE instance is disconnected.
This message adds a new callback to the end of the callback list. A callback is invoked as many times as it occurs in the callback list.
Return value:
This message removes all the dde instance's callback messages identified by callbackName, regardless of the value of the clientData associated with each message. This is in contrast to removeCallback:..., which removes the specified callback only if a specified clientData parameter also matches.
This message removes a callback message identified by callbackName.
The callback is removed only if both the callback object and clientData match a callback/data pair in the list. No warning message is generated if a callback to be removed fails to match a callback or clientData in the list. Use removeAllCallbacks:... if you want to remove a particular callback regardless of the value of its clientData.