> If you could give me a small example of how you would like to use
> this, I can take a look.

I suggest you read  Miguel de Icaza's blog entry here about using
dynamic and pinvoke. The concept is quite simple. Basically you have
to generate a method on-the-fly and tag it with the correct
attributes, then simply use that method to call the pinvoke routines.

http://tirania.org/blog/archive/2009/Aug-11.html

The one thing to note though, is the above blog uses the
CallingConventions enum value for Linux. Windows has standardized on a
different calling convention, so you may have to dynamically switch to
the correct enum value depending on the platform.

>From there it should be possible to setup something like this (Pinvoke
info taken from http://pinvoke.net/default.aspx/user32.MessageBox):

(defdllimport user32 "user32.dll" :char-set-auto)

(def message-box (extern user32 ^Integer MessageBox [^Integer hWind
^String text ^String caption ^Integer options]))

Anyway, just some ideas.


Timothy

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to