[missing-sync-palmos-dev-talk] How does SyncReadNextModifiedRec()
work?
Joe Goh
xorandor at gmail.com
Wed Jun 21 19:02:22 PDT 2006
On 6/21/06, Scott Gruby <sgruby at markspace.com> wrote:
> Which application on the handheld are you trying to read the data?
> Can you provide a snippet of code? It's possible that the database
> always gets modified after a sync causing this behavior.
I'm trying to read the SMS message database on the Treo 650.
Here's a snippet of what i'm doing. The rest of the conduit is mostly
based on the Sample Conduit from the markspace website.
unsigned char database_id = 0;
if (SyncOpenDB("Messages Database", DEFAULT_CARD_NUM, database_id,
eDbRead) == 0)
{
CRawRecordInfo raw_record;
raw_record.m_FileHandle = database_id;
raw_record.m_TotalBytes = database_info.dwMaxRecSize;
raw_record.m_pBytes = (BYTE *) malloc(raw_record.m_TotalBytes);
raw_record.m_RecIndex = 0;
if (raw_record.m_pBytes == NULL)
goto close_database;
while (SyncReadNextModifiedRec(raw_record) == 0)
{
// Lots of stuff done here
}
close_database:
if (raw_record.m_pBytes != NULL)
free(raw_record.m_pBytes);
SyncResetSyncFlags(database_id);
SyncCloseDB(database_id);
}
::SyncUnRegisterConduit(conduitHandle);
unloadBridge();
Any clues?
Joe
More information about the missing-sync-palmos-dev-talk
mailing list