----- Original Message -----
From: "Gregg Irwin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 12, 2002 5:11 PM
Subject: [REBOL] Re: calling a DLL
....
> Have you tried initializing loc-data/name to a string of 41 characters,
with
> or without a null terminator, before making the call? Have you tried
> [char*], instead of [string!], as the datatype?
>
....

Hi Gregg, Abdel

from my experience with Rebol dll interface you should also try put into the
structure deffinition 41  val [char!] instead of the string! or char* like:

loc-data: make struct! [
              name1 [char!]
              name2 [char!]
              name3 [char!]
              .....
              ......
              name40 [char!]
              name41 [char!]

              lat [decimal!]
              lon [decimal!]
             ....

]

but maybe this annoying thing was improved in the new beta release of View?

anyway, here is simple function for easy generation of such structures I
used some  time ago:

gen-chars: func [word-name num /local result][
       result: copy ""
      insert result newline
      repeat n num [append result join word-name [n " [char!]" newline]]
      load result
]

example:

GFL_COLORMAP: make struct! compose/deep [
 (gen-chars "Red" 256)
 (gen-chars "Green" 256)
 (gen-chars "Blue" 256)
] none

good luck!

regards,

Cyphre

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to