Nevermind - I've been using the older fopen and other stdio functions for max portability to the Mac and simply forgot to specify a binary file, so it was obligingly adding a carriage return everywhere it saw a linefeed. Duh.
> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:bounce-palm- > [EMAIL PROTECTED] On Behalf Of Randall Pulsifer > Sent: Wednesday, December 17, 2003 8:28 PM > To: Palm Developer Forum > Subject: RE: Reading a file stream via conduit... > > I've been looking for this info in the conduit forums, but stumbled > across > it here. It sounds like I've been doing it correctly: offsetting by 8 > bytes > and reading and appending the remainder of the records to a file on the > host. However, while I get a file that is about the right size for a > jpeg, > looks like a jpeg and smells like a jpeg, the graphics viewer, e.g. > Paintshop Pro, says it is not a valid jpeg file. I'm reading the DBLK > formatted ****.jpg files from internal memory of a Cli� (NZ90) and > storing > them on the PC. I will need this to also work on a Zire. Are jpegs > special > in some way? Don't tell me it's another Sony proprietary thing, I'll > jump - > I swear... > > Thks, Randyp > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:bounce- > palm- > > [EMAIL PROTECTED] On Behalf Of Ben Combee > > Sent: Wednesday, July 02, 2003 3:30 PM > > To: Palm Developer Forum > > Subject: Re: Reading a file stream via conduit... > > > > At 09:30 AM 7/2/2003, Arrow wrote: > > >i'm using CW + POL to write a streaming file in a Palm app, > > >using the POL CFile class (which calls FileOpen,FileWrite,etc) > > >...the Palm app just reads packets from a serial connection > > >and just needs to save the data as one big block...henced > > >why i used streaming file... > > > > Sounds like a good use for them. > > > > >...for my conduit, using CDK 4.03, i can read in > > >this block. i use the CHHMgr class -> palmRec(CPalmRecord) > > >which reads this block. I noticed though, that the > > >data pointer ( via palmRec.GetRawData() ) points 8 bytes > > >before the actual data, the first 4 bytes make up "DBLK" > > >(what does "DBLK" represent?) and then the next 4 bytes make up > > >the size the data...no problem to get the data by moving the > > >pointer 8 bytes ahead ( i just need to parse it and save to a flat > > file), > > >but does this sound correct ? ...wondering if anyone else has done > > similar. > > > > 'DBLK' is a header that Palm OS uses to verify that the database is > > indeed > > a filestream. Your interpretation sounds correct, and also > matches > > that > > used by the libprc library (part of the program par) that can read > and > > write filestream PDB files. > > > > >i read the drawback of using streaming file is that i cannot > > >backup the pdb to PC, is this correct ? > > > > File streams are not backed up by the backup conduit, but you can > > manually > > back them up in your conduit. > > > > > > -- > > For information on using the Palm Developer Forums, or to > unsubscribe, > > please see http://www.palmos.com/dev/support/forums/ > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, > please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
