Joshua Kordani
2014-10-15 20:02:07 UTC
Greetings all. I am attempting to play with the FFI features of ccl,
and I've come up with this code snippet that I'd like some feedback on.
http://paste.lisp.org/display/144054
according to the win32 api, the function that I call will return 0 on
error and nonzero on success. In this case, this function is used to
request various bits of data about a given windows volume, and so all of
the arguments are optional. arguments are set to defaults with null
pointers, and the ones that the user would like filled are passed in
pointers that I imagine are already allocated for the given type of data.
In my annotation i changed the with-mactprs macro to the %stack-block
macro, I guess I didn't really realize that I'm allocating foreign
memory, or memory that foreign code will write to that I setup is
considered foreign memory, and then I guess the %stack-block macro is
the right thing here. Any feedback would be welcome!
and I've come up with this code snippet that I'd like some feedback on.
http://paste.lisp.org/display/144054
according to the win32 api, the function that I call will return 0 on
error and nonzero on success. In this case, this function is used to
request various bits of data about a given windows volume, and so all of
the arguments are optional. arguments are set to defaults with null
pointers, and the ones that the user would like filled are passed in
pointers that I imagine are already allocated for the given type of data.
In my annotation i changed the with-mactprs macro to the %stack-block
macro, I guess I didn't really realize that I'm allocating foreign
memory, or memory that foreign code will write to that I setup is
considered foreign memory, and then I guess the %stack-block macro is
the right thing here. Any feedback would be welcome!
--
Joshua Kordani
LSA Autonomy
Joshua Kordani
LSA Autonomy