.. highlightlang:: us .. index:: DdeCallback_Connect .. _ddecallback_connect: DdeCallback_Connect =================== .. us.tag DdeCallback_Connect ENGLISH :ref:`DdeCallback_Connect` is called when a client wants to open a channel to UniScript. .. function:: bool = DdeCallback_Connect(ssService, ssTopic) .. us.return **Return Value** *bool* is TRUE (1) when the channel was successfully opened and FALSE (0) if the function was unsuccessful. .. us.params **Parameters** .. uparam:: ssService *ssService* is a service name. For UniPlot, it is the name ``"UniPlotSL"``. .. uparam:: ssTopic *ssTopic* is the topic name. .. us.comment **Comment** The standard DDE callback function which is located in the :file:`UniPlot/script/obj_dde.ic` file is only a function body. To use UniPlot as a DDE server, you have to add code to this function. .. us.example **Example** The following WORD-Basic program causes the UniScript function :ref:`DdeCallback_Connect`, :ref:`DdeCallback_ConnectConfirm` and the function :ref:`DdeCallback_Disconnect` to be called. :: Sub Main chan = DDEInitiate("UniPlotSL", "xyz") DDETerminate(chan) End Sub The standard DDE callback functions in UniScript are only function bodies. They produce the following output into the UniScript command window: :: ---Connect--- Service: UniPlotSL, Topic: xyz ---ConnectConfirm--- Conversation-No.: a000500, Service: UniPlotSL, Topic: xyz ---Disconnect--- Conversation-No.: a000500 .. seealso:: :ref:`overview-dde`, :ref:`DdeCallback_ConnectConfirm`, :ref:`DdeCallback_Disconnect`, :ref:`DdeCallback_Request`, :ref:`DdeCallback_Poke`, :ref:`DdeCallback_Execute` :sub:`id-1560814`