On Fri, Sep 29, 2000 at 10:59:47PM +0000, Labhesh Patel wrote:
> Hi,
> 
>     I was trying to modify the contents of the PQA AppInfo block.
> After creating the chunk which contains all the appInfo data - 
> pqaTitleWords, pqaTitleStr etc.., how do I set the information in the 
> Database header? In tha call to DmSetDatabaseInfo(..) there is a parameter 
> called appInfoID. Now, how do I get this value for the appInfo block which I 
> have created/modified?

An excerpt from PqAnywhere which does the same thing you are doing
(Part of ZBoxZ - OpenSource at palmboxer.sourceforge.net)

  asz = 50;
  ap = DmNewHandle(db, asz);
  aiid = MemHandleToLocalID(ap);
  xp = MemHandleLock(ap);
  pqahead[13] = ( strlen(title) + 1 ) / 2;
  strcpy(&pqahead[14],title);
  DmWrite(xp, 0, pqahead, asz);

  MemHandleUnlock(ap);
  DmSetDatabaseInfo(0, lid, NULL, NULL, NULL, NULL, NULL, NULL,
                    NULL, &aiid, NULL, NULL, NULL);


Basically do the DmNewHandle call to allocate the memory, and
DmSetDatabaseInfo to attach it as the appinfo.

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

Reply via email to