--- Dominique wrote:
> Use DmStrCopy - the pointer returned in in a protected area.
No, I don't think you read his code carefully. Here was his code:
DmOpenRef dbRef;
MemHandle recordH;
UInt16 RecordNr;
char * recordPtr;
Char Regel[120];
dbRef = DmOpenDatabaseCreator('DATA', 'AlfA', dmModeReadWrite);
recordH = DmQueryRecord(dbRef, RecordNr);
recordPtr = MemHandleLock(recordH);
StrCopy (Regel, recordPtr);
...
He is copying from a locked pointer (recordPtr) to a local character
array (Regel). So, he is just reading from the protected area.
DmStrCopy() copies an array of characters to a protected data area.
The error he had with StrCopy() was probably due to either recordH or
recordPtr being NULL.
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/