hello every one!
I am writing a structure as a Record to a PDB, the writing call is successful but when I reopen the PDB after closing it, the record is not there...


this is the structure which I am trying to write
typedef struct
{

char bmArray[totalBms][bmLength];
UInt16 bmLineArray[totalBms];
UInt16 numOfBms;

}bookMarks;
#define bmSize 322;

and here is the function which is actually writing the Record in the PDB. please analyze and help
Thank you


extern Boolean writeBmRec()
{
MemPtr recBmPtr;
UInt16 i;

UInt32 recOfset=0;
UInt32 recBmSize=bmSize;

/***************Locking Record Handles*******************/
recBmPtr = MemHandleLock(recBms);

/***************Writing to Records***********************/

err = DmWriteCheck(recBmPtr, recOfset, recBmSize);
if(err!=errNone)
{
ErrAlert(err);
//return false;
}

err = DmWrite(recBmPtr, recOfset, bm, recBmSize);

//bm is a pointer to the structure of Bookmarks mention above

/************** Unlocking Record Handles*****************/
err = MemHandleUnlock (recBms);
if(err!=errNone)
{
ErrAlert(err);
return false;
}
/********************************************************/


}


and Later I have also called the DmReleaseRecord Function

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



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

Reply via email to