Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: calling a DLL

From: cyphre:seznam:cz at: 12-Jul-2002 18:14

----- Original Message ----- From: "Gregg Irwin" <[greggirwin--mindspring--com]> To: <[rebol-list--rebol--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! [ 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