[REBOL] calling a DLL
From: belkasri::1stlegal::com at: 11-Jul-2002 17:37
I am trying to call a DLL from REBOL.
I load the library, create the routine (make routine!) ...all the rest seems
to work fine.
I have a problem with the parameter to pass:
The DLL is expecting a structure of this nature:
#define Max 41
struct loc-data {
char name[Max];
float lat;
float lon;
....
}
On the REBOL side, I have:
loc-data: make struct! [
name [string!]
lat [decimal!]
lon [decimal!]
....
] [
Dallas, TX
32.7941
-96.765
....
]
Then I make the routine:
my-routine: make routine! [
arguments passed to the structure
loc-data
return: [long]
] clib "Func-I-Am-Calling"
it seems not to like loc-data structure, possibly because
char name[41]
is not really the same as:
name [string!]
What's wrong? and how to fix it?
Thanks.
--Abdel.