From: Jason Roelofs Date: 2008-01-18T12:23:52+09:00 Subject: Re: from "int cfunc(char *data,int *num) " how can I get the value of 'num' in ruby/dl ? ------=_Part_3184_16232474.1200626628225 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Stop posting the same thing. If you don't get an answer, maybe you need to restate your question. Jason On Jan 17, 2008 10:19 PM, bbmerong wrote: > I have a question about "ruby/dl". > > I define the function in "ruby/dl" like the belows > > > -------------------------------------- > require 'dl' > LIB=DL.dlopen('libfunc.dll') > cfunc=LIB['cfunc','ISi'] # int cfunc(char *data,int *num) > --------------------------------------- > > > After typing in irb, I typed them like this. > > > len=DL.malloc(DL.sizeof("I")) > err=cfunc.call("hello",len) > > > But, error message is displayed like the belows. > > > "TypeError: can't convert DL::PtrData into Integer" > > > I'm not sure how to solve the problem. > > It makes me annoying > > > Please let me know the reason and solutions for novice like me. > > > Then, Thank you in advance. > > > > ------=_Part_3184_16232474.1200626628225--