in sndstream callback I cannot access global variable. I can only access
variables passed throgh as a pointer in userdata.
I am trying to do in a c++ scenario. I passed 'this' pointer as userdata and
tried to call a function by typecastng userdata to my class pointer. Everything
goes fine, but when I try to access the member variable in that function, it
crashes. Why ?
callback(userdata, ....)
{
Class * a = (Class *)userdata;
a->b();
}
Class ::b()
{
m_MV = MemPtrNew(100); // Crashes here
}
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/