What is the pointer for RecPointer? Everyone is assuming it is CharPtr, but
if it is 'struct xpto *', then RecPointer + 2 will point two whole structs
ahead of current position, not two bytes ahead.
"Michael S. Davis" wrote:
> POSE Error: "...directly read from data manager data structure.."
>
> Is this really a no-no? POSE identifies this as an error and I'm trying
> to find the source.
>
> I have some code that gets Names from DB Records as follows:
>
> for(i=0; i<numRecs; i++) {
> RecHandle = DmQueryRecord(MyDB, i);
> RecPointer = MemHandleLock(RecHandle);
> StrCopy(NameArray[i], RecPointer + 2); // name starts at +2
> MemPtrUnlock(RecPointer);
> }
>
> First, would this generate _that_ error?
>
> And second, is this a no-no? Why is that a no-no, if it is?
>
> Thanks
>
> ----------------------------------------------------
> Shoot-to-Win
>
> Protect the 2nd Amendment
> ----------------------------------------------------
--
Sergio Carvalho
---------------
[EMAIL PROTECTED]
If at first you don't succeed, skydiving is not for you