From: ·········@yahoo.com
Subject: Calling Win32 from CLisp
Date: 
Message-ID: <1119050204.138988.322970@g47g2000cwa.googlegroups.com>
Hi,

How can I call Win32 API from CLisp. I had to write a small application
that can stress-test our driver by loading CPU from 0 to 100% so I
found it pretty easy to make in in Python. Much as I like Lisp and
would like to write it in CLisp under Windows. Where can I find this
info?

Thanks a lot!
Andrew

From: Kenny Tilton
Subject: Re: Calling Win32 from CLisp
Date: 
Message-ID: <ACJse.25732$IX4.105@twister.nyc.rr.com>
·········@yahoo.com wrote:
> Hi,
> 
> How can I call Win32 API from CLisp. I had to write a small application
> that can stress-test our driver by loading CPU from 0 to 100% so I
> found it pretty easy to make in in Python. Much as I like Lisp and
> would like to write it in CLisp under Windows. Where can I find this
> info?

the CLisp documentation? :)

If, however, you mean, "jeez, this FFI stuff is a pain!", true. This 
mini project:

    http://common-lisp.net/cgi-bin/viewcvs.cgi/clisp-cgtk/?cvsroot=cells-gtk

...includes gtk-ffi.lisp which has a ton of examples. Unfortunately it 
is to GTK+, not win32. But I wager you can google up win32 lisp bindings 
for some Lisp (Corman?) and merge the two products with some degree of 
tedium. (Not saying you won't find clisp/win32 bindings, but make sure 
they use the new FFI for Clisp).


-- 
Kenny

Why Lisp? http://lisp.tech.coop/RtL%20Highlight%20Film

"If you plan to enter text which our system might consider to be 
obscene, check here to certify that you are old enough to hear the 
resulting output." -- Bell Labs text-to-speech interactive Web page
From: ·········@yahoo.com
Subject: Re: Calling Win32 from CLisp
Date: 
Message-ID: <1119295507.778037.7070@g43g2000cwa.googlegroups.com>
I looked into the CormanLisp and found the bindings for the Win32
functions. Most of them use ":linkage-type :pascal" when defining the
out-call. I didn't find the linkage specification in CLisp
documentation. Does it mean that the called function always use "C"
style linkage, that is doesn't remove parameters from the stack when it
returnes?

Andrew
From: ·········@yahoo.com
Subject: Re: Calling Win32 from CLisp
Date: 
Message-ID: <1119299612.968079.299960@f14g2000cwb.googlegroups.com>
I think I found the option for ":pascal" it's (:language :STDC-STDCALL)
for CLisp ffi.

Andrew