Henrik,

The basic idea of what you want to do should work fine.  I pretty much do
the same in my code.  I happen to create typedefs for my structs, but that
doesn't really matter.  Did you try the code you submitted?  What happened?

-Ron
Amherst, NH

"Henrik Fredriksson" <[EMAIL PROTECTED]> wrote in message
news:96301@palm-dev-forum...
>
> Hi.
>
> I created a pdb file on my desktop PC according to the specification of
pdb
> format on www.palmos.com. Lets say that I only wrote one record that is of
> the type below to the file
>
> struct abc{
>     char[7] a;
>     int b;
> };
>
> When I sync this pdb file over to the Palm device (or POSE), open the
> database and call DmGetRecord I can use DmDatabaseSize to see that the
data
> bytes is 11.
>
> So, I want to create the same struct in my Palm code and simply copy the
> data from this record over to the struct. Can't this be done with a simple
> type cast from the void pointer I get from MemHandleLock? I mean something
> like this (recordhandle previously set from DmGetRecord )..
>
> struct abc *x;
> x=(struct abc*)MemHandleLock(recordhandle) ;
>
> Or how could this be achieved?
>
> Thanks,
> Henrik
>
>
>
>



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

Reply via email to