Hi all!! I think I solved the problem. It was an initialization problem. The "ptr_readbuf" was an input array that was treated in the function and returned an output array "ptr_writebuf". I didn't thought of initialize this, because I thought that the function itself would use the correct number of elements of the array. But suposedly, the C function needed to know how many elements had the output array, because of a question of memory. Firstly, I had put the parameter "ptr_writebuf" as a void array. And then I realized that it could be a problem (in fact, it was) and I initialized it to a vector of as many zeros as it needed to store the output. And it works!!!
Nevertheless, thank you for all!!! Obatistor
