The class I tried actually is a very simple one called CDateTime with only
one public member variable DateTiemType _dateTime and a couple of member
methods like "Int16 getDay()", " void setDate(const CDate rhs )" to
manipulate the _dateTime. All the member methods are not virtual functions
to me since they are all implemented in CDateTime class.

----- Original Message -----
From: "Ben Combee" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, January 06, 2003 2:46 PM
Subject: Re: Help needed to build a palm shared library


> At 14:38 2003-1-6 -0500, you wrote:
> >In my caller palm application, i included the header for a class A and
> >declared a pointer to A at where I need to use this class. It seems I can
> >call a shared lib function like CreateObjA to return an A object pointer,
> >but when I pass this pointer back to an A member method wrapped in my
lib,
> >which meant to set  a boolean type member variable of this A object,  my
> >caller application crashes and the error message saying the lib function
is
> >trying to access either unallocated mem, or the mem which is not allowed
to
> >access.
>
> Is the object allocated by your CreateObjA function an object with virtual
> functions?  If so, you won't be able to create it from a shared
> library.  Objects with virtual functions have an embedded pointer to a
> vtable that holds pointers to all the virtual functions.  The vtable is a
> global variable that has fields changed at program start, since the
program
> doesn't know where code is loaded until runtime.  Since shared libraries
> don't have global variables, they also can't support objects with virtual
> tables.  Its just not something that the Palm OS shared library
> architecture can handle very well.
>
> --
> Ben Combee <[EMAIL PROTECTED]>
> CodeWarrior for Palm OS technical lead
> Palm OS programming help @ www.palmoswerks.com
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>


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

Reply via email to