The script below creates
hello.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")
;; quit when library's job is done
(dll-quit))
(deliver nil "hello" 0 :dll-exports '("Hello") :interface :capi)
---------------------------------------------------------
You can build the DLL with this command line:
lispworks-5-1-0-x86-win32.exe -build hello.lisp
and you can test it with this command line:
rundll32 hello.dll,Hello