FUNCTION your_ole_func(tcBuffer AS STRING @) AS any ... ENDFUNC *!* this is calling from vfp lcBuffer = REPLICATE(CHR(0), lnSize) your_ole_func(@lcBuffer) DIMENSION laBuffer[ lnSize ] FOR i = 1 TO lnSize laBuffer[ i ] = SUBSTR(lcBuffer, i, 1) ENDFOR *!* this is calling from C/C++ char *cBuffer = malloc(.. your_ole_func(cBuffer); for( i = 0; i < nSize; i++) { ... = cBuffer[ i ]; }I didn't test it, I hope that correct and solve your problem.