I'm facing this problem:

I get a record from a database, then unpack it and copy (using MemMove) into a pointer I receive in my function. It works fine on treo 600, but not on the treo 650.
Here is the relevant part of the code:
/* Code starts here */
DBImagenesPkSC* registroActual;
DBImagenesSC* imagenCopia;

imagenCopia = (DBImagenesSC*)MemPtrNew(sizeof(DBImagenesSC));

/* Some code to get registroH, then... */

registroActual = MemHandleLock(registroH);

/* registroActual is a valid here */
/* I call a function to unpack my record into imagenCopia */

DesempacaRegistroImagen(imagenCopia, registroActual);

/* imagen comes from (the last parameter):
Int32 BuscaImagenP(UInt32 tienda, UInt32 fecha, UInt32 categoria, UInt32 producto, UInt32 catalogo, UInt32 subgrupo, LibTipoReportes tipo, DBImagenesSC *imagen) and is where the data should be copied to
*/

imagen = (DBImagenesSC*)MemPtrNew(sizeof(imagenCopia));// + imagenCopia->tamanio); MemMove(imagen, imagenCopia, sizeof(imagenCopia));// + imagenCopia->tamanio);

/* Messages just to know what's happening */
FrmCustomAlert (1013, "imagenCopia->nombre: ", imagenCopia->nombre, NULL); // I get something like "username_0x0001.jpg", wich is valid FrmCustomAlert (1013, "imagen->nombre: ", imagen->nombre, NULL); // I should get the sames as above, but I get weird characters instead /* The same happens with all the fields in imagen (different than imagenCopia's) */

/* Code ends here */

What's wrong here? It has worked with out a problem for several months on treo 600s but now they will use treo 650 and It doesn't work as expected. Any clue?

Thanks for your help

--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to