> If mybuf comes from the database then it should already be NUL > terminated. It doesn't need to be copied, sqlite_decode_binary does > that for you. > > unsigned char out[15000]; > int size=sqlite_decode_binary(mybuf,out); // should be enough > > OR just > > int size=sqlite_decode_binary(mybuf,mybuf); // just the binary needed
Hmm... That's a bit of a different perspective on things :-) But I have this value in a char **Values[], like this: ----8<---- while(sqlite_step(Vm,&cnt,&Values,&ColumnNames)!=SQLITE_DONE) { for(int i=0;i<cnt;i++) { switch(i) { case whatever: the picture data is = Values[i]; break; } } } ----8<---- So, the Values is declared like: const char **Values; and sqlite_decode_binary() wants an unsigned char. Can you help me and tell me what to do in order to supply sqlite_decode_binary() with the data it wants in a correct fashion? Thank you in advance, Dennis