> 1. download form a server a prc file. > 2. validate the prc that I am reading > 3. if the prc is valid -> rename the prc that allready exist on > the device.
This can be problematic. How and, more exactly, where do you download the prc? If you create a valid resource database on the device and put it there, it will overwrite the existing one, if the name is the same. One possibility is to download into a file stream database or something like that. Another (the one I'm using for a similar task) is rename your existing database first, then download the new one. If the new one passes the integrity check, delete the renamed one. If it doesn't, delete it and rename the old one back. > char *backupname; > sprintf(backupname,"%lu", TimGetTicks()); Do you allocate some memory for bakcupname? You have declared just a pointer; you must either declare an array instead - or point that pointer to an allocated piece of memory, before you can let sprintf put stuff there. > I get a "memorymgr.c line 3583 Free Handle" when the application > gets reaches the end.-> What does this mean? It usually means that you're trying to access unallocated memory - e.g., write to a NULL pointer. Remember the 2nd Commandment for C Programmers: http://www.lysator.liu.se/c/ten-commandments.html "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end." > I have changed my code in deleting the old prc before I create the > new one - and everything work ok, Yes, because you then don't rename and don't write to unallocated memory. :-) > from my point of view is that the DmSetDatabaseInfo is not making > it's job And from my point of view it is you who isn't doing yours of allocating memory before writing to it. :-) Regards, Vesselin -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
