Binary Data???

Trevor DeVore lists at mangomultimedia.com
Tue Feb 13 12:03:04 EST 2007


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);



-- 
Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
trevor at bluemangolearning.com





More information about the use-livecode mailing list