From: Tadeusz Bochan Date: 2011-02-26T06:43:24+09:00 Subject: Re: Console output formatting Hi. If you look in your ruby folders, you should find a file called dl.txt. Rudimentary and cryptic documuntation, but reading it with a bit of patience may help. It is some time ago that I looked it, and the best doc I found was at http://www.jbrowse.com/text/rdl_en.html but at the moment I get 'access denied' when I tried to go there. The method I described earlier has served me very well and it is quite easy once you get the hang of it. Firtly, you tell DL where your library is : lib1=DL.dlopen(library) # Open library then you create 'pointers' to the routines you want, along with the parameter prototype string. I remember there were quite a few parameter code, but the only ones I ended up using were 'I' & 'S' without problems. Some others were "L" for long, "P" for pointer. As long as you are clear about passing parameters by value or by reference you should be ok. (I don't do C, but I still manage) func1=lib1['funtion1','ISSSS') # integer returncode +4 parameters passed by reference Then to call the function, you can use .call or [] returncode=func1.call(p1,p2,p3,"p4").first or returncode=func1[p1,p2,p3,"p4"].first HTH -- Posted via http://www.ruby-forum.com/.