Or, get the string in pieces from the DLL instead, i.e. $dll(mydll,getstring,1) would return string1, $dll(mydll,getstring,2) would return string2 etcetera.. that should make processing of the pieces in the script trivial at least, as you wouldn't need binvars at all anymore. You'd have to split up the string in your DLL code (and store it between DLL calls) though.