one obvious error is different number of formal parameters to test-wndclassex.
I don't know if that's enough to explain the error message, but it's certain to cause some trouble when the callback gets called.
>(defun test-wndproc (hwnd message wparam lparam)
> (c-function (:arguments
> (hwnd ffi:c-pointer)
> (message ffi:uint)
> (lparam ffi:uint))
> (:language :stdc)
> (:return-type ffi:long)))
> (:name "TestPointer")
> (:arguments (lisp-wndclass-ptr (c-ptr test-wndclassex)))
> (:library "WidgetToolkit.dll"))
>(defun run-test-suite ()
> (let ((wnd
> :cbSize (widget-sizeof-wnd)
> :style 0
> :lpfnWndProc #'test-wndproc
> :cbClsExtra 0
> :cbWndExtra 0
> :hInstance nil
> :hIcon (widget-defaulticon)
> :hCursor (widget-defaultcursor)
> :hbrBackground (widget-defaultbrush)
> :lpszMenuName "NONE"
> :lpszClassName "gClassName"
> :hIconSm (widget-defaulticon)
> (widget-testpointer wnd)
BTW, are you sure that stack-allocating all storage is correct?
C-PTR will lead to a copy of wndclassex being created on the stack for the duration of the call.
If that's not what you want, you may consider using (c-pointer test-wndclassex) (with a recent CLISP), but then you must allocated such an object.
Get latest updates about Open Source Projects, Conferences and News.