From xorandor at gmail.com Wed Jun 21 03:34:42 2006 From: xorandor at gmail.com (Joe Goh) Date: Wed Jun 21 03:34:39 2006 Subject: [missing-sync-palmos-dev-talk] How does SyncReadNextModifiedRec() work? Message-ID: <32b179b00606210334x7f989debq7f42c9e6979ec13b@mail.gmail.com> Hi everyone, I'm currently working on a conduit that reads a PDB for a Palm-supplied application on the Treo 650 and I couldn't get the SyncReadNextModifiedRec() function to work as advertised at all. It always seems to return all the records, and not just the records modified after the last sync date. Using SyncResetSyncFlags() before closing the database didn't seem to help either. :-/ Is there something obvious i'm missing here? Why is the modified flag not being used? On a side note, are there any books or online documentation on conduit development that doesn't rely on using the Palm-supplied Visual Studio wizards as starting points for development? I'm *this* close to installing Visual Studio 6 on my MacBook Pro just so that I can run the wizards to generate the framework code. :-( Cheers, Joe From sgruby at markspace.com Wed Jun 21 06:48:22 2006 From: sgruby at markspace.com (Scott Gruby) Date: Wed Jun 21 06:48:24 2006 Subject: [missing-sync-palmos-dev-talk] How does SyncReadNextModifiedRec() work? In-Reply-To: <32b179b00606210334x7f989debq7f42c9e6979ec13b@mail.gmail.com> References: <32b179b00606210334x7f989debq7f42c9e6979ec13b@mail.gmail.com> Message-ID: <3BEE10F7-EB10-4530-B08E-3B05F03AC9BE@markspace.com> On Jun 21, 2006, at 3:34 AM, Joe Goh wrote: > Hi everyone, > > I'm currently working on a conduit that reads a PDB for a > Palm-supplied application on the Treo 650 and I couldn't get the > SyncReadNextModifiedRec() function to work as advertised at all. It > always seems to return all the records, and not just the records > modified after the last sync date. > > Using SyncResetSyncFlags() before closing the database didn't seem to > help either. :-/ > > Is there something obvious i'm missing here? Why is the modified flag > not being used? > 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. -- Scott Gruby Mark/Space, Inc. Please visit for assistance with Mark/Space products. From xorandor at gmail.com Wed Jun 21 19:02:22 2006 From: xorandor at gmail.com (Joe Goh) Date: Wed Jun 21 19:02:20 2006 Subject: [missing-sync-palmos-dev-talk] How does SyncReadNextModifiedRec() work? In-Reply-To: <3BEE10F7-EB10-4530-B08E-3B05F03AC9BE@markspace.com> References: <32b179b00606210334x7f989debq7f42c9e6979ec13b@mail.gmail.com> <3BEE10F7-EB10-4530-B08E-3B05F03AC9BE@markspace.com> Message-ID: <32b179b00606211902n6efee629ia2e3504ae184bed2@mail.gmail.com> On 6/21/06, Scott Gruby 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 From sgruby at markspace.com Wed Jun 21 20:42:29 2006 From: sgruby at markspace.com (Scott Gruby) Date: Wed Jun 21 20:42:30 2006 Subject: [missing-sync-palmos-dev-talk] How does SyncReadNextModifiedRec() work? In-Reply-To: <32b179b00606211902n6efee629ia2e3504ae184bed2@mail.gmail.com> References: <32b179b00606210334x7f989debq7f42c9e6979ec13b@mail.gmail.com> <3BEE10F7-EB10-4530-B08E-3B05F03AC9BE@markspace.com> <32b179b00606211902n6efee629ia2e3504ae184bed2@mail.gmail.com> Message-ID: On Jun 21, 2006, at 7:02 PM, Joe Goh wrote: > On 6/21/06, Scott Gruby 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) There's your problem! You're opening the database read only so SyncResetSyncFlags will always fail. You should be using: eDbRead|eDbWrite|eDbShowSecret instead of eDbRead. I think that will solve your problem. > { > 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 > _______________________________________________ > missing-sync-palmos-dev-talk mailing list > missing-sync-palmos-dev-talk@lists.markspace.com > http://lists.markspace.com/mailman/listinfo/missing-sync-palmos-dev- > talk > -- Scott Gruby Mark/Space, Inc. Please visit for assistance with Mark/Space products. From xorandor at gmail.com Wed Jun 21 21:01:42 2006 From: xorandor at gmail.com (Joe Goh) Date: Wed Jun 21 21:01:40 2006 Subject: [missing-sync-palmos-dev-talk] How does SyncReadNextModifiedRec() work? In-Reply-To: References: <32b179b00606210334x7f989debq7f42c9e6979ec13b@mail.gmail.com> <3BEE10F7-EB10-4530-B08E-3B05F03AC9BE@markspace.com> <32b179b00606211902n6efee629ia2e3504ae184bed2@mail.gmail.com> Message-ID: <32b179b00606212101w164cbafdi4580b76f7d4d081e@mail.gmail.com> On 6/22/06, Scott Gruby wrote: > There's your problem! You're opening the database read only so > SyncResetSyncFlags will always fail. You should be using: > > eDbRead|eDbWrite|eDbShowSecret > > instead of eDbRead. I think that will solve your problem. Bingo! Oops, need to read the documentation more carefully from now on. :-) Thanks alot! Joe From elists at tv-apathy.de Sun Jun 25 12:01:48 2006 From: elists at tv-apathy.de (Michael Lutz) Date: Sun Jun 25 12:02:52 2006 Subject: [missing-sync-palmos-dev-talk] Debugging the Carbon Sample Conduit Message-ID: Hello, first of all: I am really now to conduit development on the Mac, so I hope the question is not already answered in some FAQ somewhere I don't know of. What I am trying to do is to debug the Carbon Sample Conduit I have downloaded form the Mark/Space website (thanks for providing those samples and documentation btw.!!). More precisely I am trying to run into a breakpoint in the OpenConduitCarbon function. I followed the instructions from the "Developing Palm OS Conduits for PowerPC and Intel Macs Using XCode" paper: - Setting the link for the executable to the /Library/.../Palm HotSync/Conduits/ - Creating the custom executables (UI and Conduit Manager) - writing the defaults for debugging ("defaults write com.marksapce.missingsync.palmos debugConduits -bool YES" I did also write to com.markspace... since I did not know if maksapce was a typo) Upon starting the debugger I can see that MissingSync is launched, I can get a short glimpse of the syncing window (that with the progressbar) and then I get the following error message: ? This happens only if I am trying to debug, not during a normal sync. The only active (selected in the conduit prefs) conduit is the Sample MachO Conduit. Any help is greatly appreciated! :-) Best regards, Michael -------------- next part -------------- Skipped content of type multipart/mixed From sgruby at markspace.com Sun Jun 25 14:21:18 2006 From: sgruby at markspace.com (Scott Gruby) Date: Sun Jun 25 14:21:21 2006 Subject: [missing-sync-palmos-dev-talk] Debugging the Carbon Sample Conduit In-Reply-To: References: Message-ID: On Jun 25, 2006, at 12:01 PM, Michael Lutz wrote: > Hello, > > first of all: I am really now to conduit development on the Mac, so > I hope the question is not already answered in some FAQ somewhere I > don't know of. > > What I am trying to do is to debug the Carbon Sample Conduit I have > downloaded form the Mark/Space website (thanks for providing those > samples and documentation btw.!!). More precisely I am trying to > run into a breakpoint in the OpenConduitCarbon function. I followed > the instructions from the "Developing Palm OS Conduits for PowerPC > and Intel Macs Using XCode" paper: > - Setting the link for the executable to the /Library/.../Palm > HotSync/Conduits/ > - Creating the custom executables (UI and Conduit Manager) > - writing the defaults for debugging ("defaults write > com.marksapce.missingsync.palmos debugConduits -bool YES" I did > also write to com.markspace... since I did not know if maksapce was > a typo) > > Upon starting the debugger I can see that MissingSync is launched, > I can get a short glimpse of the syncing window (that with the > progressbar) and then I get the following error message: > > > This happens only if I am trying to debug, not during a normal > sync. The only active (selected in the conduit prefs) conduit is > the Sample MachO Conduit. > > Any help is greatly appreciated! :-) > Everything you're doing appears correct. However, if any component is running when you do "defaults write com.marksapce.missingsync.palmos debugConduits -bool YES", it might be overwritten. The easier thing to do is to hold down the option key when selecting Preferences from the Missing Sync menu and turn on Debug Conduits, if it isn't already chosen. The error message you're getting, you shouldn't get if you have the Transport Monitor running; this is done by selecting one of the connection types in the user interface (USB, Bluetooth or Network). I just tested things and only got the error message you got when I hadn't selected USB as a connection type. -- Scott Gruby Mark/Space, Inc. Please visit for assistance with Mark/Space products. From elists at tv-apathy.de Mon Jun 26 12:12:36 2006 From: elists at tv-apathy.de (Michael Lutz) Date: Mon Jun 26 12:12:40 2006 Subject: [missing-sync-palmos-dev-talk] Debugging the Carbon Sample Conduit In-Reply-To: References: Message-ID: On 25.06.2006, at 23:21, Scott Gruby wrote: > > Everything you're doing appears correct. However, if any component > is running when you do "defaults write > com.marksapce.missingsync.palmos debugConduits -bool YES", it might > be overwritten. The easier thing to do is to hold down the option > key when selecting Preferences from the Missing Sync menu and turn > on Debug Conduits, if it isn't already chosen. The error message > you're getting, you shouldn't get if you have the Transport Monitor > running; this is done by selecting one of the connection types in > the user interface (USB, Bluetooth or Network). I just tested > things and only got the error message you got when I hadn't > selected USB as a connection type. > > -- > Scott Gruby > Mark/Space, Inc. > > > Please visit for assistance > with Mark/Space products. Hello Scott, thank you for the quick reply. The "any component is running" was the problem. Using the Missing Sync menu did the trick! Thanks again, Michael