RE: Sequence-Atom-DLL
- Posted by Christopher B <president at insight-concepts.com> Jun 02, 2003
- 382 views
Hi Robert, I was not aware of E_INTEGER E_ATOM E_SEQUENCE.... :( I think I am going to have to look over the ref manual again :) Best regards Chris Robert Craig wrote: > > > president at insight-concepts.com wrote: > > I have been practicing creating and using .DLLs with Euphoria and the C > > Translator. > > > > I created a small .dll with a procedure File_Compress(sequence infile, > > sequence outfile, > > sequence setting) > > > > When trying to call the procedure from a test application, I get an > > error "Fatal run-time error: device or file name must be a sequence" > > > > I tried changing the data to a sequence and then I received and error > > that arguments to C routines must be atoms. > > When calling a .dll routine that's written in Euphoria, > you can pass any kind of Euphoria data as arguments to > the routine, but you must declare the routine using > define_c_proc/func and the E_ types (E_INTEGER, E_ATOM, ...), > not the C_ types (C_INT, ...). > e.g. > fc = define_c_proc(lib, "File_Compress", > {E_SEQUENCE, E_SEQUENCE, E_SEQUENCE}) > > c_proc(fc, {"infile.dat", "outfile.dat", {1,2,3}}) > > > Regards, > Rob Craig > Rapid Deployment Software > http://www.RapidEuphoria.com > >