I read in the Palm OSĀ® Programmer's API Reference that ExgDBRead function could 
be used to beam a database. Using something this as The function called to 
write the database.

Err MyWriteDBProc (void *dataP, UInt32 *sizeP,  
  void *userDataP)  
{ 
  Err err = errNone; 
  //userDataP contains ExgSocketType pointer.  
  *sizeP =  
    ExgSend((ExgSocketType *)userDataP,  
      dataP, *sizeP, &err); 
  return err; 
} 

Bu still I want a Char* buffer of the database file. and I can't do something 
like: 
Char *buffer =(Char*)MemPtrNew(sizeof(Char)*1024);
buffer=(char*)dataP;

Should I define:
typedef struct {
        DmOpenRef openRef;
        UInt16 recordCount;
        UInt16 recordIndex;
        UInt16 offsetInCurrentRecord;
        } DB ;

and int the WriteFunc I should do something like:
DB *pDB = (DB *) userDataP;

And read all the records? How can I get a Char *buffer from the const void 
*dataP? 



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

Reply via email to