I'm attempting to beam a .pdb using ExgSend(), ExgDBWrite() on the sending
side and ExgReceive(), ExgDBRead() on the receiving.

Everything works fine when I beam the database from a 3.5 device to a 4.0 or
higher device and vice-versa.  When I beam from a 3.5 device to a 3.5 device
the records seem to be corrupted in the resulting database.  I get 2Bytes of
zeros starting every record and other problems.

Has anyone noticed any corruption when beaming whole databases from 3.5 ->
3.5 devices?

I've attached the source that calls ExgDBRead().

Miles Rincker
[EMAIL PROTECTED]

Boolean Beam::ReceiveArchive(void *cmdPBP, char *TimeBuffer)
{
 Err error = 0;
 LocalID dbIDP;
 UInt16 cardNo = 0;
 Boolean needReset = true;
 Package package;

 PalmDBStorage pdbObject;
 pdbObject.Delete(((ExgSocketType *) cmdPBP)->name); // delete the database
if it exists

 error = ExgAccept((ExgSocketType *) cmdPBP);

 // receive a database
 error = ExgDBRead(ReadDB, DeleteDB, (ExgSocketType *)  cmdPBP, &dbIDP,
cardNo, &needReset, false);

 // Return 0 to the OS if things went okay
 if (StrCompare(((ExgSocketType *) cmdPBP)->name, package.GetArchiveName())
== 0)
 {
 package.Extract(ARCHIVENAME, TimeBuffer);
 }

 // disconnect after receival of record(s)
 ExgDisconnect((ExgSocketType *)  cmdPBP, error);

 return 0;
}

/*
 ReadDB()

 Called when we want to receive bytes of a database

 Parameters & Returns:
  Used by exgReadDB
*/
Err ReadDB (void* dataP, UInt32* sizeP, void* userDataP)
{
 Err error = errNone;

 *sizeP = ExgReceive((ExgSocketType *) userDataP, dataP, *sizeP, &error);

 return error;
}



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

Reply via email to