Aaron Ardiri wrote:
>
> > >What's the difference between VoidHand and Handle?
>
> so in otherwords VoidHand is a (void **) and Handle is a (char **).
> best case to understand this? a Handle is used to manipulate char
> objects (memory unit cells - same size) and a VoidHand is used to
> manipulate another other types of objects (void = unknown).
> you interpretation of void depends on your "casting". they can be
> used interchangably because you can always cast a VoidHand to a
> Handle. they are pointers to other pointers.. and that data type
> essentially always remains the same. it is only at the single
> dimension where you need to worry about the data type.
This is true in general, but I think rather misleading in this context.
When the PalmOS API is used correctly, neither of these types is ever
actually dereferenced, so it doesn't really matter what the underlying
typedef says. In other words, an application wouldn't choose Handle
over VoidHand because it was dealing with characters. The real question
is how they differ in the context of the API. And the answer seems to
be, they don't.
Just based on where each appears in the API definitions, it seems the
difference is probably historical; whoever designed the memory and data
manager APIs preferred VoidHand, and whoever designed the networking
APIs preferred Handle. :-)
--Mark