Okay, this a bit of a dorky question. I asked at a C Forum, and this was the suggestion. I'm hoping this is a Palm Dev Forum related issue:
I'm simply trying to add and Int32 element from one structure to the other but I keep getting: Application just read from memory location 0x0000000014, which is in low memory. "Low Memory" is defined as ............ It should not be directly accessed...
*************************************************************************************************************************************** typedef struct { UInt32 *orderQty; Char *key; Char *desc; } OnOrder;
onOrder.orderQty = (UInt32 *) StrAToI(FldGetTextPtr(field)); // Gets the number from the field UnpackOnOrder(&onOrderFound, packedOnOrder); // Grabs from pdb *(onOrder.orderQty) += *(onOrderFound.orderQty); // THIS LINE CAUSES THE ERROR
*************************************************************************************************************************************** Can someone shed some light on this please?
Where are you allocating memory that your orderQtr pointer will point to. I suspect that orderQtr should really be a UInt32, not a pointer to a UInt32. The same question goes for key and desc. Unless you allocate space somewhere in memory and stick a pointer to that space into the fields, you're dealing with unknown values.
I think you need to read up on C pointers and string handling. This doesn't just apply to Palm OS but to any platform using C.
--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
