If you know the string is always 25 bytes, why don't you just jump to the
26th for the next field?

> ----------
> From:         Jeremy Nuss[SMTP:[EMAIL PROTECTED]]
> Reply To:     Palm Developer Forum
> Sent:         Tuesday, August 14, 2001 5:22 PM
> To:   Palm Developer Forum
> Subject:      conduit record parsing trouble
> 
> Hi everyone, I wrote a palm program with my own record structures using
> C++.
> 
> Another guy is working on a conduit (In Visual Basic and ScoutSync) to
> deliver the data in my records to a PC database.  He is having some
> trouble
> parsing through the records to obtain the fields.  The problem is one that
> I
> had when I wrote a java based conduit for my program, and the problem is
> this:
> 
> Problem:
> 
>       The palm records have strings such as this: Char string[25].
> 
>       Now, if the record only actually has a 15 character string then the
> extra 9
> characters (one was used for the null terminator) are unused junk space.
> Now
> when you attempt to call a conduit API function AFTER reading in a string
> such as the one above, it is looking at the very next byte, which is STILL
> WITHIN the region allocated for the above string.  Sooo.. it screws up.
> 
> Solution:  In java my solution was to simply check how many bytes I read
> in,
> and increment the correct number of bytes ahead to reach the next field in
> the record.
> 
> 
> Now.. my question I pose to you all is.. Can this same solution be
> implemented in Visual Basic? (I don't use it at all thus my need to know)
> The guy cant seem to figure it out if you can do it, because he insists I
> need to change my palm program (lol.. change the palm program to make a
> conduit work).
> 
> So basically what I am wondering is if Visual Basic is capable of reading
> in
> a raw chunk of bytes using a conduit and parse through it.. and if so
> direct
> me to some documentation or online help or something :)
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
> 

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

Reply via email to