(defpackage "WIN32" (:modern t) (:use "FFI") (:shadowing-import-from "EXPORTING" #:defconstant #:defun #:defmacro #:def-c-type #:def-c-enum #:def-c-struct #:def-c-var #:def-call-out)) (in-package "WIN32") (default-foreign-language :stdc-stdcall) ; WINAPI means __stdcall (def-c-type handle c-pointer) (def-c-type dword uint32) (def-c-type word uint16) (default-foreign-library "user32.dll") (defconstant MB_OK 0) (def-call-out MessageBoxA (:return-type int) (:arguments (parent handle) (text c-string) (caption c-string) (type uint))) (win32:MessageBoxA nil "Hello, Win32 API World!" "Hello, World!" win32:MB_OK)