MemHandleLock() returns a VoidPtr which is really void*.
This should be cast to your struct pointer type as you are doing. Metroworks
C++ compiler will complain otherwise.

The book examples are based on GCC I think and work fine if you are pointing
to a string or char* type.



----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Thursday, June 21, 2001 12:26 PM
Subject: Records not made by Britney Spears


> If I have the following line of code it compiles but it gives us a NULL
memory error when running.
>
> newRecordPtr=(OurStruct*)MemHandleLock(myRecordHandle);
>
> The book I am reading is called " The Palm Programming -The Developer's
Guide" by: Neil Rhodes and Julie McKeehan and it says to use
>
> newRecordPtr=MemHandleLock(myRecordHandle);
>
> but it won't compile.  Any suggestions?  We are using this to try and make
a new record in a database.
>
>
> --
> 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