Disconnect the object from the program.

Call:

ts_idispatch(int iIDispatch,"detach");


Here:

iIDispatch is a handle to the program dispatcher object to be disabled.