Re: Tsunami Record Manager

new topic     » goto parent     » topic index » view thread      » older message » newer message

Thanks for the info Elliott.
Its very weird of them to pass strings on the stack instead of
pointers....
Never mind, we'll look forward to their new DLL. ...

Cheers,
Ross


> I posted something on their site and it turns out you must use Strings
and
> not pointers. So I tried to pass a sequence but that didn't work
either.They
> have decided to create a DLL that uses pointers and no QUAD integers,
so
> maybe we should wait until that comes out.
>
>
> >From: rossboyd at ihug.com.au
> >Reply-To: EUforum at topica.com
> >To: EUforum <EUforum at topica.com>
> >Subject: Re: Tsunami Record Manager
> >Date: Sun, 27 Jan 2002 23:52:06 +1100
> >
> >
> >Yep, that's basically the same problem I'm getting (using the code I
> >uploaded).
> >I wonder why it works for VB but not Euphoria?
> >
> >It might be worth experimenting with calling trm.dll directly, and
using
> >the following trick to
> >pass the QUAD.
> >
> >You might be able to emulate the QUAD by passing two C_INTs.
> >The hard problem is with the functions that return a QUAD. Don't know
> >how to get round that
> >one. Maybe, by declaring it as returning a C_FLOAT and then
converting
> >it, somehow. Blech.
> >
> >Ross
> >
> > >
> > >  I used the VB DLL, but I am still having that problem also.
> > >  It's almost always the same error:
> > >
> > >      The instuction at 00a2c0e2 referenced memory at 00000001
> > >      The memory could not be read from.
> > > Sometimes its 00000000 instead of 00000001.
> > >
> > > [Offtopic]
> > > If anyone is still wondering, I didn't get this message and
another
> > > reply from Markus Vedder-Kemnitzer. And Bernie's came really late,
> >too.
> > >
> > >
> > > rossboyd at ihug.com.au wrote:
> > > > > Ok, so I almost wrapped this library. But i have one problem.
What
> >is
> > > > a
> > > > > QUAD? I know what all the other types are and what to put them
in
> >as
> > > > but
> > > > > Euphoria doesn't seem to have a tye for a QUAD. If anyone
knows
> >how it
> > > > > should work, could you tell me?
> > > >
> > > >
> > > > To get around the problem of the QUAD, download the trm_vb.dll
from
> > > > their site.
> > > > Its a wrapper for all the functions which require returning or
> >passing a
> > > > QUAD.
> > > >
> > > > I've been trying to get it to work myself but am having trouble
with
> > > > calling trm_Open() in trm.dll.
> > > >
> > > > Perhaps someone here can help????????
> > > >
> > > > This is the VB declaration.
> > > > ~~~~~~~~~~~~~~~~~~
> > > > Declare Function trm_Open Lib "TRM.DLL"  (PathFileName As
String,
> > > > MultiUser As Long) As Long
> > > >
> > > > Here's my code.... what am I doing wrong?
> > > >
> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > include machine.e
> > > > include dll.e
> > > >
> > > > atom trm,trm_vb ,trm_Loaded, trm_Open ,lpcstr ,hFile, mode
> > > >
> > > > trm = open_dll("trm.dll")
> > > > trm_vb = open_dll("trm_vb.dll")
> > > > if trm = 0 or trm_vb = 0 then
> > > >     puts(1, "Couldn't open the dlls!\n")
> > > >     abort(1)
> > > > end if
> > > >
> > > > trm_Loaded = define_c_func(trm_vb, "trm_Loaded" ,{}, C_LONG)
> > > > trm_Open  = define_c_func(trm, "trm_Open" ,{C_POINTER, C_LONG},
> >C_LONG)
> > > >
> > > > if c_func(trm_Loaded,{}) = 0 then
> > > >     puts(1, "Not Loaded!\n")
> > > >     abort(1)
> > > > end if
> > > >
> > > > lpcstr = allocate_string("trmdemo.dat")
> > > > mode = 0
> > > >
> > > > -- it produces an application error on this call...
> > > > hFile = c_func(trm_Open,{lpcstr, mode})
> > > > puts(1,"If you can read this, it worked...\n")
> > > >
> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > >
> > > >
> <snip>
>
> >
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu