The function start-dde-server
creates an instance of a server of the class specified by name which then starts accepting transactions. If successful the function returns the server, otherwise nil
is returned.
You need to call start-dde-server
in a thread that will process Windows messages. This can either be done by using capi:execute-with-interface
to run it in the thread of an application's main window (if there is one) or by running it in a dedicated thread as in the example. DDE callbacks will happen in this thread.
(mp:process-run-function
"DDE Server"
()
#'(lambda ()
(win32:start-dde-server 'lispworks-dde-server)
(loop
(mp:wait-processing-events
nil
:wait-reason "DDE Request Loop"))))
LispWorks User Guide and Reference Manual - 13 Feb 2015