At 11:08 PM 3/30/2003 -0800, apple k wrote:

Hi,

Is the dmHdrAttrReadOnly can be set on any pdb? how
come i have encountered the illegal accessing memory
problem?

snippet code:

 dbID = DmFindDatabase(0, "ABCDB");
 if (dbID!=0)
 {
   error = DmSetDatabaseInfo(0, dbID,NULL,(UInt16*)
           dmHdrAttrReadOnly ,0,0,0,0,0,0,0,0,0);
 }

Because the number dmHdrAttrReadOnly isn't a valid memory address!


You need this:

   UInt16 attribs = dmHdrAttrReadOnly;
   error = DmSetDatabaseInfo(0, dbID,NULL,
           &attribs,0,0,0,0,0,0,0,0,0);




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

Reply via email to