I have a MemPtr that is as a pointer to a custom structure (pdbLayout)

PDBData = static_cast<pdbLayout*>(MemPtrNew(size));

This is also the start of my data.

I have a second pointer (Char* pOffset) that locates the end of the data.

How can I find the size of the data?

This is not the right way --->>>>
size = static_cast<Int32>(pOffset) - static_cast<Int32>(PDBData);

So I can write it to a record:
MemMove(pNewData, PDBData, size);


Thanks

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

Reply via email to