[REBOL] Re: calling a DLL
From: cyphre:seznam:cz at: 12-Jul-2002 18:14
----- Original Message -----
From: "Gregg Irwin" <[greggirwin--mindspring--com]>
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,
> 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! [
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]]
GFL_COLORMAP: make struct! compose/deep [
(gen-chars "Red" 256)
(gen-chars "Green" 256)
(gen-chars "Blue" 256)