i ran into a funny crash situation when trying to save a bitmap to a file. there are a few different ways to implement this, and i painstakingly tried them all, but they all crashed at the same spot, that is, where BITMAPFILEHEADER struct is populated.
there appears to be a known issue regarding this:
http://bremedios.blogspot.com/2008/07/crashes-accessing-valid-memory-due-to.html, but to read the relevant msdn pages and looking at code samples, there is no hint of any problem, and the operation is presented as almost trivial, if a little tedious (building file headers by hand, due to lack of support on the wince platform for certain bitmap operations.)
once you get beyond searching for "crash" and begin homing in on the "packing" aspect, you come across some explanations as to why things were happening, but nothing relating to what to do about them. (the suggested remedy in the link above doesn't seem to do anything; the application still crashed where the bfSize (DWORD) member of the BITMAPFILEHEADER struct is populated, even though a different struct type was defined and declared without the #pragma. the application built cleanly but still crashed at the same spot.)
so, my question is: does this situation ring a bell with anyone, especially as it relates to pelles c? the pelles c wingdi.h file contains the #pack pragmas that are mentioned in articles i've seen.
now, it has been mentioned to me here that code meant to run on the armh4i processor may not behave correctly on an armh4 chip (my device), but that was in the context of a 3rd party .dll built for the armh4i. in this case, i'm building with the normal pelles tools for armh4, with which i've not had a problem. but this is the first time i've had to deal with manipulating a bitmap at this level. since there seems to be a known issue, and before continuing to bang my head, i wanted to run things by the forum.
thanks, as usual, for any assistance
-go