[Prev][Next][Index][Thread]

c-ffi question involving c-struct



I'm sure this has come up before but I can't remember what the
solution was - can anyone help?

I want to call an API function that takes a pointer to some structures
and a count of the number of structures. So I use make(...) to create
a number of my structures:

define C-struct <INPUT>
  slot type-value :: <DWORD>;
  pointer-type-name: <LPINPUT>;
end C-struct <INPUT>;

let key-input = make(<LPINPUT*>, element-count: 3);
key-input[0].type-value := 0; // error here

I get an error on the indicated line saying 'no next method'. Any
ideas how I achieve this sort of thing?

Chris.
-- 
http://www.double.co.nz/dylan






Follow-Ups: