[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Problem referencing functions in a C DLL using Ruby/DL

Dude #2.5

3/10/2005 3:02:00 PM

Hi,

I've sucessfully used Ruby/DL to reference a DLL before, however, I've
not been able to figure out this one. It's MITAB DLL
(http://mitab.ma...). I'm a little unclear about how I
reference the functions within.

I'm using the extern notations:

extern 'long _mitab_c_getlibversion()'

I've used this same DLL under Borland Delphi, and usually use this sort
of notation:

A late binding reference would use:

@mitab_c_getlibversion:=
GetProcAddress(MITABDLL_Handle,'_mitab_c_getlibversion@0');

Whereas a static (cdecl) reference would be:

function mitab_c_getlibversion (): longint;

cdecl; external DLL Name 'mitab_c_getlibversion'
;

Under Ruby, I've tried a number of combinations, but always get either:

symbol': can't find the symbol `_mitab_c_getlibversion@0'
(RuntimeError)

or

a parser error.

I did update Ruby/DL's import.rb to accept the "@0" notation (which I
believe indicates the "size" of the parameters taken by the function),
but that hasn't helped any. (My change only went as far as updating
the regex so that the notation was accepted, maybe I need to do more to
actually put it to use.)

One twist is that I think this is a C++ DLL, with externs for C, but
I've not found anything that indicates how this would impact my
bindings.

Any help or pointers would be greatly appreciated.

Thanks.

-Chris

2 Answers

rL

3/6/2012 10:26:00 PM

0

In article <e8rcl7hn6144190npoqjsre5uic7s2e1th@4ax.com>, Alan Ferris
<hairy.ferrit@yahoo.co.uk> wrote:

>On Tue, 06 Mar 2012 10:25:35 -0800, rL@somis.org (? R. L. Measures.)
>wrote:
>
>>>>>>>They have a record of an Alan Ferris.
>>>>>>>
>>>>>>? who's "they"?
>>>>>
>>>>>Broadmoor psycho hospital.
>>>>>
>>>>? So you have access to the patient files at Broadmore?
>>>
>>>Google found a record.
>>>
>>? Patient files posted on the Internet? What's wrong with this picture?
>
>It is Earl just lying as usual. He has now posted the address of 3
>different Alan Ferris'. Obviously his need to lie surpasses his
>common sense.
>
? Lying other than calumny is not against the Ten Commandments.

--
Richard L. Measures. AG6K, 805-386-3734, www.somis.org

duke

3/7/2012 12:39:00 PM

0

On Tue, 06 Mar 2012 10:25:35 -0800, rL@somis.org (? R. L. Measures.) wrote:

>In article <bhgcl7d7ronjialoj2go3kae451c7qh81u@4ax.com>, duke
><duckgumbo32@cox.net> wrote:
>
>>On Mon, 05 Mar 2012 08:30:12 -0800, rL@somis.org (? R. L. Measures.) wrote:
>>
>>>In article <pje9l7hmffrrhlq5n92s1jsh4ii9nha2b3@4ax.com>, duke
>>><duckgumbo32@cox.net> wrote:
>>>
>>>>On Mon, 05 Mar 2012 03:17:29 -0800, rL@somis.org (? R. L. Measures.) wrote:
>>>>
>>>>>In article <rr47l75ve57u6dgqekh4mro55d2sqfo1d2@4ax.com>, duke
>>>>><duckgumbo32@cox.net> wrote:
>>>>>
>>>>>>On Sat, 03 Mar 2012 08:33:50 -0800, rL@somis.org (? R. L. Measures.) wrote:
>>>>>>
>>>>>>>In article <aa74l717fq69e6vun32ln973hrav4d2rq2@4ax.com>, duke
>>>>>>><duckgumbo32@cox.net> wrote:
>>>>>>>
>>>>>>>>On Sat, 03 Mar 2012 01:06:37 -0800, rL@somis.org (? R. L.
>Measures.) wrote:
>>>>>>>>
>>>>>>>>>In article <e2e1l79jla8hkr8ltam9s6kls9ldjl1kdh@4ax.com>, duke
>>>>>>>>><duckgumbo32@cox.net> wrote:
>>>>>>>>>
>>>>>>>>>>On Thu, 01 Mar 2012 18:03:37 -0800, rL@somis.org (? R. L.
>>>Measures.) wrote:
>>>>>>>>>>
>>>>>>>>>>>In article <m510l7ppgljab1jrk48lpl9mv523eqbjiv@4ax.com>, duke
>>>>>>>>>>><duckgumbo32@cox.net> wrote:
>>>>>>>>>>>
>>>>>>>>>>>>On Wed, 29 Feb 2012 06:31:10 -0800, rL@somis.org (? R. L.
>>>>>Measures.) wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>>In article <766qk792srh4gek19ak4oj2h4d64jn1int@4ax.com>, duke
>>>>>>>>>>>>><duckgumbo32@cox.net> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>>On Tue, 28 Feb 2012 06:47:09 -0800, rL@somis.org (? R. L.
>>>>>>>Measures.) wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>In article <tmlpk7pcn89jprgcnuhi88gn98t3sggobb@4ax.com>, duke
>>>>>>>>>>>>>>><duckgumbo32@cox.net> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>On Mon, 27 Feb 2012 05:12:54 -0800, rL@somis.org (? R. L.
>>>>>>>>>Measures.) wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>In article <m3ckk752l0k036nl9gilel12t50cs8k3fm@4ax.com>, duke
>>>>>>>>>>>>>>>>><duckgumbo32@cox.net> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>On Sun, 26 Feb 2012 03:14:54 -0800, rL@somis.org (? R. L.
>>>>>>>>>>>Measures.) wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>? How moral is a code that allows the tweaking of
>>>>>>>>>>>little girls'
>>>>>>>>>>>>>>>>>>>>>nipples.
>>>>>>>>>>>>>>>>>>**********
>>>>>>>>>>>>>>>>>>>>>>>>>>>>Remember, I'm the one that called it a double
>standard.
>>>>>>>>>>>>>>>>>>>>>>>>>>>? I also remember who said it was okay.
>>>>>>>>>>>>>>>>>>**********
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>It's definitely wasn't me. Who was it?
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>? the quote was pretty definite.
>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>Yes, it was, and it wasn't me. So who was it?
>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>? _______
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>Ah, now you admit the error of your statement.
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>? I think you probably made the statement about nipple
>>>>>tweaking.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>**********
>>>>>>>>>>>>>>>>>>>>The issue is "who said it was ok?"
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>? It was not a matter of ok, it was a matter of a loving
>>>traditon
>>>>>>>>>>>inside
>>>>>>>>>>>>>>>>>>>one family.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>YOU.........said you remember who said it was ok above. Is
>>>>>this just
>>>>>>>>>>>>>another
>>>>>>>>>>>>>>>>>>case of your machoness when you really don't know?
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>Heeheehee.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>? Your ire was the tipping point. .
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>Waiting on you to reveal who said it was ok.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>? is the quote accurate?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>No indication that anybody said it was ok.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>? dodgeball.
>>>>>>>>>>>>
>>>>>>>>>>>>Well, who?
>>>>>>>>>>>>
>>>>>>>>>>>? The man in the mirror according to Alan F.
>>>>>>>>>>
>>>>>>>>>>Stinky's due back in the Broadmoor psycho hospital soon. It's just
>>>outside
>>>>>>>>>>London.
>>>>>>>>>>
>>>>>>>>>? Congrats on the bull's-eye Alan.
>>>>>>>>
>>>>>>>>Haahaahaa.
>>>>>>>>
>>>>>>>? confirmed.
>>>>>>
>>>>>>They have a record of an Alan Ferris.
>>>>>>
>>>>>? who's "they"?
>>>>
>>>>Broadmoor psycho hospital.
>>>>
>>>? So you have access to the patient files at Broadmore?
>>
>>Google found a record.
>>
>? Patient files posted on the Internet? What's wrong with this picture?

Not my problem.

duke, American - American

*****
1 John 3:4-6
4 Everyone who sins breaks the law; in fact,
sin is lawlessness. 5 But you know that he
appeared so that he might take away our sins.
And in him is no sin. 6 No one who lives in
him keeps on sinning. No one who continues to
sin has either seen him or known him.
*****