From: Gin Mendi Date: 2009-08-14T13:43:24+09:00 Subject: Re: Ruby/DL question Aaron Patterson wrote: > On Thu, Aug 13, 2009 at 07:06:51PM +0900, Gin Mendi wrote: >> { >> MY_CALLBACK = DL.callback('0PL') { |result_list, count| >> next record? > Result list should always be a pointer to a pointer, right? If that is > the case, you need to create a struct of size count that contains that > array. > > From the new list struct, you should be able to access each MyStruct. I'm not so sure how I should exactly implement this. Been researching online and trying out stuff with the code but haven't gotten any luck. I first tried creating a structure that just contains an array: ResultList = struct [ "PVOID list[]" ] and then using this with resultList rl = ResultList.new(resultList) but this doesn't seem to work for me. How should I exactly use resultList to get the array of records (I'm assuming it's always an array of records). Right now the previous code i posted just captures the first record and puts it in my structure properly. Still can't get the other records. Thanks for reply! :) -- Posted via http://www.ruby-forum.com/.