On Wed, 21 Apr 1999, Daniel McCarty wrote:

> [EMAIL PROTECTED] wrote:
> > 
> > I doubt you'll get the information you need to TP3Data and TP3DictState
> > (though I could be wrong). Could you describe what you're really trying to
> > do? Perhaps there's another way of accomplishing that task?
> 
>    (I can understand if Graffiti(R) technology <g> is something still
> covered by Palm as a trade secret and they have no desire to release
> the source.  So if releasing this information isn't doable, I'll just
> go back to doing this my old way.)
>    I'm assuming that the lastChar member of the GrfGlobalsPtr contains
> the last character entered.  This would solve me having to save the
> Char on my own and allow me to pack more information into a feature.
>    I can't resolve the offset for lastChar without knowing something
> about TP3Data and TP3DictState, though.  I wouldn't mind just knowing
> their sizes so I could create a dummy struct to make the compiler
> happy.

I have to agree that it's a bit dodgy to have the supplied headers contain
references to structures that aren't supplied. Never mind what the
structures are for, without their size, you might as well forget about
using the containing structure. And if you _want_ people to forget about
using the containing structures, you might as well say that outright,
instead of leading them on a bit. 

It wouldn't be too difficult to set up a stub structure header, something
like:

        /* Not the actual lengths, just arbitrary numbers */
        struct TP3Data { unsigned char _system[42]; };
        struct TP3DictState { unsigned char _system[12]; };

Actually _getting_ this information in the first place may be a little
more tricky. You might be able to extract it from the debugging
information when PalmOS is compiled (assuming there are tools available to
extract information from the debugging symbol tables), or alternatively
grep the headers for structure definitions, convert that into a bunch of
code like this: 

        sprintf(buf, "TP3Data %d\n", sizeof(struct TP3Data));
        sprintf(buf, "TP3DictState %d\n", sizeof(struct TP3DictState));

and then compile the lot up as program to run under the emulator or on the
device, with output being sent somewhere useful. (Debug console, serial
port, a database, whatever.)

-- 
Kenneth Albanowski ([EMAIL PROTECTED], CIS: 70705,126)


Reply via email to