This script saves an image
hello.dll
which is a Windows DLL:
-------------------- hello.lisp -------------------------
(in-package "CL-USER")
(load-all-patches)
;; The signature of this function is suitable for use with
;; rundll32.exe.
(fli:define-foreign-callable ("Hello"
:calling-convention :stdcall)
((hwnd w:hwnd)
(hinst w:hinstance)
(string :pointer)
(cmd-show :int))
(capi:display-message "Hello world"))
(save-image "hello"
:dll-exports '("Hello")
:environment nil)
---------------------------------------------------------
lispworks-6-0-0-x86-win32.exe -build hello.lisp
on the command line, or use the Application Builder tool.
(See Saving a LispWorks image for more information about how to save an image.)
You can test the DLL by running
rundll32 hello.dll,Hello
To see the dialog, you may need to dismiss the LispWorks splashscreen first.