Binary Data???

Dave dave at looktowindward.com
Tue Feb 13 12:09:32 EST 2007


On 13 Feb 2007, at 17:03, Trevor DeVore wrote:

> On Feb 13, 2007, at 8:02 AM, Dave wrote:
>
>> Hi All,
>>
>> I would like to pass a large buffer of binary data to an External  
>> Function, but I'm not sure how to go about it in TranScript.
>
> Pass in the name of the variable to store the binary data in as an  
> argument to your function.  Then use an ExternalString and  
> SetVariableEx.  For example, to assign the contents of a HANDLE  
> containing PNG data you would do something like this:
>
> ExternalString theExternalString.buffer = *thePNGHandle;
> theExternalString.length = GetHandleSize(thePNGHandle);
> SetVariableEx( p_arguments[0], "", &theExternalString, &r_success);

Hi Trevor,

Yes, I was thinking of doing it that way, but I would like to keep  
the Setup in RunRev since it is easier to change and also I can make  
a cool GUI interface for it. It's only performed once at startup so  
I'm not worried about the execution speed.

All the Best
Dave




More information about the use-livecode mailing list