ORA_FFI: How can I read buffers that contain zeroes
Posted on 2002-06-21
I have a problem with the OracleForms Foreign Functions interface (ORA_FFI package).
My foreign function is written in C++ and it returns a buffer of bytes. How can I obtain that buffer in PL/SQL? I have tried using varchar2 but it fails if the buffer contains zeroes. The first encountered zero is interpreted as a string terminator and everything contained in the buffer after that zero is ignored. All I get in the varchar2 variable is the contents of the buffer *before* the zero.
So, my quiestion is: what PL/SQL datatype can I use to process buffers returned by foreign functions?