Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
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.