LispWorks User Guide and Reference Manual > 18 Dynamic Data Exchange > 18.3 Server interface


18.3.1 Starting a DDE server

To provide a LispWorks application with a DDE server, follow the following three steps.

  1. Define a specialized Lisp DDE server class using define-dde-server. Here the server class is called foo-server and it has the service name " FOO ":
  2. (define-dde-server foo-server "FOO")

  3. Provide the server class with the functionality it requires by specializing methods on it and/or using define-dde-server-function. Here the server function is bar , which takes a string as an argument, and prints this to the standard output. For convenience, the system topic is used, though usually it is better to define your own topic.
  4. (define-dde-server-function (bar :topic :system)
        ((x string))
      (format t "~&~s~%" x)
  5. Start an instance of the server foo-server using start-dde-server.
  6. (start-dde-server `foo-server)

    This function returns the server object, which responds to requests for conversations with the service name " FOO ", and accepts execute transactions for the function bar in the " System " topic.

LispWorks User Guide and Reference Manual - 22 Dec 2009